Get Unique Payment
curl --request GET \
--url https://api.sandbox.wepayout.com.br/v2/payout/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/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/payout/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/payout/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/payout/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/payout/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payout/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": 54321,
"merchant_id": 1234,
"amount": 10000,
"currency": "BRL",
"country": "BR",
"description": "Payment for services rendered",
"recipient": {
"name": "João Silva",
"email": "joao@example.com",
"document": {
"type": "CPF",
"number": "12345678900"
},
"bank_account": {
"bank_code": "001",
"branch": "1234",
"account": "12345678",
"account_digit": "9",
"account_type": "checking"
}
},
"status": {
"id": 3,
"name": "Paid"
},
"external_id": "ORDER-12345",
"notification_url": "https://your-domain.com/webhook/payout",
"created_at": "2024-06-13T10:00:00.000000Z",
"updated_at": "2024-06-13T10:05:00.000000Z"
}
{
"message": "Payment not found"
}
Payout
Get Unique Payment
Get details of a specific payout payment by ID
GET
/
v2
/
payout
/
payments
/
{id}
Get Unique Payment
curl --request GET \
--url https://api.sandbox.wepayout.com.br/v2/payout/payments/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.wepayout.com.br/v2/payout/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/payout/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/payout/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/payout/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/payout/payments/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.wepayout.com.br/v2/payout/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": 54321,
"merchant_id": 1234,
"amount": 10000,
"currency": "BRL",
"country": "BR",
"description": "Payment for services rendered",
"recipient": {
"name": "João Silva",
"email": "joao@example.com",
"document": {
"type": "CPF",
"number": "12345678900"
},
"bank_account": {
"bank_code": "001",
"branch": "1234",
"account": "12345678",
"account_digit": "9",
"account_type": "checking"
}
},
"status": {
"id": 3,
"name": "Paid"
},
"external_id": "ORDER-12345",
"notification_url": "https://your-domain.com/webhook/payout",
"created_at": "2024-06-13T10:00:00.000000Z",
"updated_at": "2024-06-13T10:05:00.000000Z"
}
{
"message": "Payment not found"
}
Get Unique Payment
Get details of a specific payout payment by ID.Path Parameters
Response
Returns a single payout payment object with all details.Recipient information.
Show Recipient
Show Recipient
Request Example
curl --request GET \
--url https://api.sandbox.wepayout.com.br/v2/payout/payments/54321 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer 123'
async function getPayment(paymentId) {
const response = await fetch(
`https://api.sandbox.wepayout.com.br/v2/payout/payments/${paymentId}`,
{
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer 123'
}
}
);
return await response.json();
}
// Usage
const payment = await getPayment(12345);
console.log('Payment details:', payment);
console.log('Status:', payment.status.name);
console.log('Amount:', payment.amount / 100);
console.log('Recipient:', payment.recipient.name);
import requests
def get_payment(payment_id):
url = f'https://api.sandbox.wepayout.com.br/v2/payout/payments/{payment_id}'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer 123'
}
response = requests.get(url, headers=headers)
return response.json()
# Usage
payment = get_payment(54321)
print(f"Payment details: {payment}")
print(f"Status: {payment['status']['name']}")
print(f"Amount: R$ {payment['amount'] / 100}")
print(f"Recipient: {payment['recipient']['name']}")
{
"id": 54321,
"merchant_id": 1234,
"amount": 10000,
"currency": "BRL",
"country": "BR",
"description": "Payment for services rendered",
"recipient": {
"name": "João Silva",
"email": "joao@example.com",
"document": {
"type": "CPF",
"number": "12345678900"
},
"bank_account": {
"bank_code": "001",
"branch": "1234",
"account": "12345678",
"account_digit": "9",
"account_type": "checking"
}
},
"status": {
"id": 3,
"name": "Paid"
},
"external_id": "ORDER-12345",
"notification_url": "https://your-domain.com/webhook/payout",
"created_at": "2024-06-13T10:00:00.000000Z",
"updated_at": "2024-06-13T10:05:00.000000Z"
}
{
"message": "Payment not found"
}
Use Cases
Check Payment Status
Check Payment Status
Monitor the status of a specific payout:
async function checkPaymentStatus(paymentId) {
const payment = await getPayment(paymentId);
console.log(`Payment ${paymentId}:`);
console.log(`Status: ${payment.status.name}`);
console.log(`Amount: R$ ${payment.amount / 100}`);
console.log(`Recipient: ${payment.recipient.name}`);
return payment.status.id === 3; // 3 = Paid
}
Verify Payment Completion
Verify Payment Completion
Check if a payout has been completed:
async function verifyPaymentCompletion(paymentId) {
const payment = await getPayment(paymentId);
const isPaid = payment.status.id === 3;
const isFailed = payment.status.id === 4;
const isRejected = payment.status.id === 5;
if (isPaid) {
console.log('Payment completed successfully');
return true;
}
if (isFailed || isRejected) {
console.log(`Payment failed: ${payment.status.name}`);
return false;
}
console.log('Payment still processing');
return null;
}
Get Payment Details for Reconciliation
Get Payment Details for Reconciliation
Retrieve payment details for accounting reconciliation:
async function getPaymentForReconciliation(paymentId) {
const payment = await getPayment(paymentId);
return {
paymentId: payment.id,
externalId: payment.external_id,
amount: payment.amount / 100,
status: payment.status.name,
recipient: {
name: payment.recipient.name,
document: payment.recipient.document.number,
bank: payment.recipient.bank_account.bank_code,
account: `${payment.recipient.bank_account.branch}-${payment.recipient.bank_account.account}-${payment.recipient.bank_account.account_digit}`
},
createdAt: payment.created_at,
completedAt: payment.updated_at
};
}
// Usage
const reconciliation = await getPaymentForReconciliation(54321);
console.log('Reconciliation data:', reconciliation);
Track Payment by External ID
Track Payment by External ID
Find and track a payment using your internal reference:
async function trackPaymentByExternalId(externalId) {
// First, list payments filtered by external_id
const listResponse = await fetch(
`https://api.sandbox.wepayout.com.br/v2/payout/payments?external_id=${externalId}`,
{
headers: {
'Authorization': 'Bearer 123',
'Accept': 'application/json'
}
}
);
const list = await listResponse.json();
if (list.data.length === 0) {
throw new Error('Payment not found');
}
// Get full details
const paymentId = list.data[0].id;
return await getPayment(paymentId);
}
// Usage
const payment = await trackPaymentByExternalId('ORDER-12345');
console.log('Payment status:', payment.status.name);
Monitor Multiple Payments
Monitor Multiple Payments
Check status of multiple payouts:
async function monitorPayments(paymentIds) {
const results = [];
for (const paymentId of paymentIds) {
try {
const payment = await getPayment(paymentId);
results.push({
id: paymentId,
status: payment.status.name,
amount: payment.amount,
completed: payment.status.id === 3
});
} catch (error) {
results.push({
id: paymentId,
error: error.message
});
}
}
return results;
}
// Usage
const paymentIds = [54321, 54322, 54323];
const statuses = await monitorPayments(paymentIds);
console.log('Payment statuses:', statuses);
Status Codes
| Status ID | Status Name | Description |
|---|---|---|
| 1 | Created | Payout has been created |
| 2 | Processing | Payout is being processed |
| 3 | Paid | Payout has been paid successfully |
| 4 | Failed | Payout failed |
| 5 | Rejected | Payout rejected by compliance |
| 6 | Cancelled | Payout was cancelled |
Best Practices
Status Monitoring: Use webhooks instead of polling this endpoint repeatedly to check payment status.
External ID: Use the external_id to track payments in your system and correlate with your internal records.
Error Handling: Always implement proper error handling for 404 responses when the payment ID doesn’t exist.
Related Resources
Create Payment
Create a new payout payment
List Payments
List all payout payments
Callback Payment
Receive payment status updates
Get Balance
Check your wallet balance
Get Statement
View account statement
Was this page helpful?

