Retrieve Payout
Check the status of a payout
Check the current status of a payout.
Endpoint
GET /payout/retrieve/:payoutId
Request headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Path parameters
| Parameter | Type | Description |
|---|---|---|
payoutId | string | The payout ID returned when you created the payout |
Response
{
"success": true,
"data": {
"payoutId": "payout_xyz789",
"merchantRef": "ref_001",
"amount": 500,
"recipientNumber": "01712345678",
"recipientName": "John Doe",
"description": "Withdrawal request #123",
"status": "Completed",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:35:00.000Z"
}
}
Status values
| Status | Description |
|---|---|
Processing | Payout is being processed |
Completed | Payout was successful. The recipient received the funds. |
Cancelled | Payout was cancelled or failed |
Example
const axios = require("axios");
const payoutId = "payout_xyz789";
const response = await axios.get(
`https://sandbox.payzava.com/cp/api/v1/payout/retrieve/${payoutId}`,
{
headers: {
"x-api-key": "sk_sandbox_your_api_key",
},
}
);
const { status, amount } = response.data.data;
console.log(`Payout ${payoutId}: ${status} (${amount} BDT)`);
if (status === "Completed") {
console.log("Payout completed successfully.");
} else if (status === "Cancelled") {
console.log("Payout was cancelled or failed.");
} else {
console.log("Payout is still processing.");
}