Get Withdrawal
Use this endpoint to get a specific withdrawal by its id.
Available Environments
- Production
https://api.gateway.com.br/core
Endpoint
- Method:
GET - Endpoint:
/withdrawal/{id} - Authentication: Bearer token
Path Params
| Name | Type | Required | Description | Validations |
|---|---|---|---|---|
id | string (UUID) | Yes | Withdrawal identifier | Must be a valid UUID |
Request Example
- cURL
- JavaScript
curl --request GET \
--url https://api.gateway.com.br/core/withdrawal/553e8400-e29b-41d4-a716-436251480000 \
--header 'Authorization: Bearer your-jwt-token'
const response = await fetch('https://api.gateway.com.br/core/withdrawal/553e8400-e29b-41d4-a716-436251480000', {
method: 'GET',
headers: {
'Authorization': 'Bearer your-jwt-token'
}
});
const data = await response.json();
Success Response
| Field | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | Unique identifier of the withdrawal |
acquirerCode | string | No | Acquirer code |
acquirer | string | Yes | Acquirer of the withdrawal |
amount | number | Yes | Withdrawal amount (integer, in cents) |
method | string (enum) - PIX | Yes | Withdrawal method |
webhookUrl | string | No | Configured webhook URL |
externalCode | string | No | Your reference code |
paymentReceipt | object | No | Payment receipt (see Sub-Object PaymentReceiptUrl) |
refundReceipt | object | No | Refund receipt (see Sub-Object PaymentReceiptUrl) |
createdAt | string (ISO) | Yes | Creation date |
status | string (enum) - PENDING, PROCESSING, PROCESSED, FAILED, CANCELED, REFUNDED, REJECTED, PENDING_COMPLIANCE | Yes |
|
statusHistory | array | Yes | Status history (see Sub-Objects StatusHistory) |
updatedAt | string (ISO) | Yes | Last update date |
amountWithdrawn | number | No | Amount actually withdrawn |
processedDate | string (ISO) | No | Processing date |
errorMessage | string | No | Error message |
endToEnd | string | No | End-to-end identifier of the withdrawal |
endToEndRefund | string | No | End-to-end identifier of the refund |
refundDate | string (ISO) | No | Refund date |
refundAmount | number | No | Refund amount (integer, in cents) |
payer | object | No | Payer data (see Sub-Objects AccountHolder) |
receiver | object | No | Receiver data (see Sub-Objects AccountHolder) |
pixKey | object | No | PIX key data (see Sub-Objects PixKeyVo) |
trackingKey | string | No | SPEI clave de rastreo. It always comes back null on PIX withdrawals |
feeAmount | number | No | Fee amount |
Sub-Objects
StatusHistory (item)
| Field | Type | Required | Description |
|---|---|---|---|
status | string (enum) - PENDING, PROCESSING, PROCESSED, FAILED, CANCELED, REFUNDED, REJECTED, PENDING_COMPLIANCE | Yes | Withdrawal status |
date | string (ISO) | Yes | Date of the status |
durationInMilliseconds | number | Yes | Duration of the status in milliseconds |
AccountHolder
| Field | Type | Required | Description |
|---|---|---|---|
type | string (enum) - PF, PJ | Yes | Holder type |
name | string | Yes | Holder name |
document | string | Yes | Holder document |
bankAccount | object | Yes | Bank data (see Sub-Objects BankAccount) |
pix | object | Yes | PIX key of the holder (see Sub-Objects PixKeyVo) |
BankAccount
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Account type |
digit | string | Yes | Account check digit |
ispb | string | Yes | ISPB of the bank |
PixKeyVo
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | PIX key |
type | string (enum) - CPF, CNPJ, EMAIL, PHONE, EVP | Yes | PIX key type |
PaymentReceiptUrl
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL of the receipt |
expirationDate | string (ISO) | Yes | Expiration date of the receipt |
Response Example
Masked data
Sensitive values may be masked with ***.
{
"id": "553e8400-e29b-41d4-a716-436251480000",
"acquirerCode": "ACQ-123",
"acquirer": "ACQUIRER_EXEMPLO",
"amount": 10000,
"method": "PIX",
"webhookUrl": "https://sua-api.com/webhooks/withdrawal",
"externalCode": "SAQUE-123",
"paymentReceipt": {
"url": "https://files.exemplo.com.br/receipts/withdrawal-553e8400-e29b-41d4-a716-436251480000.pdf",
"expirationDate": "2026-04-01T00:00:00.000Z"
},
"refundReceipt": {
"url": "https://files.exemplo.com.br/receipts/withdrawal-refund-553e8400-e29b-41d4-a716-436251480000.pdf",
"expirationDate": "2026-04-01T00:00:00.000Z"
},
"createdAt": "2026-03-06T12:49:04.681Z",
"status": "REFUNDED",
"statusHistory": [
{
"status": "PENDING",
"date": "2026-03-06T12:49:04.681Z",
"durationInMilliseconds": 1000
},
{
"status": "PROCESSING",
"date": "2026-03-06T12:49:04.681Z",
"durationInMilliseconds": 10000
},
{
"status": "PROCESSED",
"date": "2026-03-06T12:49:04.681Z",
"durationInMilliseconds": 10000
},
{
"status": "REFUNDED",
"date": "2026-03-06T12:49:04.681Z",
"durationInMilliseconds": 5000
}
],
"updatedAt": "2026-03-06T12:49:04.681Z",
"amountWithdrawn": 10000,
"processedDate": "2026-03-06T12:49:04.681Z",
"errorMessage": "Falha ao registrar o estorno no PSP",
"endToEnd": "0123456789",
"endToEndRefund": "0123456789-REFUND",
"refundDate": "2026-03-06T14:49:04.681Z",
"refundAmount": 10000,
"payer": {
"type": "PF",
"name": "Fulano de Tal",
"document": "***456789**",
"bankAccount": {
"type": "CHECKING",
"digit": "7",
"ispb": "12345678"
},
"pix": {
"key": "12345678910",
"type": "CPF"
}
},
"receiver": {
"type": "PJ",
"name": "Empresa Exemplo LTDA",
"document": "12345678000199",
"bankAccount": {
"type": "CHECKING",
"digit": "0",
"ispb": "12345678"
},
"pix": {
"key": "contato@exemplo.com",
"type": "EMAIL"
}
},
"pixKey": {
"key": "12345678910",
"type": "CPF"
},
"feeAmount": 150
}
Possible Errors
| Code | Description | Solution |
|---|---|---|
| 401 | Invalid credentials | Check your credentials |
| 403 | No permission/authorization | Contact support |
| 404 | Record not found | Check the id you provided |
| 422 | Invalid or missing data | Check the format of the data |
| 422 | Validations | Contact support |
| 500 | Internal error | Contact support |