Buscar refund por ID
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/refunds/{id} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/refunds/{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/refunds/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "rfd_j3cpkaysqmix17mxhcmv8qypl",
"transactionId": "txn_aqbcw2lky42xfidw5pcdss8h1",
"paymentId": "pay_jxt9b5qv1x0h0h8ustleqjgr8",
"amount": 14990,
"currency": "BRL",
"status": "pending",
"reason": "Cliente solicitou cancelamento da compra",
"requestedByType": "api",
"paymentMethod": "credit_card",
"customerId": "cust_lhsmn6ugmjotm5qvnunrr2hz1",
"customerName": "Maria Silva",
"customerEmail": "maria.silva@example.com",
"customerDocument": "12345678909",
"customerDocumentType": "cpf",
"additionalInfo": {
"checkoutLinkId": "chk_byd8p3p79re859jpkmr0j65n3"
},
"failureReason": null,
"reviewedAt": null,
"refundedAt": null,
"createdAt": "2025-06-29T13:45:30.000Z",
"updatedAt": "2025-06-29T13:45:30.000Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Refund not found"
}
}Reembolsos
Buscar reembolso por ID
Retorna um reembolso específico pelo seu ID, com o estado atual e as datas do ciclo.
GET
/
refunds
/
{id}
Buscar refund por ID
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/refunds/{id} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/refunds/{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/refunds/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "rfd_j3cpkaysqmix17mxhcmv8qypl",
"transactionId": "txn_aqbcw2lky42xfidw5pcdss8h1",
"paymentId": "pay_jxt9b5qv1x0h0h8ustleqjgr8",
"amount": 14990,
"currency": "BRL",
"status": "pending",
"reason": "Cliente solicitou cancelamento da compra",
"requestedByType": "api",
"paymentMethod": "credit_card",
"customerId": "cust_lhsmn6ugmjotm5qvnunrr2hz1",
"customerName": "Maria Silva",
"customerEmail": "maria.silva@example.com",
"customerDocument": "12345678909",
"customerDocumentType": "cpf",
"additionalInfo": {
"checkoutLinkId": "chk_byd8p3p79re859jpkmr0j65n3"
},
"failureReason": null,
"reviewedAt": null,
"refundedAt": null,
"createdAt": "2025-06-29T13:45:30.000Z",
"updatedAt": "2025-06-29T13:45:30.000Z"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Refund not found"
}
}GET /refunds/:id
Faz parte do recurso Reembolsos — o objeto, os status e o ciclo estão lá.Response
Dados do refund