API reference
All endpoints, parameters and responses.
Base URL: https://api.raspay.io. Authenticate with Authorization: Bearer and see Errors for the meaning of each code. The full specification is in openapi.yaml, ready to import into Postman or to generate clients.
Create a charge
POST/v1/charges
Creates a Pix charge and returns the QR code, the copy and paste code and the checkout page.
Headers
- Idempotency-Keystring
- Unique key of the operation, up to 200 characters. See Idempotency.
Body
- amountintegerrequired
- Amount in cents, from 100 (R$ 1.00) to 100000000 (R$ 1,000,000.00).
- referencestring
- Identifier in your system, up to 120 characters.
- descriptionstring
- Description shown at checkout, up to 255 characters.
- customer.namestring
- Payer name, up to 120 characters.
- customer.documentstring
- CPF (individual tax ID, 11 digits) or CNPJ (company tax ID, 14 digits), digits only.
- customer.emailstring
- Payer email.
- customer.phonestring
- Phone with area code, 10 to 13 digits, digits only.
- metadataobject
- Key and value text pairs, returned in the charge and in webhooks. Up to 50 keys, each key with 1 to 100 characters and each value with up to 500 characters.
- webhookUrlstring
- HTTPS URL that receives the events of this charge, in addition to the endpoints registered in the dashboard.
Specific errors
invalid_requestaccount_not_activeaccount_blockedcharges_blockednegative_balance_limitamount_limit_exceededidempotency_conflictidempotency_in_progressprovider_unavailableprovider_error
curl -X POST "https://api.raspay.io/v1/charges" \
-H "Authorization: Bearer $GATEWAY_API_KEY" \
-H "Idempotency-Key: order-0001" \
-H "Content-Type: application/json" \
-d '{
"amount": 15000,
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
}
}'{
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"object": "charge",
"livemode": false,
"status": "pending",
"amount": 15000,
"fee": 0,
"net": 15000,
"currency": "BRL",
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
},
"metadata": {
"order": "0001"
},
"pix": {
"copyPaste": "00020126580014br.gov.bcb.pix0136...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUg..."
},
"checkoutUrl": "https://dashboard.example.com/pay/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": null,
"paidAt": null,
"refundedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}Retrieve a charge
GET/v1/charges/{id}
Returns the current state of a charge from the same environment as the key.
Path parameters
- iduuidrequired
- Charge identifier.
Specific errors
not_found
curl "https://api.raspay.io/v1/charges/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"object": "charge",
"livemode": false,
"status": "paid",
"amount": 15000,
"fee": 299,
"net": 14701,
"currency": "BRL",
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
},
"metadata": {
"order": "0001"
},
"pix": {
"copyPaste": "00020126580014br.gov.bcb.pix0136...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUg..."
},
"checkoutUrl": "https://dashboard.example.com/pay/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"payer": {
"name": "Ana Souza",
"document": "12345678909",
"ispb": "00000000",
"branch": "0001",
"account": "123456",
"accountType": "checking",
"bankName": null
},
"beneficiary": {
"name": "Example Payment Institution Ltda",
"document": "11222333000181",
"ispb": "12345678",
"branch": "0001",
"account": "19701",
"accountType": "payment",
"bankName": null
},
"endToEndId": "E00000000202611011506abcdef12345",
"ispb": "43978697",
"failureReason": null,
"paidAt": "2026-11-01T15:06:12.000Z",
"refundedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}List charges
GET/v1/charges
Lists the charges of the environment, newest first.
Query parameters
- pageinteger
- Page, starting at 1. Default: 1.
- limitinteger
- Items per page, from 1 to 100. Default: 25.
- statusstring
- Filters by pending, paid, refunded or failed.
- referencestring
- Returns only those created with this reference (exact match, up to 120 characters).
- idempotencyKeystring
- Returns the one created with this Idempotency-Key (up to 200 characters). The key is unique: at most one is returned.
- qrImagestring
- false returns pix.qrCodeBase64 as null, to keep the page light. The copy and paste code is still returned.
Specific errors
invalid_request
curl "https://api.raspay.io/v1/charges?status=paid&limit=25" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"data": [
{
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"object": "charge",
"livemode": false,
"status": "paid",
"amount": 15000,
"fee": 299,
"net": 14701,
"currency": "BRL",
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
},
"metadata": {
"order": "0001"
},
"pix": {
"copyPaste": "00020126580014br.gov.bcb.pix0136...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUg..."
},
"checkoutUrl": "https://dashboard.example.com/pay/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": null,
"paidAt": null,
"refundedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}
],
"page": 1,
"limit": 25,
"total": 1,
"hasMore": false
}Create a Pix payout
POST/v1/payouts
Holds the amount and the fee on the balance and sends the Pix. In live mode, by default, the payout waits for approval before it is sent.
Headers
- Idempotency-Keystringrequired
- Unique key of the operation, up to 200 characters. See Idempotency.
Body
- amountintegerrequired
- Amount in cents that reaches the recipient, from 100 to 100000000. The fee is added to the held amount.
- pixKeystringrequired
- Destination Pix key.
- pixKeyTypestringrequired
- Key type: cpf, cnpj, email, phone or random.
- documentstring
- CPF or CNPJ of the recipient, digits only.
- namestring
- Key holder name, from 3 to 120 characters.
- referencestring
- Identifier in your system, up to 120 characters.
- webhookUrlstring
- HTTPS URL that receives the events of this payout, in addition to the registered endpoints.
Specific errors
invalid_requestinsufficient_fundsaccount_not_activeaccount_blockedpayouts_blockednegative_balance_limitidempotency_conflict
curl -X POST "https://api.raspay.io/v1/payouts" \
-H "Authorization: Bearer $GATEWAY_API_KEY" \
-H "Idempotency-Key: payout-supplier-77" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"pixKey": "finance@example.com",
"pixKeyType": "email",
"reference": "SUPPLIER-77"
}'{
"id": "e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8",
"object": "payout",
"livemode": true,
"type": "pix",
"status": "pending_approval",
"amount": 50000,
"fee": 150,
"currency": "BRL",
"reference": "SUPPLIER-77",
"pix": {
"key": "finance@example.com",
"keyType": "email",
"document": null,
"name": null
},
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": null,
"completedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}Retrieve a payout
GET/v1/payouts/{id}
Returns the current state of a Pix payout.
Path parameters
- iduuidrequired
- Payout identifier.
Specific errors
not_found
curl "https://api.raspay.io/v1/payouts/e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"id": "e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8",
"object": "payout",
"livemode": true,
"type": "pix",
"status": "paid",
"amount": 50000,
"fee": 150,
"currency": "BRL",
"reference": "SUPPLIER-77",
"pix": {
"key": "finance@example.com",
"keyType": "email",
"document": null,
"name": null
},
"payer": {
"name": "Example Payment Institution Ltda",
"document": "11222333000181",
"ispb": "12345678",
"branch": "0001",
"account": "19701",
"accountType": "payment",
"bankName": null
},
"beneficiary": {
"name": "Example Supplier Ltda",
"document": "11222333000181",
"ispb": "00000000",
"branch": null,
"account": null,
"accountType": null,
"bankName": null
},
"endToEndId": "E12345678202611011520abcdef12345",
"ispb": "12345678",
"failureReason": null,
"completedAt": "2026-11-01T15:20:44.000Z",
"createdAt": "2026-11-01T15:04:05.000Z"
}List payouts
GET/v1/payouts
Lists the Pix payouts of the environment, newest first.
Query parameters
- pageinteger
- Page, starting at 1. Default: 1.
- limitinteger
- Items per page, from 1 to 100. Default: 25.
- statusstring
- Filters by pending_approval, processing, paid, failed or rejected.
- referencestring
- Returns only those created with this reference (exact match, up to 120 characters).
- idempotencyKeystring
- Returns the one created with this Idempotency-Key (up to 200 characters). The key is unique: at most one is returned.
Specific errors
invalid_request
curl "https://api.raspay.io/v1/payouts?status=processing" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"data": [
{
"id": "e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8",
"object": "payout",
"livemode": true,
"type": "pix",
"status": "processing",
"amount": 50000,
"fee": 150,
"currency": "BRL",
"reference": "SUPPLIER-77",
"pix": {
"key": "finance@example.com",
"keyType": "email",
"document": null,
"name": null
},
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": null,
"completedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}
],
"page": 1,
"limit": 25,
"total": 1,
"hasMore": false
}Cancel a payout
POST/v1/payouts/{id}/cancel
Cancels a payout that is still waiting for approval and returns the held amount to the balance. The payout gets status rejected and failureReason canceled_by_merchant.
Path parameters
- iduuidrequired
- Payout identifier.
Specific errors
not_foundforbidden
curl -X POST "https://api.raspay.io/v1/payouts/e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8/cancel" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"id": "e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8",
"object": "payout",
"livemode": true,
"type": "pix",
"status": "rejected",
"amount": 50000,
"fee": 150,
"currency": "BRL",
"reference": "SUPPLIER-77",
"pix": {
"key": "finance@example.com",
"keyType": "email",
"document": null,
"name": null
},
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": "canceled_by_merchant",
"completedAt": "2026-11-01T15:08:30.000Z",
"createdAt": "2026-11-01T15:04:05.000Z"
}Download receipt
GET/v1/payouts/{id}/receipt
Returns the Pix payout receipt as a PNG (900×900), the same one as in the dashboard. Only for Pix payouts that are paid, have an E2E and were not returned by the destination bank. CPF is masked. Test payouts are marked as having no value. Limit of 120 receipts per minute per account.
Path parameters
- iduuidrequired
- Payout identifier.
Query parameters
- langstring
- pt (default) or en. The default is Portuguese, the language of the Pix recipient.
- downloadstring
- With 1, the response comes as an attachment (Content-Disposition).
Specific errors
not_foundreceipt_unavailable
curl "https://api.raspay.io/v1/payouts/e4b9a1d6-6f02-4c37-8b15-90d3c7a2f4e8/receipt" \
-H "Authorization: Bearer $GATEWAY_API_KEY" \
-o receipt.pngPNG image (Content-Type: image/png)Retrieve balance
GET/v1/balance
Returns the available balance and the held amount: what is reserved for payouts in progress plus what is blocked by MED (Pix disputes).
curl "https://api.raspay.io/v1/balance" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"object": "balance",
"livemode": false,
"currency": "BRL",
"available": 125000,
"held": 15150
}List balance transactions
GET/v1/balance/transactions
Lists every balance transaction, newest first.
Query parameters
- pageinteger
- Page, starting at 1. Default: 1.
- limitinteger
- Items per page, from 1 to 100. Default: 25.
- fromstring
- Only transactions from this instant on, inclusive. ISO 8601 with time zone (2026-11-25T00:00:00-03:00); a date alone means 00:00 UTC.
- tostring
- Only transactions before this instant, exclusive. Same format as from.
Specific errors
invalid_request
curl "https://api.raspay.io/v1/balance/transactions" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"data": [
{
"id": 1842,
"object": "balance_transaction",
"type": "charge_paid",
"description": "Pix recebido",
"amount": 15000,
"held": 0,
"balanceAfter": 140000,
"heldAfter": 0,
"source": {
"type": "charge",
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10"
},
"createdAt": "2026-11-01T15:06:12.000Z"
}
],
"page": 1,
"limit": 25,
"total": 1,
"hasMore": false
}List customers
GET/v1/customers
Lists payers grouped by document, 25 items per page.
Query parameters
- qstring
- Exact document, or part of the name or email.
- pageinteger
- Page, starting at 1. Default: 1.
curl "https://api.raspay.io/v1/customers?q=ana" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"data": [
{
"document": "12345678909",
"name": "Ana Souza",
"email": "ana@example.com",
"charges": 4,
"paid": 3,
"total": 45000,
"last": "2026-11-01 15:04:05.000+00"
}
],
"page": 1
}Simulate a payment
POST/v1/sandbox/charges/{id}/pay
Marks a pending test charge as paid. Credits the test balance and sends charge.paid.
Path parameters
- iduuidrequired
- Charge identifier.
Specific errors
forbiddennot_foundinvalid_request
curl -X POST "https://api.raspay.io/v1/sandbox/charges/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10/pay" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"object": "charge",
"livemode": false,
"status": "paid",
"amount": 15000,
"fee": 299,
"net": 14701,
"currency": "BRL",
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
},
"metadata": {
"order": "0001"
},
"pix": {
"copyPaste": "00020126580014br.gov.bcb.pix0136...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUg..."
},
"checkoutUrl": "https://dashboard.example.com/pay/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"payer": {
"name": "Ana Souza",
"document": "12345678909",
"ispb": null,
"branch": null,
"account": null,
"accountType": null,
"bankName": null
},
"beneficiary": null,
"endToEndId": "E00000000202611011506abcdef12345",
"ispb": null,
"failureReason": null,
"paidAt": "2026-11-01T15:06:12.000Z",
"refundedAt": null,
"createdAt": "2026-11-01T15:04:05.000Z"
}Simulate a refund
POST/v1/sandbox/charges/{id}/refund
Refunds a paid test charge. Debits the test balance and sends charge.refunded.
Path parameters
- iduuidrequired
- Charge identifier.
Specific errors
forbiddennot_foundinvalid_request
curl -X POST "https://api.raspay.io/v1/sandbox/charges/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10/refund" \
-H "Authorization: Bearer $GATEWAY_API_KEY"{
"id": "7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"object": "charge",
"livemode": false,
"status": "refunded",
"amount": 15000,
"fee": 299,
"net": 14701,
"currency": "BRL",
"reference": "ORDER-0001",
"description": "Annual plan",
"customer": {
"name": "Ana Souza",
"document": "12345678909",
"email": "ana@example.com"
},
"metadata": {
"order": "0001"
},
"pix": {
"copyPaste": "00020126580014br.gov.bcb.pix0136...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUg..."
},
"checkoutUrl": "https://dashboard.example.com/pay/7c1e4f2a-3b58-4e0d-9a6c-2f8d1b7e5a10",
"payer": null,
"beneficiary": null,
"endToEndId": null,
"ispb": null,
"failureReason": null,
"paidAt": "2026-11-01T15:06:12.000Z",
"refundedAt": "2026-11-01T15:30:00.000Z",
"createdAt": "2026-11-01T15:04:05.000Z"
}