cURL
curl --request GET \ --url https://api.sandbox.wepayout.com.br/v2/payin/payments/{id} \ --header 'Authorization: Bearer <token>'
{ "id": 51644, "merchant": { "id": 477, "name": "Merchant Name" }, "hash": "bf0976019f5349567a315262cdb4d54e98842061fa26ed0a844c8384a40a58ee", "payment_page": "https://pagar.sandbox.goboleto.com/?hash=bf0976019f5349567a315262cdb4d54e98842061fa26ed0a844c8384a40a58ee", "our_number": "30858", "invoice": "YOUR-INVOICE-1234", "notification_url": "https://your-webhook-url.com/notify", "payment_method": "pix", "amount": 3000, "paid_amount": null, "refunded_amount": 0, "currency": { "id": 19, "name": "Reais", "code": "BRL", "symbol": "R$" }, "description": "Descrição", "created_at": "2025-11-14T17:35:33.000000Z", "updated_at": "2025-11-14T17:35:36.000000Z", "buyer": { "name": "Customer Name", "email": "[email protected]", "document": { "type": "cnpj", "number": "99999919999979" }, "address": { "country": "BR", "city": null, "street": null, "number": null, "complement": null, "zipcode": null, "district": null, "state_code": null } }, "originator_legal_entity": { "name": "Empresa X", "document": "56251499000164", "helpdesk": "wepayments.com.br" }, "splits": [], "pix": { "expire_date": "2025-12-31 23:59:59", "refund_mode": "FULL_REFUND_MERCHANT", "qr_code": "00020126910014BR.GOV.BCB.PIX2569api-pix-h.bancobs2.com.br/spi/v2/7cc95f1a-743e-4f4a-a3ad-e2ba14f5f6f8520400005303986540510.005802BR5908Wepayout6014Belo Horizonte61083038040362070503***63049F6B", "end_to_end": null, "fine": { "percent": null, "amount": null, "date": null }, "discount": { "percent": null, "amount": null, "date": null } }, "status": { "id": 1, "name": "Created" }, "status_history": [ { "status": { "id": 1, "name": "Created" }, "updated_at": "2025-11-14T17:35:36.000000Z" } ], "substatus": null, "refunds": [], "automatic_pix": null }
Get details of a specific charge by ID
32457
Show Merchant
pix
boleto
Show Currency
Show Buyer
Show Document
Show Address
Show Originator Legal Entity
Show Split
Show Pix
Show Boleto
Show Status
Show Status History Item
Show Substatus
Show Reason Canceled
1
2
Canceled By Processor
Canceled By Client
Show KYC
Show Refund
curl --request GET \ --url https://api.sandbox.wepayout.com.br/v2/payin/payments/32457 \ --header 'Accept: application/json' \ --header 'Authorization: Bearer 123'
Check Payment Status
async function checkPaymentStatus(chargeId) { const charge = await getChargeById(chargeId); console.log(`Charge ${charge.invoice}:`); console.log(`Status: ${charge.status.name}`); console.log(`Amount: R$ ${charge.amount / 100}`); console.log(`Paid: R$ ${charge.paid_amount / 100}`); return charge.status.id === 4; // 4 = Pago }
Get QR Code
async function getPixQRCode(chargeId) { const charge = await getChargeById(chargeId); if (charge.payment_method !== 'pix') { throw new Error('Not a Pix charge'); } return { qrCode: charge.pix.qr_code, qrCodeUrl: charge.pix.qr_code_url, expiresAt: charge.pix.expire_date }; }
Get Boleto Details
async function getBoletoDetails(chargeId) { const charge = await getChargeById(chargeId); if (charge.payment_method !== 'boleto') { throw new Error('Not a Boleto charge'); } return { digitableLine: charge.boleto.digitable_line, barCode: charge.boleto.bar_code_number, expiresAt: charge.boleto.expire_date, ourNumber: charge.our_number }; }
Track Status History
async function getStatusHistory(chargeId) { const charge = await getChargeById(chargeId); console.log(`Status history for charge ${charge.invoice}:`); charge.status_history.forEach(history => { console.log(`${history.updated_at}: ${history.status.name}`); }); return charge.status_history; }
Verify Payment
async function verifyPayment(chargeId) { const charge = await getChargeById(chargeId); const isPaid = charge.status.id === 4; const paidAmount = charge.paid_amount; const expectedAmount = charge.amount; return { isPaid, paidAmount, expectedAmount, fullyPaid: isPaid && paidAmount >= expectedAmount }; }
status_history
expire_date
Was this page helpful?