Cash-In
Endpoint
POST /transaction/qrcode/cashin
Request
The request must include the following information in the request body in JSON format:
| Field | Type | Required | Description |
|---|---|---|---|
payerName | string | Yes | Name of the payer |
payerDocument | string | Yes | Identification document of payer |
payerEmail | string | Yes | Email of payer |
payerPhone | string | Yes | Phone document of payer |
productName | string | Yes | Name of the product/service |
productDescription | string | Yes | Description of the product/service |
value | integer | Yes | Transaction amount (in cents) |
postbackUrl | string | No | The return URL after the transaction / Postback URL |
splits | array | No | Transaction split list |
Example Request
{
"payerName": "John Doe",
"payerDocument": "12345678901",
"payerEmail": "test@gmail.com",
"payerPhone": "11999999999",
"productName": "Cash-In Product",
"productDescription": "Description of Cash-In Product",
"value": 5000,
"postbackUrl": "https://your-postback-url.com",
"splits": [
{
"clientId": "3fbfe257-adf0-4581-9169-7bf8e265f64f",
"value": 500
}
]
}
Response
If the request is successful, the endpoint will return:
- HTTP Status:
200 OK
{
"transactionId": 49,
"externalId": "0f809427-d48d-40f8-8a4d-73166933a8fe",
"qrCode": "00020126840014br.gov.bcb.pix2562qrcode...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUgAAAOQAAADkCAYAAACIV4i..."
}
Error Handling
Common errors include missing required fields, invalid data formats, or unauthorized requests. Errors will return the appropriate HTTP status codes and descriptive messages.
HTTP Status: 400 Bad Request
Example Error Response
{
"message": "No active acquirer"
}