The Payout object
Represents a payout to a beneficiary. Payouts transfer funds from your ZenPays wallet to an external beneficiary account (bank, wallet, or crypto address).
Fields
| Field | Type | Description |
|---|---|---|
id REQUIRED | string | Unique identifier for the payout |
merchantId REQUIRED | string | ID of the merchant initiating the payout |
customerId OPTIONAL | string | ID of the customer receiving the payout (if registered) |
customerName OPTIONAL | string | Name of the customer receiving the payout |
customerEmail OPTIONAL | string | Email of the customer receiving the payout |
amount REQUIRED | number | Payout amount in the smallest currency unit (e.g., cents for USD) |
currency REQUIRED | string | Three-letter ISO currency code |
status REQUIRED | PayoutStatus | Current status of the payout PayoutStatus |
payoutMethod REQUIRED | string | Payout method identifier used |
beneficiaryDetails REQUIRED | BeneficiaryDetails | Beneficiary details for the payout recipient |
tspPayoutId OPTIONAL | string | External payout ID from the payment provider |
failureReason OPTIONAL | string | Reason for failure if the payout failed |
processedAt OPTIONAL | string | ISO 8601 timestamp when the payout was processed |
metadata OPTIONAL | Record<string, unknown> | Custom key-value data attached to the payout |
createdAt REQUIRED | string | ISO 8601 timestamp when the payout was created |
updatedAt REQUIRED | string | ISO 8601 timestamp when the payout was last updated |
Example
{
"id": "obj_1a2b3c",
"merchantId": "merchant_1a2b3c",
"customerId": "customer_1a2b3c",
"customerName": "string",
"customerEmail": "customer@example.com",
"amount": 5000,
"currency": "USD",
"status": "pending",
"payoutMethod": "string",
"beneficiaryDetails": "string",
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T09:30:00Z"
}
Usage
const payout = await client.payouts.get('pay_123');
if (payout.status === 'completed') {
console.log(`Payout of ${payout.amount} ${payout.currency} completed`);
}