Skip to main content
POST
/
transfers
JavaScript
import Whopsdk from 'whopsdk';

const client = new Whopsdk({
  apiKey: 'My API Key',
});

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": 1701406800,
  "fee_amount": 6.9,
  "notes": "<string>",
  "origin_ledger_account_id": "ldgr_xxxxxxxxxxxxx",
  "destination_ledger_account_id": "ldgr_xxxxxxxxxxxxx",
  "origin": {
    "typename": "<string>",
    "id": "user_xxxxxxxxxxxxx",
    "name": "<string>",
    "username": "<string>"
  },
  "destination": {
    "typename": "<string>",
    "id": "user_xxxxxxxxxxxxx",
    "name": "<string>",
    "username": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Parameters for TransferFunds

amount
number
required

The amount to withdraw

Example:

6.9

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

The ID of the destination account which will receive the funds (either a User ID, Company ID, or LedgerAccount ID)

origin_id
string
required

The ID of the origin account which will send the funds (either a User ID, Company ID, or LedgerAccount ID)

idempotence_key
string | null

A unique key to ensure idempotence. Use a UUID or similar.

notes
string | null

Notes for the transfer. Maximum of 50 characters.

Response

A successful response

Credit Transaction Transfer

id
string
required

The unique identifier of the credit transaction transfer

Example:

"ctt_xxxxxxxxxxxxxx"

amount
number
required

The amount of the credit transaction transfer

Example:

6.9

currency
enum<string>
required

The currency of the credit transaction transfer

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
created_at
integer
required

The timestamp when the credit transaction transfer was created

Example:

1701406800

fee_amount
number | null
required

The decimal fee of the credit transaction transfer

Example:

6.9

notes
string | null
required

The notes of the credit transaction transfer

origin_ledger_account_id
string
required

The ID of the origin ledger account

Example:

"ldgr_xxxxxxxxxxxxx"

destination_ledger_account_id
string
required

The ID of the destination ledger account

Example:

"ldgr_xxxxxxxxxxxxx"

origin
object
required

The sender of the credit transaction transfer An object representing a (sanitized) user of the site.

  • Option 1
  • Option 2
destination
object
required

The recipient of the credit transaction transfer An object representing a (sanitized) user of the site.

  • Option 1
  • Option 2
I