Buscar payment por ID
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/payments/{paymentId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/payments/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.z2pay.com/v1/payments/{paymentId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "pay_uw2uc9v7log0i8t091r8jojk1",
"transactionId": "txn_raqtaj22an9s5dexc1vthopl8",
"replacedByPaymentId": null,
"amount": 19990,
"currency": "BRL",
"installments": 3,
"paymentMethod": "credit_card",
"cardId": "crd_jbuvk9a0cf2upp8j8e6joduwl",
"status": "paid",
"additionalInfo": null,
"statementDescriptor": null,
"billingAddress": null,
"boletoUrl": null,
"boletoDigitableLine": null,
"boletoBarcode": null,
"pixUrl": null,
"pixCopyPaste": null,
"splitConfigId": "spl_wzt7w09keygyob5np2aqd7s0r",
"originalAmount": null,
"interestAmount": 0,
"retryable": null,
"declineCode": null,
"errorMessage": null,
"createdAt": "2026-06-24T12:00:00.000Z",
"updatedAt": "2026-06-24T12:00:02.000Z",
"paidAt": "2026-06-24T12:00:02.000Z",
"expiresAt": null,
"canceledAt": null,
"refundedAt": null,
"chargedbackAt": null,
"protestedAt": null,
"card": {
"id": "crd_jbuvk9a0cf2upp8j8e6joduwl",
"brand": "visa",
"firstDigits": "411111",
"lastDigits": "1111",
"holderName": "MARIA SILVA",
"expirationMonth": "12",
"expirationYear": "2030",
"status": "active",
"createdAt": "2026-05-10T09:30:00.000Z",
"updatedAt": "2026-05-10T09:30:00.000Z"
},
"splits": [
{
"id": "spp_q8orlblnnwfexga0z85b74yj2",
"paymentId": "pay_uw2uc9v7log0i8t091r8jojk1",
"recipientId": "rec_lejahywlmrfeepcw11v5sdihf",
"recipientName": "Loja Exemplo",
"value": 100,
"amount": 19990,
"currency": "BRL",
"type": "sale",
"typeLabel": "Venda",
"valueType": "percentage",
"processingFee": true,
"liable": true,
"createdAt": "2026-06-24T12:00:02.000Z",
"updatedAt": "2026-06-24T12:00:02.000Z"
}
]
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Payment not found"
}
}Pagamentos
Buscar pagamento por ID
Retorna os dados de um pagamento específico.
GET
/
payments
/
{paymentId}
Buscar payment por ID
curl --request GET \
--url https://api.sandbox.z2pay.com/v1/payments/{paymentId} \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.z2pay.com/v1/payments/{paymentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sandbox.z2pay.com/v1/payments/{paymentId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "pay_uw2uc9v7log0i8t091r8jojk1",
"transactionId": "txn_raqtaj22an9s5dexc1vthopl8",
"replacedByPaymentId": null,
"amount": 19990,
"currency": "BRL",
"installments": 3,
"paymentMethod": "credit_card",
"cardId": "crd_jbuvk9a0cf2upp8j8e6joduwl",
"status": "paid",
"additionalInfo": null,
"statementDescriptor": null,
"billingAddress": null,
"boletoUrl": null,
"boletoDigitableLine": null,
"boletoBarcode": null,
"pixUrl": null,
"pixCopyPaste": null,
"splitConfigId": "spl_wzt7w09keygyob5np2aqd7s0r",
"originalAmount": null,
"interestAmount": 0,
"retryable": null,
"declineCode": null,
"errorMessage": null,
"createdAt": "2026-06-24T12:00:00.000Z",
"updatedAt": "2026-06-24T12:00:02.000Z",
"paidAt": "2026-06-24T12:00:02.000Z",
"expiresAt": null,
"canceledAt": null,
"refundedAt": null,
"chargedbackAt": null,
"protestedAt": null,
"card": {
"id": "crd_jbuvk9a0cf2upp8j8e6joduwl",
"brand": "visa",
"firstDigits": "411111",
"lastDigits": "1111",
"holderName": "MARIA SILVA",
"expirationMonth": "12",
"expirationYear": "2030",
"status": "active",
"createdAt": "2026-05-10T09:30:00.000Z",
"updatedAt": "2026-05-10T09:30:00.000Z"
},
"splits": [
{
"id": "spp_q8orlblnnwfexga0z85b74yj2",
"paymentId": "pay_uw2uc9v7log0i8t091r8jojk1",
"recipientId": "rec_lejahywlmrfeepcw11v5sdihf",
"recipientName": "Loja Exemplo",
"value": 100,
"amount": 19990,
"currency": "BRL",
"type": "sale",
"typeLabel": "Venda",
"valueType": "percentage",
"processingFee": true,
"liable": true,
"createdAt": "2026-06-24T12:00:02.000Z",
"updatedAt": "2026-06-24T12:00:02.000Z"
}
]
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Payment not found"
}
}GET /payments/:paymentId
Faz parte do recurso Pagamentos — o objeto e os status estão lá.
Basta o ID do pagamento. A transação a que ele pertence vem em
transactionId — é por ele que
você chega aos itens e aos outros pagamentos, em GET /transactions/:id.Para boleto, use
boletoUrl, boletoDigitableLine e boletoBarcode. Para PIX, use pixUrl (QR Code) e pixCopyPaste (copia-e-cola). Esses campos só ficam preenchidos depois que o pagamento é processado pelo gateway.Este endpoint alcança tentativas que a transação esconde.
GET /transactions/:id omite os
pagamentos em replaced; aqui eles aparecem. É para isso que ele existe — siga o
replacedByPaymentId do pagamento novo para chegar à tentativa anterior.O pagamento vem igual ao embutido na transação.
card traz o cartão usado (bandeira, primeiros
e últimos dígitos, titular, validade) e não vem quando o pagamento não tem cartão associado — Pix e
boleto, por exemplo. splits traz a divisão do valor, com o recipientName de cada recebedor, e
vem [] quando não há split.Response
Dados do payment
Quanto do amount é juro de parcelamento, em centavos. O preço que este pagamento cobre é amount − interestAmount. 0 quando o comprador pagou sem juros. null quando o pagamento não informa juros: transação criada por POST /transactions, cobrança de fatura ou de assinatura, e venda do Checkout feita antes de o campo existir.