Pular para o conteúdo principal

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
orderIdstringNoThe return your orderId
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",
"orderId": "your-order-id",
"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",
"orderId": "your-order-id",
"qrCode": "00020126840014br.gov.bcb.pix2562qrcode...",
"qrCodeBase64": "iVBORw0KGgoAAAANSUhEUgAAAOQAAADkCAYAAACIV4i..."
}

Get transaction

This endpoint allows you to retrieve a transaction by its ID or OrderId.

POST /transaction/get/by/id/{transactionId} or /transaction/get/by/orderId/{orderId}

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesAccess token for the API

Request

To retrieve a transaction, send a GET request with the transaction ID or OrderId in the URL and include the Authorization header.

Example Request

curl --location 'URL_API/transaction/get/by/id/9029' \
--header 'Authorization: YOUR_TOKEN_HERE'
{
"transactionId": 9029,
"orderId": "your-order-id",
"object": "cashin",
"status": "paid",
"method": "pix",
"value": 2000,
"endToEndId": "E60746948202509031314A23187b0bK8",
"processedAt": "2025-09-03T10:14:18.768543"
}

Error Handling

{
"message": "Transaction not found"
}

General 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"
}