Tokenization
ThePOST /card-token operation receives the card data and returns a token. The token replaces the card data in the charge operation, which relieves the integrator of storing them.
The precautions relating to the processing of card data are set out in Security and data protection.
Creating the charge
ThePOST /card operation creates the charge. The card.installments field states the number of installments, from 1 to 12.
Authorization outcome
The operation responds with status200 for both authorized and declined charges. The outcome is given in the data.status field.
Decline reasons
When a charge is declined, therefuseReason field states the normalized reason, and the acquirerCode and acquirerMessage fields reproduce the acquirer’s response.
Temporary block of the payer
Successive declined attempts result in the temporary block of the payer for card charges. In that case, the response is429, with the code field equal to BUYER_ATTEMPTS_EXCEEDED.
No amount is charged in that case. The block is restricted to the payer concerned and does not affect others, so that charges to other payers must not be suspended or delayed. Charging by Pix remains available for the blocked payer.
Status
429 is also used for the rate limit. The two cases must be distinguished by the code field, and not by the response status.
Idempotency
Sending theIdempotency-Key header in every charge is recommended. In the event of a network failure or a timeout, repeating the request with the same key returns the transaction already recorded, without a new authorization with the issuer.