Buscar antecipação
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/anticipations/{id} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/anticipations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.z2pay.com/v1/anticipations/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "stl_ant_k4w9m2x7q1v8b3n6c5z0p2r7t",
"recipientId": "rec_h7d4s9k2m6p1q8w3x5z0v4b7n",
"status": "requested",
"amount": 100000,
"fee": 2500,
"netAmount": 97500,
"reachedAmount": null,
"requestedAt": "2026-10-21T13:01:12.000Z",
"reachedAt": null,
"liquidatedAt": null,
"createdAt": "2026-10-21T13:01:12.000Z",
"updatedAt": "2026-10-21T13:01:12.000Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Anticipation not found"
}
}Antecipações
Buscar antecipação por ID
Dados e etapa atual de uma antecipação da sua conta.
GET
/
anticipations
/
{id}
Buscar antecipação
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/anticipations/{id} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/anticipations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.z2pay.com/v1/anticipations/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "stl_ant_k4w9m2x7q1v8b3n6c5z0p2r7t",
"recipientId": "rec_h7d4s9k2m6p1q8w3x5z0v4b7n",
"status": "requested",
"amount": 100000,
"fee": 2500,
"netAmount": 97500,
"reachedAmount": null,
"requestedAt": "2026-10-21T13:01:12.000Z",
"reachedAt": null,
"liquidatedAt": null,
"createdAt": "2026-10-21T13:01:12.000Z",
"updatedAt": "2026-10-21T13:01:12.000Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Anticipation not found"
}
}GET /anticipations/{id}
Faz parte do recurso Antecipações — o passo a passo e os status estão lá.
Devolve a antecipação com a etapa atual em status. Antecipação de outra conta responde 404.
Prefira o webhook a consultar em laço. Toda mudança de
status dispara
anticipation.status_changed com o mesmo objeto desta resposta. Use esta rota para conferir depois
de um webhook perdido, não para acompanhar.Exemplo
curl https://api.sandbox.z2pay.com/v1/anticipations/stl_ant_k4w9m2x7q1v8b3n6c5z0p2r7t \
-H "x-api-key: SUA_CHAVE_DE_SANDBOX"
Resposta 200
{
"id": "stl_ant_k4w9m2x7q1v8b3n6c5z0p2r7t",
"recipientId": "rec_h7d4s9k2m6p1q8w3x5z0v4b7n",
"status": "requested",
"amount": 100000,
"fee": 2500,
"netAmount": 97500,
"reachedAmount": null,
"requestedAt": "2026-10-21T13:01:12.000Z",
"liquidatedAt": null
}
Response
Antecipação