Skip to main content

Cash-In

Endpoint

POST /transaction/qrcode/cashin

Request

The request must include the following information in the request body in JSON format:

FieldTypeRequiredDescription
payerNamestringYesName of the payer
payerDocumentstringYesIdentification document of payer
payerEmailstringYesEmail of payer
payerPhonestringYesPhone document of payer
productNamestringYesName of the product/service
productDescriptionstringYesDescription of the product/service
valueintegerYesTransaction amount (in cents)
postbackUrlstringNoThe return URL after the transaction / Postback URL
splitsarrayNoTransaction 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"
}