Pular para o conteúdo principal

Cash-Out

Endpoint

POST /transaction/cashout

Request

The request must include the following fields in the request body as JSON:

FieldTypeRequiredDescription
valueintegerYesAmount to cash out (in cents)
pixKeyTypeinteger (enum)YesPIX key type // 0 - CPF, 1 - CNPJ, 2 - EMAIL, 3 - TELEFONE, 4 - RANDOM_KEY
pixKeystringYesPIX key to send funds to
cpfCnpjstringYesCPF or CNPJ associated with the PIX key
personobjectYesDetails of the person who will receive the PIX
person.namestringYesName of Person
person.emailstringYesEmail of Person
person.phonestringYesPhone of Person
orderIdstringYesYour orderId
postbackUrlstringNoThe return URL after the transaction / Postback URL

Example Request

{
"value": 15000, // R$ 150,00
"pixKeyType": 1,
"pixKey": "user@example.com",
"cpfCnpj": "12345678901",
"person": {
"name": "FULANO DE TAL",
"email": "fulanodetal@gmail.com",
"phone": "5511987452145"
},
"orderId": "your-order-id"
}

Response

On a successful request, the endpoint returns:

  • HTTP Status: 200 OK

Example Response

{
"transactionId": 100,
"orderId": "your-order-id",
"gross": 15000,
"tax": "30",
"liquid": "14970",
"status": "0", // 0 - Pending | 1 - Paid | 2 - Failed | 3 - Canceled | 4 - Refund
"createdAt": "2025-04-02T13:26:52.0365664Z",
"success": "true",
"description": null,
}

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/6691' \
--header 'Authorization: YOUR_TOKEN_HERE'
curl --location 'URL_API/transaction/get/by/orderId/your-order-id' \
--header 'Authorization: YOUR_TOKEN_HERE'
{
"transactionId": 6691,
"orderId": "your-order-id",
"object": "cashin",
"status": "paid",
"method": "pix",
"value": 1000,
"endToEndId": "E62746948202509031314A23187b0bK8",
"processedAt": "2025-09-02T10:14:18.768543"
}

Get balance

This endpoint allows you to retrieve balance account.

GET /transaction/get/balance

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesAccess token for the API

Request

To retrieve a transaction, send a GET request and include the Authorization header.

Example Request

curl --location 'URL_API/transaction/get/balance' \
--header 'Authorization: YOUR_TOKEN_HERE'
{
"balance": 2596878,
"retention": 5339,
"toAnticipate": 4990,
"finalBalance": 2586549
}

Error Handling

{
"message": "Transaction not found"
}

General error Handling

Possible errors include missing required fields, incorrect data formats, and unauthorized access. Errors will return corresponding HTTP status codes and informative messages.

Example Error Response

{
"message": "Validation Failed - value is required"
}