Skip to main content

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

FieldTypeDescription
id
REQUIRED
stringUnique identifier for the payout
merchantId
REQUIRED
stringID of the merchant initiating the payout
customerId
OPTIONAL
stringID of the customer receiving the payout (if registered)
customerName
OPTIONAL
stringName of the customer receiving the payout
customerEmail
OPTIONAL
stringEmail of the customer receiving the payout
amount
REQUIRED
numberPayout amount in the smallest currency unit (e.g., cents for USD)
currency
REQUIRED
stringThree-letter ISO currency code
status
REQUIRED
PayoutStatusCurrent status of the payout PayoutStatus
payoutMethod
REQUIRED
stringPayout method identifier used
beneficiaryDetails
REQUIRED
BeneficiaryDetailsBeneficiary details for the payout recipient
tspPayoutId
OPTIONAL
stringExternal payout ID from the payment provider
failureReason
OPTIONAL
stringReason for failure if the payout failed
processedAt
OPTIONAL
stringISO 8601 timestamp when the payout was processed
metadata
OPTIONAL
Record<string, unknown>Custom key-value data attached to the payout
createdAt
REQUIRED
stringISO 8601 timestamp when the payout was created
updatedAt
REQUIRED
stringISO 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`);
}