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
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.
Fixed GUID that uniquely identifies your integration. Provided during ConnectPSP onboarding.
Payment amount in BRL (Brazilian Reais). Decimal format (e.g. 150.50).
Your internal order or transaction ID. Must be unique per application.
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" }
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-in/{id}
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl https://api.homologacao.connectpsp.com/cash-in/US7B1JQ \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>"Cash-In details returned successfully.
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.
Banking details returned after settlement. May be null before settlement.
- paid
- refunded
{ "transactionId": "kk6g232xel65a0daee4dd13kk2912714964", "internalCode": "US7B1JQ", "externalReference": "order_abc123", "endToEndId": "E00416968202603101827cemeFscF6AG", "status": "PAID", "amount": 150.5, "payer": { "name": "João Silva", "document": "12345678909", "bankData": { … } }, "requestedAt": "2026-03-10T11:20:00-03:00", "paidAt": "2026-03-10T11:22:15-03:00" }
Request
Requests a full refund of a paid Cash-In transaction (PIX Devolution via BACEN/SPI).
⚠️ Important: Only transactions with status
PAIDcan be refunded. Partial refunds are not supported — the full original amount will be returned to the payer.
The refund is sent to the banking network synchronously. The 202 Accepted response includes the new endToEndId generated for the devolution (prefixed with D).
This endpoint requires the DigitalSignature header. See the Authentication Guide for details on how to compute it.
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.
Reason for the refund.
- Staging Environment (Testing)https://api.homologacao.connectpsp.com/cash-in/{id}/refund
- cURL
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -X POST https://api.homologacao.connectpsp.com/cash-in/US7B1JQ/refund \
-H "Authorization: Bearer <token>" \
-H "ApplicationToken: <app-token>" \
-H "DigitalSignature: <computed-signature>" \
-H "X-Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reason": "CUSTOMER_REQUEST",
"description": "Customer requested refund via support ticket #1234."
}'{ "transactionId": "kk6g232xel65a0daee4dd13kk2912714964", "internalCode": "US7B1JQ", "externalReference": "order_abc123", "endToEndId": "D00416968202603101827cemeFscF6AG", "status": "PROCESSING", "amount": 150.5, "requestedAt": "2026-03-10T13:30:00-03:00", "message": "The refund for cash-in US7B1JQ has been successfully initiated." }