Obtain JWT tokens to authenticate all other requests.
ConnectPSP API (2.0.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 |
For POST /cash-in and POST /cash-out, we strongly recommend sending the X-Idempotency-Key header (UUID v4). This guarantees that network retries do not result in duplicate transactions.
| 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 against available balance and fraud rules, then queued for settlement. The response is 202 Accepted — the payment is not yet settled at this point.
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 DigitalSignature and X-Idempotency-Key headers.
Once the payment is settled (or fails), ConnectPSP will POST either a CASHOUT_COMPLETED or CASHOUT_FAILED event to your webhookUrl.
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.
Your unique transaction reference. Duplicate references return 409 Conflict.
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.
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" }
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-out/{id}
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl https://api.homologacao.connectpsp.com/cash-out/IVKPRMOCDY \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>"Cash-Out details returned.
BACEN/SPI settlement proof.
COMPLETED: starts withEREFUNDED: starts withDFAILED:null(never settled)
Present only when status is FAILED.
PIX— payment via PIX key. ProvidepixKeyTypeandpixKey.BANK_ACCOUNT— payment via bank account data. ProvidebankAccount.
Type of PIX key. Required when type is PIX.
The PIX key value. Required when type is PIX.
Banking details returned after settlement. May be null before settlement.
- completed
- failed
- refunded
{ "transactionId": "dd30446e-6cc5-4664-bf3f-6b7f5e55a1a9", "internalCode": "IVKPRMOCDY", "externalReference": "withdraw_xyz789", "endToEndId": "E00416968202603101827cemeFscF6AG", "status": "COMPLETED", "amount": 500, "payee": { "name": "Maria Silva", "document": "12345678909", "destination": { … }, "bankData": { … } }, "requestedAt": "2026-03-10T14:00:00-03:00", "paidAt": "2026-03-10T14:02:30-03:00" }