API Reference
Retry a card payment
/v1/charge/{id}/retryhttps://cobrancas.efi.mimicr.dev · provider: https://cobrancas-h.api.efipay.com.brNew 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
charge_id of the charge.
Body
application/jsonShow child attributes
Credit card.
Show child attributes
Payer. A boleto requires name and cpf (or juridical_person); a card also requires email and phone_number.
Show child attributes
Full name, with first and last name.
"Gorbadoc Oldbuck"CPF, 11 digits.
"94271564656"E-mail. Required for cards.
"oldbuck@efipay.com.br"Phone with area code (^[1-9]{2}9?[0-9]{8}$). Required for cards.
"5144916523"Date of birth, YYYY-MM-DD. Required for card subscriptions.
"1977-01-15"Show child attributes
Street.
"Avenida Juscelino Kubitschek"Number.
"909"Neighborhood.
"Bauxita"CEP (postal code), 8 digits.
"35400000"City.
"Ouro Preto"Address complement.
State (UF).
"MG"Legal entity. When present, name and cpf are no longer required.
Show child attributes
Corporate name (1 to 255 characters).
"Empresa Exemplo Ltda"CNPJ, 14 digits.
"99794567000144"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.
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5"Number of installments, 1 to 12. Always 1 in subscriptions.
1Show child attributes
Street.
"Avenida Juscelino Kubitschek"Number.
"909"Neighborhood.
"Bauxita"CEP (postal code), 8 digits.
"35400000"City.
"Ouro Preto"Address complement.
State (UF).
"MG"Show child attributes
currency (cents) or percentage (1500 = 15%).
currencypercentageDiscount amount.
500Charge message.
Free trial days before the first charge (1 to 365). Card subscriptions only.
On a retry (retry), stores the new card for the next charges.
Responses
200Card result.
200.
200Result of the card analysis.
Show child attributes
Installments.
1Amount of each installment, in cents.
5990Charge identifier.
approved (becomes paid within seconds) or unpaid when refused.
newwaitingidentifiedapprovedpaidunpaidrefundedcontestedcanceledsettledexpiredlink"approved"Present when the card was refused (HTTP 200, status unpaid).
Show child attributes
Refusal reason.
"Dados do cartão inválidos."Whether it's worth retrying with the same card.
Total in cents.
Payment method.
credit_card400The charge isn't a refused card charge: 3500081.
Numeric error code, from Efí's error table (e.g. 3500034).
3500034Error name (e.g. validation_error, invalid_status, property_does_not_exists).
"validation_error"Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.
Texto
Propriedade
Invalid property.
"/payment/banking_billet/customer/name"Error message.
"O nome deve ter nome e sobrenome."401Token missing, invalid, expired (600 s) or from another API: 3500008 unauthorized.
Numeric error code, from Efí's error table (e.g. 3500034).
3500034Error name (e.g. validation_error, invalid_status, property_does_not_exists).
"validation_error"Error text, or an object with the invalid property (a JSON Pointer-style path, like /items/0/value) and the message.
Texto
Propriedade
Invalid property.
"/payment/banking_billet/customer/name"Error message.
"O nome deve ter nome e sobrenome."