Skip to main content
POST
/
offramp
/
initiate
Initiate
curl --request POST \
  --url https://api.onswitch.xyz/offramp/initiate \
  --header 'Content-Type: application/json' \
  --header 'x-service-key: <api-key>' \
  --data '
{
  "amount": 100,
  "country": "NG",
  "currency": "NGN",
  "asset": "base:usdc",
  "beneficiary": {
    "holder_type": "INDIVIDUAL",
    "holder_name": "John Doe",
    "account_number": "0123456789",
    "bank_code": "058"
  },
  "exact_output": false,
  "callback_url": "https://your-app.com/webhook",
  "reference": "550e8400-e29b-41d4-a716-446655440000",
  "channel": "BANK",
  "reason": "REMITTANCES",
  "developer_fee": 0.5,
  "developer_recipient": "0x1234567890123456789012345678901234567890",
  "refund_address": "0x1234567890123456789012345678901234567890",
  "static": false
}
'
{
  "success": true,
  "message": "Offramp transaction initiated successfully",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "status": "AWAITING_DEPOSIT",
    "type": "OFFRAMP",
    "reference": "550e8400-e29b-41d4-a716-446655440000",
    "rate": 1500.5,
    "fee": {
      "total": 5,
      "platform": 4.5,
      "developer": 0.5,
      "currency": "USDC"
    },
    "source": {
      "amount": 100,
      "currency": "USDC"
    },
    "destination": {
      "amount": 150050,
      "currency": "NGN"
    },
    "deposit": {
      "amount": 100,
      "address": "0x1234567890123456789012345678901234567890",
      "asset": "base:usdc",
      "note": [
        "Kindly send the exact amount to the wallet address to complete the transaction.",
        "This dynamic wallet address has a 30 minutes expiry window and can only be used once."
      ]
    }
  }
}

Authorizations

x-service-key
string
header
required

Service key for API authentication

Body

application/json
amount
number
required
Required range: x >= 0
country
enum<string>
required
Available options:
AD,
AE,
AF,
AG,
AI,
AL,
AM,
EU,
AN,
AO,
AQ,
AR,
AS,
AT,
AU,
AW,
AZ,
BA,
BB,
BD,
BE,
BF,
BG,
BH,
BI,
BJ,
BM,
BN,
BO,
BR,
BS,
BT,
BV,
BW,
BY,
BZ,
CA,
CC,
CD,
CF,
CG,
CH,
CI,
CK,
CL,
CM,
CN,
CO,
CR,
CU,
CV,
CX,
CY,
CZ,
DE,
DJ,
DK,
DM,
DO,
DZ,
EC,
EE,
EG,
EH,
ER,
ES,
ET,
FI,
FJ,
FK,
FM,
FO,
FR,
GA,
GB,
GD,
GE,
GF,
GG,
GH,
GI,
GL,
GM,
GN,
GP,
GQ,
GR,
GS,
GT,
GU,
GW,
GY,
GZ,
HK,
HM,
HN,
HR,
HT,
HU,
ID,
IE,
IL,
IM,
IN,
IO,
IQ,
IR,
IS,
IT,
JE,
JM,
JO,
JP,
KE,
KG,
KH,
KI,
KM,
KN,
KP,
KR,
KW,
KY,
KZ,
LA,
LB,
LC,
LI,
LK,
LR,
LS,
LT,
LU,
LV,
LY,
MA,
MC,
MD,
ME,
MG,
MH,
MK,
ML,
MM,
MN,
MO,
MP,
MQ,
MR,
MS,
MT,
MU,
MV,
MW,
MX,
MY,
MZ,
NA,
NC,
NE,
NF,
NG,
NI,
NL,
false,
NP,
NR,
NU,
NZ,
OM,
PA,
PE,
PF,
PG,
PH,
PK,
PL,
PM,
PN,
PR,
PS,
PT,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
asset
enum<string>
required
Available options:
base:usdc,
solana:usdc,
solana:usdt,
ethereum:usdc,
ethereum:usdt,
polygon:usdc,
polygon:usdt,
bsc:usdc,
bsc:usdt,
arbitrum:usdc,
optimism:usdc,
gnosis:usdc,
gnosis:usdt,
arbitrum:usdt,
avalanche:usdc,
monad:usdc,
optimism:usdt,
monad:usdt,
plasma:usdt,
avalanche:usdt,
tron:usdt,
linea:usdt,
mantle:usdt,
hyperevm:usdt,
berachain:usdt,
linea:usdc,
berachain:usdc,
sonic:usdc,
base:cngn,
bsc:cngn
beneficiary
object
required
currency
enum<string>

Optional currency code. If not specified, defaults to the country's local currency.

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
FOK,
GBP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KID,
KMF,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
SSP,
STN,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TVD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMW,
ZWL
sender_name
string
exact_output
boolean
default:false
callback_url
string<uri>

Webhook URL to receive transaction status updates.

reference
string<uuid>
channel
enum<string>

Optional transfer channel. If not specified, defaults to the country's default channel.

Available options:
BANK,
BLOCKCHAIN,
SWIFT,
SEPA,
SEPA_EUR,
WIRE,
ACH,
DOMESTIC_GBP,
MOBILEMONEY,
ALIPAY,
WECHATPAY
reason
enum<string>

Optional payment reason for compliance purposes

Available options:
CAPITAL_CONTRIBUTIONS,
CHARITABLE_CONTRIBUTIONS,
CONSULTING_FEES,
CORPORATE_TAX_PAYMENTS,
DOWN_PAYMENTS_FOR_REAL_ESTATE,
EDUCATION_FEES,
EMPLOYEE_SALARIES_OR_WAGES,
EXPENSES_REIMBURSEMENT,
GIFTS,
GOVERNMENT_GRANTS,
INCOME_TAX_PAYMENTS,
INHERITANCE_PAYMENTS,
INSURANCE_CLAIM_PAYOUTS,
INSURANCE_PREMIUM_PAYMENTS,
INVESTMENTS,
LOAN_ADVANCES,
MORTGAGE_PAYMENTS,
OTHER,
PAYMENT_FOR_GOODS_AND_SERVICES,
PERSONAL_TRANSFERS,
REAL_ESTATE_PURCHASES,
REMITTANCES,
RENT,
REPAYMENT_OF_LOANS,
ROYALTIES,
TRUST_FUND_DISTRIBUTIONS,
UTILITY_BILLS,
WELFARE_OR_BENEFITS,
WINNINGS_AND_PRIZES
developer_fee
number

Optional developer fee percentage (0-100)

Required range: 0 <= x <= 100
developer_recipient
string

Optional wallet address to receive developer fee.

refund_address
string

Optional wallet address to receive refunds for failed/expired deposit intents.

static
boolean

Optional. When true, deposit address will always be the same for the same beneficiary.

Response

Successfully initiated offramp transaction

success
boolean
required
message
string
required
timestamp
string<date-time>
required
data
any | null
required

Response data