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.retrieve('ctt_xxxxxxxxxxxxxx');
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"
}
}Retrieves the details of an existing transfer.
Required permissions:
payout:transfer:readimport 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.retrieve('ctt_xxxxxxxxxxxxxx');
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"
}
}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 ***************************
The unique identifier of the transfer to retrieve.
"ctt_xxxxxxxxxxxxxx"
A successful response
A transfer of credit between two ledger accounts.
The unique identifier for the credit transaction transfer.
"ctt_xxxxxxxxxxxxxx"
The transfer amount in the currency specified by the currency field. For example, 10.43 represents $10.43 USD.
6.9
The currency in which this transfer amount is denominated.
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, usdt The datetime the credit transaction transfer was created.
"2023-12-01T05:00:00.401Z"
The flat fee amount deducted from this transfer, in the transfer's currency. Null if no flat fee was applied.
6.9
A free-text note attached to this transfer by the sender. Null if no note was provided.
"Monthly revenue share payout"
Custom key-value pairs attached to this transfer. Maximum 50 keys, 500 characters per key, 5000 characters per value.
The unique identifier of the ledger account that sent the funds.
"ldgr_xxxxxxxxxxxxx"
The unique identifier of the ledger account receiving the funds.
"ldgr_xxxxxxxxxxxxx"
A user account on Whop. Contains profile information, identity details, and social connections.
Show child attributes
A user account on Whop. Contains profile information, identity details, and social connections.
Show child attributes
Was this page helpful?