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
Submits a PIX payment to an external bank account or PIX key.
The request is validated and queued for settlement. The response is 202 Accepted — the payment is not yet settled at this point.
202 Accepted only means the request was accepted for processing. Balance, withdrawal limits, the PIX key lookup, security rules and the receiving institution are all checked after the 202, so an accepted Cash-Out can still end up CANCELLED — for example with failure.code INSUFFICIENT_FUNDS or DAILY_LIMIT_EXCEEDED. The outcome always arrives as a webhook:
| Outcome | Event | status |
|---|---|---|
| Paid | CASHOUT_COMPLETED | COMPLETED |
| Money never left | CASHOUT_FAILED | CANCELLED, with failure |
| Paid, then returned by the payee's bank | CASHOUT_REFUNDED | REFUNDED, with reason |
See GET /cash-out/{id} for the full list of failure.code values.
Two destination types are supported:
PIX— by PIX key (CPF, CNPJ, email, phone, or EVP random key)BANK_ACCOUNT— by bank account details (ISPB + branch + account)
This endpoint requires the DigitalSignature header. X-Idempotency-Key is optional and recommended — see Idempotency.
externalReference must be unique per client: reusing one returns 409 DUPLICATED_EXTERNAL_REFERENCE, even when the earlier Cash-Out was cancelled. To try again after a cancellation, send a new externalReference.
Fixed GUID that uniquely identifies your integration. Provided during ConnectPSP onboarding.
HMAC-SHA256 hash of the JWT token + your CryptoToken. Required for sensitive operations. See the Authentication Guide for the exact computation steps.
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.
Your unique transaction reference, per client. Reusing one returns 409 DUPLICATED_EXTERNAL_REFERENCE, even when the earlier Cash-Out was cancelled. Also accepted as {id} on GET /cash-out/{id}.
Optional description that may appear on the payee's bank statement.
URL to receive settlement events (CASHOUT_COMPLETED, CASHOUT_FAILED, CASHOUT_REFUNDED).
PIX— payment via PIX key. ProvidepixKeyTypeandpixKey.BANK_ACCOUNT— payment via bank account data. ProvidebankAccount.
Type of PIX key. Required when type is PIX. Responses and webhooks always return one of these same five values: CPF, CNPJ, EMAIL, PHONE or EVP (random key).
The PIX key value. Required when type is PIX.
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-out
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- pix_key
- bank_account
curl -i -X POST \
https://api.homologacao.connectpsp.com/cash-out \
-H 'ApplicationToken: {{ApplicationToken}}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'DigitalSignature: {{DigitalSignature}}' \
-H 'X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000' \
-d '{
"amount": 500,
"externalReference": "withdraw_xyz789",
"description": "Player withdrawal",
"webhookUrl": "https://api.yourdomain.com/webhooks/connectpsp",
"payee": {
"name": "Maria Silva",
"document": "12345678909",
"destination": {
"type": "PIX",
"pixKeyType": "CPF",
"pixKey": "12345678909"
}
}
}'{ "transactionId": "dd30446e-6cc5-4664-bf3f-6b7f5e55a1a9", "internalCode": "IVKPRMOCDY", "externalReference": "withdraw_xyz789", "status": "PROCESSING", "requestedAt": "2026-03-10T14:00:00-03:00" }
Request
Returns Cash-Out 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.
Each item carries the same fields as GET /cash-out/{id}, with the same status, failure and reason values.
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-out
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl "https://api.homologacao.connectpsp.com/cash-out?from=2026-08-01&to=2026-08-01&limit=50" \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>"A page of Cash-Out transactions.
BACEN/SPI settlement proof.
COMPLETED: starts withEREFUNDED: starts withD(the devolution); the payment E2E is inoriginalEndToEndIdCANCELLED: absent when the transfer never reached the PIX network
PROCESSING— being executed at the financial institutionPENDING— held on the ConnectPSP side (approval, analysis or reconciliation)COMPLETED— paid to the payeeCANCELLED— the money never left your account; seefailureREFUNDED— the money left and came back to your account; seereason
Why the Cash-Out was cancelled. Present only when status is CANCELLED. The full table of codes, messages and whether to retry is in GET /cash-out/{id}.
Machine-readable failure code. Key your handling on this. New codes may be added — treat an unknown code as PROCESSING_ERROR.
Why a completed Cash-Out came back. Present only when status is REFUNDED.
PAYEE_REQUESTED— the payee asked their bank to return the transferFRAUD— returned because of fraud, including a MED (Special Return Mechanism) claimOPERATIONAL_ERROR— returned because of an operational error at a bankREVERSED_BY_INSTITUTION— reversed by the financial institutionOTHER— any other reason
CPF or CNPJ of the payee (numbers only).
COMPLETED/REFUNDED— the ConnectPSP account that settled the Cash-Out.CANCELLED— the ConnectPSP account the Cash-Out would have been paid from. Present only when a bank had already been assigned; no money left your account.PROCESSING/PENDING— absent.
When the Cash-Out was requested. Always present.
When the payment was completed. Present on COMPLETED, and kept on REFUNDED.
Opaque cursor for the next page. Absent when there are no more pages.
{ "items": [ { … } ], "nextCursor": "MTM4OTU1MTIwMDAwMDAwMDB8YXxufElWS1BSTU9DRFk" }
Request
Aggregated Cash-Out figures for a period: totals per status, and the same figures broken down by settlement bank.
The keys are the Cash-Out status values returned by GET /cash-out/{id}, the listing and the webhooks, in lowercase.
| Key | Status | Meaning |
|---|---|---|
processing | PROCESSING | Being executed at the financial institution |
pending | PENDING | Held on the ConnectPSP side (approval, analysis or reconciliation) |
completed | COMPLETED | Settled |
cancelled | CANCELLED | The money never left your account |
refunded | REFUNDED | Settled, then returned to your account |
A bucket only appears when it has at least one transaction.
settlement counts and sums completed transactions only.
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-out/summary
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl "https://api.homologacao.connectpsp.com/cash-out/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": { "completed": { … }, "processing": { … }, "pending": { … }, "cancelled": { … } }, "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.