Skip to main content

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
cpfCnpjstringNoCPF 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

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

Response

On a successful request, the endpoint returns:

  • HTTP Status: 200 OK

Example Response

{
"transactionId": 100,
"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"
}

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