Obtain JWT tokens to authenticate all other requests.
ConnectPSP API (2.2.0)
ConnectPSP is a PIX payment gateway designed for high-throughput platforms such as digital wallets, betting companies, and fintechs.
This API allows you to:
- 💸 Receive payments via PIX (Cash-In) — standard QR Code or OpenFinance
- 🏦 Send payments via PIX key or bank account data (Cash-Out)
- 📊 Manage your wallet — check consolidated balances and rebalance between transactional and proprietary accounts
- 🪝 Receive real-time events via Webhooks as transactions progress
All endpoints (except POST /auth/token) require two headers:
| Header | Description |
|---|---|
Authorization | Bearer <jwt_token> — obtained from POST /auth/token |
ApplicationToken | Fixed GUID token that identifies your integration |
For financial operations (Cash-Out, Rebalance), an additional header is required:
| Header | Description |
|---|---|
DigitalSignature | HMAC-SHA256 hash of your JWT + CryptoToken. See Authentication Guide |
X-Idempotency-Key is optional on POST /cash-in and POST /cash-out, and recommended (a UUID v4 per operation). With it, a network retry returns the original response instead of creating a second transaction. Without it, the request is processed normally and externalReference still blocks duplicates with 409 DUPLICATED_EXTERNAL_REFERENCE. See the Authentication Guide for the full rules.
| Phase | What to confirm first |
|---|---|
| Setup | Credentials, environment, headers, and webhook readiness in Initial Setup |
| Authentication | JWT generation and DigitalSignature rules in the Authentication Guide |
| Transactions | Your first Cash-In or Cash-Out flow with idempotency and webhook validation |
Request
Generates a PIX payment intent.
Standard PIX flow: Returns a Copia e Cola string and a QR Code image (Base64) that your user can scan to complete the payment.
OpenFinance flow: Include the openFinance object to generate an OpenFinance payment link instead. The user is redirected to their bank's app to authorize the payment.
Once payment is confirmed by the banking network, ConnectPSP will POST a CASHIN_PAID event to your webhookUrl.
externalReference must be unique per client: reusing one returns 409 DUPLICATED_EXTERNAL_REFERENCE. X-Idempotency-Key is optional — see Idempotency.
Fixed GUID that uniquely identifies your integration. Provided during ConnectPSP onboarding.
Optional, recommended. A key you generate per operation (a UUID v4 is ideal), up to 100 characters. Accepted on POST /cash-in and POST /cash-out.
- Without it, the request is processed normally, with no idempotency.
externalReferencestill blocks duplicates with409 DUPLICATED_EXTERNAL_REFERENCE. - Same key, same body, within 24 hours: returns the original response, creates nothing, and adds the
Idempotent-Replayed: trueheader. - Same key, different body:
422 IDEMPOTENCY_KEY_REUSED. - Same key while the first request is still running:
409 IDEMPOTENCY_KEY_IN_PROGRESS. - More than 100 characters:
400 IDEMPOTENCY_KEY_INVALID.
Only successful responses are stored. After an error the key is released, and a retry with the same key is processed again.
Payment amount in BRL (Brazilian Reais). Decimal format (e.g. 150.50).
Your internal order or transaction ID. Must be unique per client: reusing one returns 409 DUPLICATED_EXTERNAL_REFERENCE. Also accepted as {id} on GET /cash-in/{id}.
QR Code validity in minutes. Defaults to 1440 (24h) if omitted.
URL to receive asynchronous payment events (CASHIN_PAID, CASHIN_REFUNDED).
When present, triggers the OpenFinance flow instead of a standard QR Code. The response will include a paymentUrl to redirect the user to their bank's authorization screen.
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-in
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -X POST https://api.homologacao.connectpsp.com/cash-in \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>" \
-H "X-Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": 150.50,
"externalReference": "order_abc123",
"expirationInMinutes": 60,
"webhookUrl": "https://api.yourdomain.com/webhooks/connectpsp",
"payer": {
"name": "João Silva",
"document": "12345678909"
}
}'- standard_pix
- open_finance
{ "transactionId": "kk6g232xel65a0daee4dd13kk2912714964", "internalCode": "US7B1JQ", "externalReference": "order_abc123", "status": "AWAITING_PAYMENT", "amount": 150.5, "payer": { "name": "João Silva", "document": "12345678909" }, "pixData": { "copyAndPaste": "00020101021226...", "qrCodeImageBase64": "iVBORw0KGgoAAAANSU..." }, "requestedAt": "2026-03-10T11:20:00-03:00" }
Request
Returns Cash-In transactions created within a period, oldest first by default. Pass order=desc for newest first.
Send nextCursor from the previous response to fetch the next page. When the response comes back without nextCursor, you have reached the end of the period.
To walk backwards, send previousCursor in the very same cursor parameter. It is absent on the first page, so its absence is how you know you are at the start.
Keep from, to, limit and order identical across every page — only cursor changes. Both directions return the page in the order you asked for.
ℹ️ There is no
totalfield. Counting the whole window would require a full scan, which is exactly what cursor pagination avoids. Every page costs the same, whether it is the first or the nine-hundredth.
Each item carries the same fields as GET /cash-in/{id}, minus pixData and openFinanceData — those only make sense at creation time.
Start of the period, inclusive. Accepts a plain date (YYYY-MM-DD) or a full ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss).
Times without an explicit offset are read as America/Sao_Paulo (UTC-3). A plain date becomes 00:00:00.000 of that day in that timezone.
The period filters on when the transaction was created, not when it was paid.
End of the period, inclusive. Same format rules as from. A plain date becomes 23:59:59.999 of that day in America/Sao_Paulo.
Maximum number of items per page. Defaults to 50, maximum 1000.
Opaque cursor pointing at another page. Copy nextCursor (to go forward) or previousCursor (to go back) from the previous response verbatim. Do not build or parse it yourself, its format may change — a cursor already knows which way it goes.
Keep from, to, limit and order identical across every page of the same walk.
Sort direction by date. asc (default) returns the oldest first, desc the newest first.
⚠️
ordercannot change mid-walk. The direction is baked into the cursor. Sending a differentorderalongside acursorreturns422 LIST_ORDER_MISMATCH, because the next page would otherwise walk backwards — repeating rows you already had and skipping rows you never got. To change direction, start a new walk withoutcursor.
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-in
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl "https://api.homologacao.connectpsp.com/cash-in?from=2026-08-01&to=2026-08-01&limit=50" \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>"A page of Cash-In transactions.
End-to-end ID issued by BACEN/SPI upon settlement.
- For paid transactions: starts with
E(e.g.E00416968...) - For refunded transactions: starts with
D(Devolution)
The original E2E ID when endToEndId represents a refund.
AWAITING_PAYMENT— created, not paid yetPAID— payment confirmedEXPIRED— expired without payment; seeexpiredAtREFUNDED— paid, then returned to the payer; seereasonandrefundedAtCANCELLED— cancelled before being paid; seecancelledAt
Why a paid Cash-In went back to the payer. Present only when status is REFUNDED.
FRAUD,DUPLICATED_PAYMENT,CUSTOMER_REQUEST,MERCHANT_ERROR— the reason you sent onPOST /cash-in/{id}/refund.FRAUDalso covers a MED (Special Return Mechanism) claim, andCUSTOMER_REQUESTa devolution the bank flagged as requested by the customerPAYER_NOT_ALLOWED— refunded automatically because the payer is not allowed to pay youOTHER— any other reason
Present only when money actually moved: PAID and REFUNDED. Absent in AWAITING_PAYMENT, EXPIRED and CANCELLED — no ConnectPSP account received anything.
When the charge was created. Always present, in every status.
Opaque cursor for the next page. Absent when there are no more pages — that is how you know the walk is finished.
{ "items": [ { … } ], "nextCursor": "MTM4OTU0NzI4MDAwMDAwMDB8YXxufFVTN0IxSlE" }
Request
Aggregated Cash-In figures for a period: totals per status, and the same figures broken down by settlement bank.
Use this instead of walking the whole list when you only need the numbers.
| Key | Meaning |
|---|---|
pending | Not paid — covers both awaiting payment and expired |
paid | Settled |
refunded | Returned to the payer |
⚠️ There is no
expiredbucket. Expiry depends on the charge's due date, which the aggregate does not read, so expired charges are counted underpending. The listing endpoint does distinguish them per item.
A bucket only appears when it has at least one transaction.
settlement counts and sums paid transactions only. Money that has not settled is not attributed to any bank — this is what makes the figures reconcile against GET /account/balance.
Start of the period, inclusive. Accepts a plain date (YYYY-MM-DD) or a full ISO 8601 timestamp (YYYY-MM-DDTHH:mm:ss).
Times without an explicit offset are read as America/Sao_Paulo (UTC-3). A plain date becomes 00:00:00.000 of that day in that timezone.
The period filters on when the transaction was created, not when it was paid.
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-in/summary
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl "https://api.homologacao.connectpsp.com/cash-in/summary?from=2026-08-01&to=2026-08-01" \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>"Aggregated figures for the period.
Start of the period, echoed back in America/Sao_Paulo.
Status key → {count, amount}. Only statuses with at least one transaction appear.
Cash-In keys: pending, paid, refunded. Cash-Out keys: the Cash-Out statuses in lowercase — processing, pending, completed, cancelled, refunded.
Breakdown by settlement bank, paid transactions only (paid on Cash-In, completed on Cash-Out), ordered by amount descending.
{ "from": "2026-08-01T00:00:00-03:00", "to": "2026-08-01T23:59:59-03:00", "currency": "BRL", "totals": { "paid": { … }, "pending": { … }, "refunded": { … } }, "settlement": [ { … }, { … } ] }
PIX Health tells you whether PIX is working for you right now, and who is at fault when it is not.
A statistical engine compares every 5-minute window of your PIX traffic with what is normal for that weekday and time over the last four weeks, and attributes any clear deviation to the platform, to a settlement partner, to a payer bank or to your own operation — always scoped to what you actually use.
Three endpoints, all read-only and all safe to poll once a minute:
| Endpoint | Use it for |
|---|---|
GET /health/pix | The picture of the moment: status per block plus the incidents open right now |
GET /health/pix/incidents | History of confirmed incidents, paginated |
GET /health/pix/incidents/{id} | One incident with the evidence behind the verdict |
None of them require DigitalSignature or X-Idempotency-Key — only Authorization and ApplicationToken.
Confirmed incidents are also pushed as webhooks (PIX_INCIDENT_DETECTED / UPDATED / RESOLVED), so you do not have to poll to be warned; see the Webhooks guide.