Skip to content
A AmunPay API PixVersion 3.38 · updated on Pages

Migrating from another gateway

Anyone who has already integrated a Pix gateway will recognize each operation. The table says where each one is here.

Operation by operation #

What you used to do Here
Create a charge or a dynamic QR PUT /v2/cob/{txid}. The txid is yours.
Get a charge GET /v2/cob/{txid}
List charges GET /v2/ex/cobrancas
Cancel an unpaid charge Depends on the account: capacidades.cancelarCobranca in GET /v2/ex/config. Where it is false, let the charge expire.
Transfer, payout, Pix out PUT /v2/ex/pix/{idEnvio}. The idEnvio is yours. Depends on the account: capacidades.saque.
Get a payout GET /v2/ex/pix/{idEnvio}
Refund an incoming payment PUT /v2/pix/{e2eId}/devolucao/{id}. Depends on the account: where capacidades.devolucao is false, the route responds 503 capacidade_indisponivel.
Balance GET /v2/ex/saldo
Statement or transactions GET /v2/ex/extrato/{data} and GET /v2/ex/transacoes
Configure a webhook PUT /v2/ex/webhook
Resend a lost webhook POST /v2/ex/webhook/reenvios or the feed GET /v2/ex/eventos
Sub-accounts PUT /v2/ex/subcontas/{id} and ?subconta= in lookups
Dispute GET /v2/ex/infracoes and the events med.infracao.*. The hold appears in GET /v2/ex/saldo (bloqueado.med) and in GET /v2/ex/bloqueios. The defense depends on the account: capacidades.med in GET /v2/ex/config.
Find an operation by any id GET /v2/ex/transacoes/mapear?ref=

The six differences that cost money #

  1. Money is a decimal string. 150 and 150.0 are rejected; "150.00" is accepted. Do not convert it to a number on your side.
  2. There is no endpoint to generate a QR. The pixCopiaECola comes in the response of PUT /v2/cob/{txid}, and repeating the call with the same txid returns the same QR.
  3. Credit your customer on pix.creditado, not on pix.recebido. The first is balance; the second may still be held or refunded.
  4. A rejection by us of a received Pix arrives as devolucao.criada with the motivo. Treat the default of your switch on motivo as a refund by our decision.
  5. 422 is a response, not a failure: repeating the request right away produces the same 422. Handle the title. Some clear when the balance or the day changes, such as saldo_insuficiente and limite_excedido.
  6. "0.00" on your limit removes your own limit, and the limit of the institution still applies. There is no account without a limit.