API Reference
API Pix: authenticationPOSTGet a token
Billing · AuthenticationPOSTGet a token (Billing)
Billing · NotificationsGETGet a notification
Billing · Charges

Retry a card payment

POST/v1/charge/{id}/retry
Base URL: https://cobrancas.efi.mimicr.dev · provider: https://cobrancas-h.api.efipay.com.br

New payment attempt for an unpaid card charge, with a new payment_token. The response has the card result shape. For subscriptions, an approved retry of the last pending charge reactivates the subscription.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

idintegerrequired

charge_id of the charge.

Body

application/json
paymentobjectrequired
Show child attributes
credit_cardobjectrequired

Credit card.

Show child attributes
customerobjectrequired

Payer. A boleto requires name and cpf (or juridical_person); a card also requires email and phone_number.

Show child attributes
namestring

Full name, with first and last name.

Example: "Gorbadoc Oldbuck"
cpfstring

CPF, 11 digits.

Example: "94271564656"
emailstring

E-mail. Required for cards.

Example: "oldbuck@efipay.com.br"
phone_numberstring

Phone with area code (^[1-9]{2}9?[0-9]{8}$). Required for cards.

Example: "5144916523"
birthstring

Date of birth, YYYY-MM-DD. Required for card subscriptions.

Example: "1977-01-15"
addressobject
Show child attributes
streetstringrequired

Street.

Example: "Avenida Juscelino Kubitschek"
numberstringrequired

Number.

Example: "909"
neighborhoodstringrequired

Neighborhood.

Example: "Bauxita"
zipcodestringrequired

CEP (postal code), 8 digits.

Example: "35400000"
citystringrequired

City.

Example: "Ouro Preto"
complementstring | null

Address complement.

statestringrequired

State (UF).

Example: "MG"
juridical_personobject

Legal entity. When present, name and cpf are no longer required.

Show child attributes
corporate_namestringrequired

Corporate name (1 to 255 characters).

Example: "Empresa Exemplo Ltda"
cnpjstringrequired

CNPJ, 14 digits.

Example: "99794567000144"
payment_tokenstringrequired

Card token generated by Efí's JavaScript library (40 hexadecimal characters). In Mimicr, create it with the cobrancas.card_token action; the card's last digit decides the analysis: 1, 2 and 3 are refused, any other is approved.

Example: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5"
installmentsinteger

Number of installments, 1 to 12. Always 1 in subscriptions.

Example: 1
billing_addressobject
Show child attributes
streetstringrequired

Street.

Example: "Avenida Juscelino Kubitschek"
numberstringrequired

Number.

Example: "909"
neighborhoodstringrequired

Neighborhood.

Example: "Bauxita"
zipcodestringrequired

CEP (postal code), 8 digits.

Example: "35400000"
citystringrequired

City.

Example: "Ouro Preto"
complementstring | null

Address complement.

statestringrequired

State (UF).

Example: "MG"
discountobject
Show child attributes
typestringrequired

currency (cents) or percentage (1500 = 15%).

currencypercentage
valueintegerrequired

Discount amount.

Example: 500
messagestring

Charge message.

trial_daysinteger

Free trial days before the first charge (1 to 365). Card subscriptions only.

update_cardboolean

On a retry (retry), stores the new card for the next charges.

Responses

200Card result.
codeintegerrequired

200.

Example: 200
dataobjectrequired

Result of the card analysis.

Show child attributes
installmentsinteger

Installments.

Example: 1
installment_valueinteger

Amount of each installment, in cents.

Example: 5990
charge_idintegerrequired

Charge identifier.

statusstringrequired

approved (becomes paid within seconds) or unpaid when refused.

newwaitingidentifiedapprovedpaidunpaidrefundedcontestedcanceledsettledexpiredlink
Example: "approved"
refusalobject

Present when the card was refused (HTTP 200, status unpaid).

Show child attributes
reasonstring

Refusal reason.

Example: "Dados do cartão inválidos."
retryboolean

Whether it's worth retrying with the same card.

totalintegerrequired

Total in cents.

paymentstringrequired

Payment method.

credit_card
400The charge isn't a refused card charge: 3500081.
codeintegerrequired

Numeric error code, from Efí's error table (e.g. 3500034).

Example: 3500034
errorstringrequired

Error name (e.g. validation_error, invalid_status, property_does_not_exists).

Example: "validation_error"
error_descriptionobjectrequired

Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.

Texto
Propriedade
propertystring

Invalid property.

Example: "/payment/banking_billet/customer/name"
messagestring

Error message.

Example: "O nome deve ter nome e sobrenome."
401Token missing, invalid, expired (600 s) or from another API: 3500008 unauthorized.
codeintegerrequired

Numeric error code, from Efí's error table (e.g. 3500034).

Example: 3500034
errorstringrequired

Error name (e.g. validation_error, invalid_status, property_does_not_exists).

Example: "validation_error"
error_descriptionobjectrequired

Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.

Texto
Propriedade
propertystring

Invalid property.

Example: "/payment/banking_billet/customer/name"
messagestring

Error message.

Example: "O nome deve ter nome e sobrenome."