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 #
- Money is a decimal string.
150and150.0are rejected;"150.00"is accepted. Do not convert it to a number on your side. - There is no endpoint to generate a QR. The
pixCopiaEColacomes in the response ofPUT /v2/cob/{txid}, and repeating the call with the sametxidreturns the same QR. - Credit your customer on
pix.creditado, not onpix.recebido. The first is balance; the second may still be held or refunded. - A rejection by us of a received Pix arrives as
devolucao.criadawith themotivo. Treat thedefaultof yourswitchonmotivoas a refund by our decision. 422is a response, not a failure: repeating the request right away produces the same422. Handle thetitle. Some clear when the balance or the day changes, such assaldo_insuficienteandlimite_excedido."0.00"on your limit removes your own limit, and the limit of the institution still applies. There is no account without a limit.