Skip to main content
POST
/
withdrawals
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const withdrawal = await client.withdrawals.create({
  amount: 6.9,
  company_id: 'biz_xxxxxxxxxxxxxx',
  currency: 'usd',
});

console.log(withdrawal.id);
{
  "id": "wdrl_xxxxxxxxxxxxx",
  "status": "requested",
  "amount": 6.9,
  "currency": "usd",
  "fee_amount": 6.9,
  "fee_type": "exclusive",
  "speed": "standard",
  "created_at": "2023-12-01T05:00:00.401Z",
  "markup_fee": 6.9,
  "ledger_account": {
    "id": "ldgr_xxxxxxxxxxxxx",
    "company_id": "<string>"
  },
  "payout_token": {
    "id": "potk_xxxxxxxxxxxxx",
    "payer_name": "<string>",
    "nickname": "<string>",
    "destination_currency_code": "<string>",
    "created_at": "2023-12-01T05:00:00.401Z"
  },
  "error_code": "account_closed",
  "error_message": "<string>",
  "estimated_availability": "2023-12-01T05:00:00.401Z",
  "trace_code": "<string>"
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Body

application/json

Parameters for CreateLedgerWithdrawal

amount
number
required

The amount to withdraw in the specified currency

Example:

6.9

company_id
string
required

The ID of the company to withdraw from.

Example:

"biz_xxxxxxxxxxxxxx"

currency
enum<string>
required

The currency that is being withdrawn.

Available options:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny
payout_method_id
string | null

The ID of the payout method to use for the withdrawal.

platform_covers_fees
boolean | null

Whether the platform covers the payout fees instead of the connected account.

statement_descriptor
string | null

Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters.

Response

A successful response

A withdrawal request.

id
string
required

Internal ID of the withdrawal request.

Example:

"wdrl_xxxxxxxxxxxxx"

status
enum<string>
required

Status of the withdrawal.

Available options:
requested,
awaiting_payment,
in_transit,
completed,
failed,
canceled,
denied
amount
number
required

How much money was attempted to be withdrawn, in a float type.

Example:

6.9

currency
enum<string>
required

The currency of the withdrawal request.

Available options:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny
fee_amount
number
required

The fee amount that was charged for the withdrawal. This is in the same currency as the withdrawal amount.

Example:

6.9

fee_type
enum<string> | null
required

The type of fee that was charged for the withdrawal. Exclusive means the fee was added on top of the withdrawal amount, so the user receives the full requested amount. Inclusive means the fee was deducted from the withdrawal amount, so the user receives less than the requested amount.

Available options:
exclusive,
inclusive
speed
enum<string>
required

The speed of the withdrawal.

Available options:
standard,
instant
created_at
string<date-time>
required

When the withdrawal request was created.

Example:

"2023-12-01T05:00:00.401Z"

markup_fee
number
required

The markup fee that was charged for the withdrawal. This is in the same currency as the withdrawal amount. This only applies to platform accounts using Whop Rails.

Example:

6.9

ledger_account
object
required

The ledger account associated with the withdrawal.

payout_token
object
required

The payout token used for the withdrawal, if applicable.

error_code
enum<string> | null
required

The error code associated with the withdrawal, if any.

Available options:
account_closed,
account_does_not_exist,
account_information_invalid,
account_number_invalid_region,
account_frozen,
account_lookup_failed,
account_not_found,
amount_out_of_bounds,
attributes_not_validated,
b2b_payments_prohibited,
bank_statement_required,
compliance_review,
currency_not_supported,
deposit_canceled,
deposit_failed,
deposit_rejected,
destination_unavailable,
exceeded_account_limit,
expired_quote,
generic_payout_error,
technical_problem,
identification_number_invalid,
invalid_account_number,
invalid_bank_code,
invalid_beneficiary,
invalid_mailing_address,
invalid_branch_number,
invalid_branch_code,
invalid_phone_number,
invalid_routing_number,
invalid_swift_code,
invalid_company_details,
manual_cancelation,
misc_error,
missing_city_and_country,
missing_phone_number,
missing_remittance_info,
payee_name_invalid,
receiving_account_locked,
rejected_by_compliance,
rtp_not_supported,
non_transaction_account,
source_token_insufficient_funds,
ssn_invalid,
wallet_screenshot_required,
unsupported_region
error_message
string | null
required

The error message for the withdrawal, if any.

estimated_availability
string<date-time> | null
required

The estimated availability date for the withdrawal, if any.

Example:

"2023-12-01T05:00:00.401Z"

trace_code
string | null
required

The trace code for the payout, if applicable. Provided on ACH transactions when available.