curl --request GET \
--url https://api.example.com/api/v1/payments/{payment_id}{
"payment_id": 123,
"transaction_id": {},
"status": "<string>",
"amount": 123,
"currency": "<string>",
"created_at": "<string>"
}Retrieve details of a specific payment by ID
curl --request GET \
--url https://api.example.com/api/v1/payments/{payment_id}{
"payment_id": 123,
"transaction_id": {},
"status": "<string>",
"amount": 123,
"currency": "<string>",
"created_at": "<string>"
}PENDING - Payment initiated, awaiting user confirmationLOCKED - Payment completed and locked in escrowRELEASED - Payment released to recipientREFUNDED - Payment refunded to payerFAILED - Payment failed or was cancelledcurl -X GET https://api.voicepact.com/api/v1/payments/42 \
-H "Content-Type: application/json"
{
"payment_id": 42,
"transaction_id": "ATXid_sample123456789",
"status": "LOCKED",
"amount": 5000.0,
"currency": "KES",
"created_at": "2026-03-06T10:30:00.000000"
}
{
"detail": "Payment not found"
}
{
"detail": "Failed to retrieve payment"
}
const checkPaymentStatus = async (paymentId) => {
const response = await fetch(
`https://api.voicepact.com/api/v1/payments/${paymentId}`
);
const payment = await response.json();
if (payment.status === 'LOCKED') {
console.log('Payment completed successfully!');
return true;
} else if (payment.status === 'FAILED') {
console.log('Payment failed');
return false;
} else {
console.log('Payment still pending...');
return null; // Continue polling
}
};
import httpx
async def verify_payment_before_delivery(payment_id: int) -> bool:
async with httpx.AsyncClient() as client:
response = await client.get(
f"https://api.voicepact.com/api/v1/payments/{payment_id}"
)
payment = response.json()
# Only deliver service if payment is locked in escrow
return payment["status"] == "LOCKED"
null initially and populated within secondsPENDING to LOCKED or FAILED within 30-60 seconds