Cash-Out
Endpoint
POST /transaction/cashout
Request
The request must include the following fields in the request body as JSON:
| Field | Type | Required | Description |
|---|---|---|---|
value | integer | Yes | Amount to cash out (in cents) |
pixKeyType | integer (enum) | Yes | PIX key type // 0 - CPF, 1 - CNPJ, 2 - EMAIL, 3 - TELEFONE, 4 - RANDOM_KEY |
pixKey | string | Yes | PIX key to send funds to |
cpfCnpj | string | No | CPF or CNPJ associated with the PIX key |
person | object | Yes | Details of the person who will receive the PIX |
person.name | string | Yes | Name of Person |
person.email | string | Yes | Email of Person |
person.phone | string | Yes | Phone 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"
}