Skip to main content
POST
/
transfers
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 transfer = await client.transfers.create({
  amount: 6.9,
  currency: 'usd',
  destination_id: 'destination_id',
  origin_id: 'origin_id',
});

console.log(transfer.id);
{
  "id": "ctt_xxxxxxxxxxxxxx",
  "amount": 6.9,
  "currency": "usd",
  "created_at": "2023-12-01T05:00:00.401Z",
  "fee_amount": 6.9,
  "notes": "Monthly revenue share payout",
  "metadata": {},
  "origin_ledger_account_id": "ldgr_xxxxxxxxxxxxx",
  "destination_ledger_account_id": "ldgr_xxxxxxxxxxxxx",
  "origin": {
    "typename": "<string>",
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  },
  "destination": {
    "typename": "<string>",
    "id": "user_xxxxxxxxxxxxx",
    "name": "John Doe",
    "username": "johndoe42"
  }
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Body

application/json

Parameters for TransferFunds

amount
number
required

The amount to transfer in the specified currency. For example, 25.00 for $25.00 USD.

Example:

6.9

currency
enum<string>
required

The currency of the transfer amount, such as 'usd'.

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
destination_id
string
required

The identifier of the account receiving the funds. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').

origin_id
string
required

The identifier of the account sending the funds. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').

idempotence_key
string | null

A unique key to prevent duplicate transfers. Use a UUID or similar unique string.

metadata
object

A JSON object of custom metadata to attach to the transfer for tracking purposes.

notes
string | null

A short note describing the transfer, up to 50 characters.

Response

A successful response

A transfer of credit between two ledger accounts.

id
string
required

The unique identifier for the credit transaction transfer.

Example:

"ctt_xxxxxxxxxxxxxx"

amount
number
required

The transfer amount in the currency specified by the currency field. For example, 10.43 represents $10.43 USD.

Example:

6.9

currency
enum<string>
required

The currency in which this transfer amount is denominated.

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
created_at
string<date-time>
required

The datetime the credit transaction transfer was created.

Example:

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

fee_amount
number | null
required

The flat fee amount deducted from this transfer, in the transfer's currency. Null if no flat fee was applied.

Example:

6.9

notes
string | null
required

A free-text note attached to this transfer by the sender. Null if no note was provided.

Example:

"Monthly revenue share payout"

metadata
object
required

Custom key-value pairs attached to this transfer. Maximum 50 keys, 500 characters per key, 5000 characters per value.

origin_ledger_account_id
string
required

The unique identifier of the ledger account that sent the funds.

Example:

"ldgr_xxxxxxxxxxxxx"

destination_ledger_account_id
string
required

The unique identifier of the ledger account receiving the funds.

Example:

"ldgr_xxxxxxxxxxxxx"

origin
User · object
required

A user account on Whop. Contains profile information, identity details, and social connections.

destination
User · object
required

A user account on Whop. Contains profile information, identity details, and social connections.