Get Unique Charge
curl --request GET \
--url https://api.sandbox.wepayout.com.br/v2/payin/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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": "customer@example.com",
"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"
},
"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
}
{
"id": 51615,
"merchant": {
"id": 507,
"name": "Merchant Name"
},
"hash": "a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"payment_page": "https://pagar.sandbox.goboleto.com/?hash=a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"our_number": "30831",
"invoice": "YOUR-INVOICE-4567",
"notification_url": "https://your-webhook-url.com/notify",
"payment_method": "pix",
"amount": 96728,
"paid_amount": null,
"refunded_amount": 0,
"currency": {
"id": 19,
"name": "Reais",
"code": "BRL",
"symbol": "R$"
},
"description": "Bill collection",
"created_at": "2025-11-14T08:10:29.000000Z",
"updated_at": "2025-11-14T08:20:38.000000Z",
"buyer": {
"name": "Customer Name",
"email": "customer@example.com",
"document": {
"type": "cpf",
"number": "34960826312"
},
"address": {
"country": "BR",
"city": null,
"street": null,
"number": null,
"complement": null,
"zipcode": null,
"district": null,
"state_code": null
}
},
"originator_legal_entity": {
"name": "Company Name",
"document": "34960826312",
"helpdesk": "https://www.company-website.com/"
},
"pix": {
"expire_date": "2025-11-15 16:10:29",
"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": 2,
"name": "Canceled"
},
"status_history": [
{
"status": {
"id": 1,
"name": "Created"
},
"updated_at": "2025-11-14T08:10:31.000000Z"
},
{
"status": {
"id": 2,
"name": "Canceled"
},
"updated_at": "2025-11-14T08:20:38.000000Z"
}
],
"substatus": null,
"reason_canceled": {
"id": 1,
"name": "Canceled By Processor"
},
"refunds": [],
"automatic_pix": null
}
{
"message": "Charge not found"
}
Charge
Get Unique Charge
Get details of a specific charge by ID
GET
/
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>'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payin/payments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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": "customer@example.com",
"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"
},
"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
}
{
"id": 51615,
"merchant": {
"id": 507,
"name": "Merchant Name"
},
"hash": "a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"payment_page": "https://pagar.sandbox.goboleto.com/?hash=a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"our_number": "30831",
"invoice": "YOUR-INVOICE-4567",
"notification_url": "https://your-webhook-url.com/notify",
"payment_method": "pix",
"amount": 96728,
"paid_amount": null,
"refunded_amount": 0,
"currency": {
"id": 19,
"name": "Reais",
"code": "BRL",
"symbol": "R$"
},
"description": "Bill collection",
"created_at": "2025-11-14T08:10:29.000000Z",
"updated_at": "2025-11-14T08:20:38.000000Z",
"buyer": {
"name": "Customer Name",
"email": "customer@example.com",
"document": {
"type": "cpf",
"number": "34960826312"
},
"address": {
"country": "BR",
"city": null,
"street": null,
"number": null,
"complement": null,
"zipcode": null,
"district": null,
"state_code": null
}
},
"originator_legal_entity": {
"name": "Company Name",
"document": "34960826312",
"helpdesk": "https://www.company-website.com/"
},
"pix": {
"expire_date": "2025-11-15 16:10:29",
"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": 2,
"name": "Canceled"
},
"status_history": [
{
"status": {
"id": 1,
"name": "Created"
},
"updated_at": "2025-11-14T08:10:31.000000Z"
},
{
"status": {
"id": 2,
"name": "Canceled"
},
"updated_at": "2025-11-14T08:20:38.000000Z"
}
],
"substatus": null,
"reason_canceled": {
"id": 1,
"name": "Canceled By Processor"
},
"refunds": [],
"automatic_pix": null
}
{
"message": "Charge not found"
}
Get Unique Charge
Get details of a specific charge by ID.Path Parameters
The charge ID to retrieve.Example:
32457Response
Returns a single charge object with all details.WEpayment’s auto generated id, use this id to perform conciliation or perform queries via API / Dashboard.
WEpayments auto generated hash, use this hash to send your user to the payment page.
The WEpayments payment page is the place where you will redirect the end customer to pay the bill.
The bank identification number.
Your identification number.
The url where we will submit the callbacks.
Payment method that will be used in payin.Values:
pix, boletoThe payin total amount in cents.
The total amount of the payin paid.
Amount refunded from this charge. Only pix payment_method.
Instructions that will be displayed to the user.
The person you are charging object.
Show Buyer
Show Buyer
The buyer name.
Buyer’s email.
Pix QRCode specific instructions object (when payment_method is pix).
Show Pix
Show Pix
Expiration date in format YYYY-MM-DDTHH:MM:SS.
Type of refund mode.
QRCode Pix / Copy and paste that will be used by your end customer to make the payin payment.
QR Code URL.
Unique identifier for a transaction.
Fine when the expiration date is reached.
Discount when a certain date is reached.
Boleto specific instructions object (when payment_method is boleto).
Show Boleto
Show Boleto
Expiration date in format YYYY-MM-DD.
Typed boleto line that will be used by your end customer to pay payin.
Barcode number for the boleto.
Extra data for billet rendering.
Fine when the expiration date is reached.
Discount when a certain date is reached.
Reason for the payin cancellation (only appears if the payin was cancelled).
Automatic Pix configuration (if enabled).
Cash-in created date.
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'
async function getChargeById(id) {
const response = await fetch(
`https://api.sandbox.wepayout.com.br/v2/payin/payments/${id}`,
{
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer 123'
}
}
);
return await response.json();
}
// Usage
const charge = await getChargeById(32457);
console.log('Charge:', charge);
import requests
def get_charge_by_id(charge_id):
url = f'https://api.sandbox.wepayout.com.br/v2/payin/payments/{charge_id}'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer 123'
}
response = requests.get(url, headers=headers)
return response.json()
# Usage
charge = get_charge_by_id(32457)
print('Charge:', charge)
{
"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": "customer@example.com",
"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"
},
"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
}
{
"id": 51615,
"merchant": {
"id": 507,
"name": "Merchant Name"
},
"hash": "a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"payment_page": "https://pagar.sandbox.goboleto.com/?hash=a014e4043acf0631c29dbce842a11a2120ecd8fec71aa8ad72979b0efd26f14a",
"our_number": "30831",
"invoice": "YOUR-INVOICE-4567",
"notification_url": "https://your-webhook-url.com/notify",
"payment_method": "pix",
"amount": 96728,
"paid_amount": null,
"refunded_amount": 0,
"currency": {
"id": 19,
"name": "Reais",
"code": "BRL",
"symbol": "R$"
},
"description": "Bill collection",
"created_at": "2025-11-14T08:10:29.000000Z",
"updated_at": "2025-11-14T08:20:38.000000Z",
"buyer": {
"name": "Customer Name",
"email": "customer@example.com",
"document": {
"type": "cpf",
"number": "34960826312"
},
"address": {
"country": "BR",
"city": null,
"street": null,
"number": null,
"complement": null,
"zipcode": null,
"district": null,
"state_code": null
}
},
"originator_legal_entity": {
"name": "Company Name",
"document": "34960826312",
"helpdesk": "https://www.company-website.com/"
},
"pix": {
"expire_date": "2025-11-15 16:10:29",
"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": 2,
"name": "Canceled"
},
"status_history": [
{
"status": {
"id": 1,
"name": "Created"
},
"updated_at": "2025-11-14T08:10:31.000000Z"
},
{
"status": {
"id": 2,
"name": "Canceled"
},
"updated_at": "2025-11-14T08:20:38.000000Z"
}
],
"substatus": null,
"reason_canceled": {
"id": 1,
"name": "Canceled By Processor"
},
"refunds": [],
"automatic_pix": null
}
{
"message": "Charge not found"
}
Use Cases
Check Payment Status
Check Payment Status
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
}
Get QR Code
Get QR Code
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
};
}
Get Boleto Details
Get Boleto Details
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
};
}
Track Status History
Track Status History
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 Payment
Verify Payment
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.Was this page helpful?
⌘I

