Skip to main content

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

MethodDescription
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

FieldTypeRequiredDescription
amountnumberYesAmount in smallest currency unit
currencystringYesCurrency code (from supported currency enum)
destinationobjectYesDestination details
destination.customer_idstringYesCustomer receiving the payout
destination.payment_method_idstringYesPayment method to pay out to
metadataRecord<string, any>NoCustom metadata

Response data

FieldTypeDescription
idstringPayout ID
amountnumberPayout amount
currencystringCurrency code
statusstringPayout status
destinationobjectDestination details
created_atstringISO timestamp
updated_atstringISO timestamp