Payouts
A payout disburses funds from your platform balance to an external destination. Use the payout service to create payouts in supported currencies.
import { createOakClient, createPayoutService } from '@oaknetwork/payments-sdk';
const client = createOakClient({ ... });
const payouts = createPayoutService(client);
Methods
| Method | Description |
|---|---|
create(request) | Create a new payout |
Create a payout
const result = await payouts.create({
amount: 50000,
currency: 'usd',
destination: {
customer_id: 'cus_abc123',
payment_method_id: 'pm_bank_xyz',
},
metadata: {
reference: 'payout_march_2026',
},
});
if (result.ok) {
console.log('Payout ID:', result.value.data.id);
console.log('Status:', result.value.data.status);
}
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in smallest currency unit |
currency | string | Yes | Currency code (from supported currency enum) |
destination | object | Yes | Destination details |
destination.customer_id | string | Yes | Customer receiving the payout |
destination.payment_method_id | string | Yes | Payment method to pay out to |
metadata | Record<string, any> | No | Custom metadata |
Response data
| Field | Type | Description |
|---|---|---|
id | string | Payout ID |
amount | number | Payout amount |
currency | string | Currency code |
status | string | Payout status |
destination | object | Destination details |
created_at | string | ISO timestamp |
updated_at | string | ISO timestamp |