Skip to main content
GET
https://api.sandbox.wepayout.com.br
/
v2
/
payin
/
payments
/
{id}
Get Unique Charge
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 Unique Charge

Get details of a specific charge by ID.

Path Parameters

id
integer
required
The charge ID to retrieve.Example: 32457

Response

Returns a single charge object with all details.
id
integer
WEpayment’s auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
merchant
object
Merchant object.
hash
string
WEpayments auto generated hash, use this hash to send your user to the payment page.
payment_page
string
The WEpayments payment page is the place where you will redirect the end customer to pay the bill.
our_number
string
The bank identification number.
invoice
string
Your identification number.
notification_url
string
The url where we will submit the callbacks.
payment_method
string
Payment method that will be used in payin.Values: pix, boleto
currency
object
Currency object.
amount
integer
The payin total amount in cents.
paid_amount
integer
The total amount of the payin paid.
refunded_amount
integer
Amount refunded from this charge. Only pix payment_method.
description
string
Instructions that will be displayed to the user.
buyer
object
The person you are charging object.
Final Beneficiary object.
splits
array
Splits object.
pix
object
Pix QRCode specific instructions object (when payment_method is pix).
boleto
object
Boleto specific instructions object (when payment_method is boleto).
status
object
Status object.
status_history
array
Status History object.
substatus
object
Sub status object.
reason_canceled
object
Reason for the payin cancellation (only appears if the payin was cancelled).
kyc
object
Know your customer object.
refunds
array
Refund object.
automatic_pix
object
Automatic Pix configuration (if enabled).
created_at
string
Cash-in created date.
updated_at
string
Cash-in update date.

Request Example

curl --request GET \
  --url https://api.sandbox.wepayout.com.br/v2/payin/payments/32457 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer 123'
{
  "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
}

Use Cases

Monitor the payment status of a specific charge:
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
}
Retrieve the Pix QR Code for display:
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
  };
}
Retrieve boleto payment 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
  };
}
View the complete status history of a charge:
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 if a charge has been paid:
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
  };
}

Best Practices

ID Lookup: Use the numeric charge ID to retrieve charge details.
Status Monitoring: Check the status_history array to see the complete timeline of status changes for the charge.
QR Code Expiration: For Pix charges, always check the expire_date before displaying the QR Code to ensure it hasn’t expired.