<!-- ZenPays documentation · https://docs.zenpayz.com/docs/reference/objects/payout -->

# 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

<ParamTable
  label="Field"
  rows={[
    { name: "id", type: "string", required: true, desc: "Unique identifier for the payout" },
    { name: "merchantId", type: "string", required: true, desc: "ID of the merchant initiating the payout" },
    { name: "customerId", type: "string", required: false, desc: "ID of the customer receiving the payout (if registered)" },
    { name: "customerName", type: "string", required: false, desc: "Name of the customer receiving the payout" },
    { name: "customerEmail", type: "string", required: false, desc: "Email of the customer receiving the payout" },
    { name: "amount", type: "number", required: true, desc: "Payout amount in the smallest currency unit (e.g., cents for USD)" },
    { name: "currency", type: "string", required: true, desc: "Three-letter ISO currency code" },
    { name: "status", type: "PayoutStatus", required: true, desc: "Current status of the payout [PayoutStatus](/docs/reference/enums/payout-status)" },
    { name: "payoutMethod", type: "string", required: true, desc: "Payout method identifier used" },
    { name: "beneficiaryDetails", type: "BeneficiaryDetails", required: true, desc: "Beneficiary details for the payout recipient" },
    { name: "tspPayoutId", type: "string", required: false, desc: "External payout ID from the payment provider" },
    { name: "failureReason", type: "string", required: false, desc: "Reason for failure if the payout failed" },
    { name: "processedAt", type: "string", required: false, desc: "ISO 8601 timestamp when the payout was processed" },
    { name: "metadata", type: "Record<string, unknown>", required: false, desc: "Custom key-value data attached to the payout" },
    { name: "createdAt", type: "string", required: true, desc: "ISO 8601 timestamp when the payout was created" },
    { name: "updatedAt", type: "string", required: true, desc: "ISO 8601 timestamp when the payout was last updated" },
  ]}
/>

## Example

```json
{
  "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

```typescript
const payout = await client.payouts.get('pay_123');
if (payout.status === 'completed') {
  console.log(`Payout of ${payout.amount} ${payout.currency} completed`);
}
```
