Skip to main content
A credit card charge is made in two operations. The first converts the card data into a token. The second creates the charge with that token and returns, synchronously, the outcome of the authorization.

Tokenization

The POST /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

The POST /card operation creates the charge. The card.installments field states the number of installments, from 1 to 12.

Authorization outcome

The operation responds with status 200 for both authorized and declined charges. The outcome is given in the data.status field.

Decline reasons

When a charge is declined, the refuseReason 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 is 429, 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 the Idempotency-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.

Recurring billing

Recurring billing on card is performed through subscriptions, which use the same token issued by the tokenization operation.

Disputes

The cardholder may dispute the charge with the issuer. The dispute is governed by the rules of the payment scheme of the respective card brand and moves the transaction to the statuses described in Transaction lifecycle.