Skip to main content
Use Payment Element when you are building or rebuilding checkout.

Why Pagou recommends it

  • Hosted card fields reduce PCI exposure.
  • Tokenization happens in the browser without your backend touching raw card data.
  • Card authentication is handled inside elements.submit(...), with no extra fields to collect.
  • Your backend contract stays simple: create a transaction with the token returned by the browser.

Backend request

Example response

Common error

Status 422
Fix: create the token in Payment Element first. Do not collect raw card data in your own form and send it directly to the API.

Installments with interest paid by the buyer

When your account is set up to charge installment interest to the buyer, the transaction is created the same way, with two differences:
  • amount is the amount before interest. Pagou adds the interest of the chosen installment and charges the total. The creation response and the webhook return amount as the total charged. Use base_amount, present on the creation response, on GET /v2/transactions/{id} and on the webhook, for the amount you sent. GET /v2/transactions/{id} returns amount as the amount before interest, the same as base_amount; the total charged is in the creation response and in the webhook.
  • The installment must be chosen in the card field (see the installments option of the SDK). Send the same amount, installments and interest_free_installments the card field showed.
Optional field: interest_rate sent in the request is ignored for these sales; the rate charged is always the one Pagou calculated. In both cases nothing is charged and no transaction is created. base_amount is also returned for regular sales: it is the amount you sent, in the transaction currency.

Decision rule

  • Use Payment Element for browser card flows.

Continue with