Partner
GET
System statusReturn simple answer {"status":"OK"}
.
Endpoint
GET https://switchere.com/api/v2/partner/healthcheck
Response
{
status: "OK"
}
Name | Type | Description |
---|---|---|
status | string | System status. |
GET
Available currenciesReturn data about partner payin->payout currencies.
Endpoint
GET https://switchere.com/api/v2/partner/currency
Response
{
"...": [
"...",
"...",
"..."
]
}
Name | Type | Description |
---|---|---|
... | dict of arrays | Payin currency -> [ Payout currencies for this Payin currency ]. |
GET
Available payment methodsReturn data about partner payments.
Endpoint
GET https://switchere.com/api/v2/partner/payment/{directionName}
Parameters
Name | Type | Description |
---|---|---|
directionName required | direction | Name of direction. |
Response
[
{
"group": "card",
"info": "USD, EUR",
"list": [
{
"currency": "USD",
"is_crypto": false
}
],
"title": "Credit/Debit Card"
}
]
Name | Type | Description |
---|---|---|
group | paymentGroup | Payment group. |
info | string | Info about group. |
list | array | Array objects contain: currency and is_crypto . |
title | string | Title for group. |
Tip: Field parameters info
GET
Ticker listReturn data about partner rates.
Endpoint
GET https://switchere.com/api/v2/partner/ticker
Response
[
{
"ask": "21187.44",
"bid": "20364.70",
"floating_rate": "20752.5",
"name": "BTC-USD"
}
]
Name | Type | Description |
---|---|---|
name | string | Pair name. |
ask | float | Ask rate. |
bid | float | Bid rate. |
floating_rate | float | Floating rate. |
GET
TickerReturn data about partner rate.
Endpoint
GET https://switchere.com/api/v2/partner/ticker/{tickerName}
Parameters
Name | Type | Description |
---|---|---|
tickerName required | string | Example: BTC-USD Name of rate. |
Response
{
"ask": "21187.44",
"bid": "20364.70",
"floating_rate": "20752.5",
"name": "BTC-USD"
}
Name | Type | Description |
---|---|---|
name | string | Pair name. |
ask | float | Ask rate. |
bid | float | Bid rate. |
floating_rate | float | Floating rate. |
POST
Order createCreate new order for your partner client.
Endpoint
POST https://switchere.com/api/v2/partner/order/create
Parameters
Name | Type | Description |
---|---|---|
partner_order_id required | string | Unique partner order id. |
payin_currency required | currency | Payin currency. |
payin_amount | float | Payin amount. One of payin_amount , payout_amount is required. |
payin_group | paymentGroup | If empty, will be choosen first available method for payin currency. See order in enum. |
payout_currency required | currency | Payout currency. |
payout_amount | float | Payout amount. One of payin_amount , payout_amount is required. |
payout_group | paymentGroup | If empty, will be choosen first available method for payout currency. See order in enum. |
purchase_currency | currency | Purchase currency for merchant order. can only be fiat: EUR, USD. |
purchase_amount | float | Purchase amount for merchant order. |
dst_address | string | Destination address. |
memo | string | Crypto memo. |
client_email | email | Email of a particular client. |
coupon | string | Switchere coupon. |
free_first | integer[0..1] | Enable or disable free first order policy. By default free_first = 1 . |
client_ip required | IPv4 or IPv6 | Client IP. |
remote_country required | country code | Client’s 2 letter country code that was received from client IP. |
Regular Order Response
{
"client_order_id": "XXXXX-XXXXXX",
"created_at": "2020-11-10 13:51:34.864116",
"crypto_address": null,
"crypto_delay": null,
"dst_address": "2NA5XzyXXxNZVQkzaXxxEcjnLbNkxxxXXXX",
"partner_order_id": "test_partner_order_id_15",
"payin_amount": "100.000000000000000000",
"payin_currency": "USD",
"payin_group": "card",
"payin_txid": null,
"payout_amount": "0.003783150000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"redirect": "https://switchere.com/onramp/partner/o/XXXXX-XXXXXX",
"status": "processing",
"success": 1
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id. |
created_at | datetime | Order creation time. |
crypto_address | string | Crypto address for balance order type. |
crypto_delay | integer[0..900] | Crypto address expiration time. |
dst_address | string | Destination address. |
partner_order_id | string | Unique partner order id. |
payin_amount | float | Payin amount. |
payin_currency | currency | Payin currency. |
payin_group | paymentGroup | Payin group. |
payin_txid | string | Payin TXID. |
payout_amount | float | Payout amount. |
payout_currency | currency | Payout currency. |
payout_group | paymentGroup | Payout group. |
redirect | URL | Payment page URL. |
status | orderStatus | Status of created order. |
Tip: Field parameters info
Withdrawal Order Response will be available soon
{
"client_order_id": "AAAAA-BBBBBB",
"uuid": "00000000-0000-0000-0000-000000000000",
"expiration_time_sec": "1682069067"
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id is used to indify your order. |
uuid | string | Unique Switchere order uuid is used to confirm your withdrawal. |
expiration_time_sec | timestamp | lifetime of your code. |
Tip: Client Withdrawal
You can read about how to use client withdrawal instead of partners here
POST will be available soon
Confirm WithdrawalConfirm a withdrawal order.
Endpoint
POST https://switchere.com/api/v2/client/order/confirm
Parameters
Name | Type | Description |
---|---|---|
uuid | string | Unique Switchere order uuid generated by order creation. |
code | string | Unique 6-digit Switchere code sent as a callback message. |
Response
{
"client_order_id": "XXXXX-XXXXXX",
"created_at": "2020-11-10 13:51:34.864116",
"crypto_address": null,
"crypto_delay": null,
"dst_address": "2NA5XzyXXxNZVQkzaXxxEcjnLbNkxxxXXXX",
"partner_order_id": "test_partner_order_id_15",
"payin_amount": "100.000000000000000000",
"payin_currency": "USD",
"payin_group": "card",
"payin_txid": null,
"payout_amount": "0.003783150000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"status": "processing",
"success": 1
}
Name | Type | Description |
---|---|---|
client_order_id | string | Unique Switchere order id. |
created_at | datetime | Order creation time. |
crypto_address | string | Crypto address for balance order type. |
crypto_delay | integer[0..900] | Crypto address expiration time. |
dst_address | string | Destination address. |
partner_order_id | string | Unique partner order id. |
payin_amount | float | Payin amount. |
payin_currency | currency | Payin currency. |
payin_group | paymentGroup | Payin group. |
payin_txid | string | Payin TXID. |
payout_amount | float | Payout amount. |
payout_currency | currency | Payout currency. |
payout_group | paymentGroup | Payout group. |
status | orderStatus | Status of created order. |
Tip: Field parameters info
GET
Get Verification URL by order IDGet verification URL for your client if they reached the amount limit. You can check their limits via api or when you receive a callback in pending status.
Endpoint
GET https://switchere.com/api/v2/partner/order/verification_url
Name | Type | Description |
---|---|---|
partner_order_id required | string | Unique partner order id. |
Response
{
"verification_url": "https://switchere.com/onramp/o/xxxxxx?ts=$ts&fv=1"
}
Name | Type | Description |
---|---|---|
verification_url | string | URL for client verification. |
Tip: Partner callbacks
You can read about partner callbacks here
GET
Order listReturn all patner orders info.
Endpoint
GET https://switchere.com/api/v2/partner/order/list
Parameters
Name | Type | Description |
---|---|---|
page | integer | Page number. |
rows | integer | Amount of rows returned per page. |
timestamp | unix_timestamp_string | Select orders created only from a ceratin timestamp. |
Response
{
"rows": 50,
"total": 110,
"data": {
"created_at": "1621409585.000000",
"id": 123,
"partner_order_id": "xxxxx-xxxxx-xxxxx-xxxx1",
}
...
}
Name | Type | Description |
---|---|---|
rows | integer | Amount of rows returned per page. |
total | tinteger | Overall amount of rows. |
data | array | Array of order data. Each element of the array has fields: created_at , id , partner_order_id . |
TIP
created_at
- timestampid
- internal order idpartner_order_id
- external order id
POST
Order feeReturn data about fee for order.
Endpoint
POST https://switchere.com/api/v2/partner/order/fee
Parameters
Name | Type | Description |
---|---|---|
partner_order_id required | string | Unique partner order id. |
payin_currency required | currency | Payin currency. |
payin_amount | float | Payin amount. One of payin_amount , payout_amount is required. |
payin_group | paymentGroup | If empty, will be choosen first available method for payin currency. See order in enum. |
payout_currency required | currency | Payout currency |
payout_amount | float | Payout amount. One of payin_amount , payout_amount is required. |
payout_group | paymentGroup | If empty, will be choosen first available method for payout currency. See order in enum. |
is_floating_rate | integer[0..1] | Calculate order fee with or without floating rate. By default is_floating_rate = 0 . |
client_external_id | string | Send this parameter if you want to get client limits data. |
client_ip | IPv4 or IPv6 | Client IP. |
remote_country | country code | Client’s 2 letter country code that was received from client IP. |
Response
{
"margin_fee": "0",
"payin_amount": "1",
"payin_fee": "0",
"payin_max_amount": "5402532",
"payin_min_amount": "10",
"payout_amount": "0",
"payout_fee": "0.0005",
"payout_max_amount": "100",
"payout_min_amount": "0.00001",
"rate": "59705.882352941176470588",
"limits": {
"client_limit_in_payin_currency": "42043.233898",
"verification_level": "address"
}
}
Name | Type | Description |
---|---|---|
payin_amount | float | Payin amount. |
payout_amount | float | Payout amount |
payin_min_amount | float | Payin min amount. |
payin_max_amount | float | Payin max amount. |
payout_amount | float | Payout max amount. |
payout_max_amount | float | Payout min amount. |
rate | float | Rate payin_currency/payout_currency . |
payin_fee | float | Network fee in payin currency. |
payout_fee | float | Network fee in payout currency. |
margin_fee | float | Service fee in payin currency. |
limits | dict | Client's limit info where stored client limit in payin_currency and verification level. if the client_external_id parameter has been sent. |
Tip: Field parameters info
GET
Order dataReturns the data of a specific order.
Endpoint
GET https://switchere.com/api/v2/partner/order/{partner_order_id}
Parameters
Name | Type | Description |
---|---|---|
partner_order_id required | string | Unique partner order id. |
Response
{
"client_country": "GB",
"client_order_id": "XXXXX-XXXXXX",
"country_by_ip": "GB",
"created_at": 1655890695.8389,
"dst_address": "2NA5HzyLQJNZVQkzacroEcjnLbNkcmuUbFQ",
"partner_order_id": "57b4s43f-890d-xxxx-xxxd-9exxxx7dx8dd",
"payin_amount": "30.000000000000000000",
"payin_amount_eur": "30.000000000000000000000000000000000000",
"payin_currency": "EUR",
"payin_group": "card",
"payout_amount": "0.000913590000000000",
"payout_amount_eur": "17.677966500000000000000000000000000000000000000000000000",
"payout_currency": "BTC",
"payout_group": "crypto",
"payout_method": "crypto",
"service_fee_amount": "1.020000000000000000",
"service_fee_amount_eur": "1.020000000000000000000000000000000000",
"service_fee_percent": "3.4000",
"status": "pending",
"status_log":[
{
"at": 1655890696.0,
"status": "payin_pending"
},
{
"at": 1655890775.0,
"status": "processing"
},
{
"at": 1655892607.0,
"status": "pending"
}
]
}
Name | Type | Description |
---|---|---|
partner_order_id | string | Unique partner order id. |
client_order_id | string | Unique client order id. |
payin_amount | float | Payin currency. |
payin_amount_eur | float | Payin currency in EUR. |
payout_amount | float | Payout amount. |
payout_amount_eur | float | Payout amount in EUR. |
service_fee_amount | float | Switchere fee. |
service_fee_amount_eur | float | Switchere fee in EUR. |
service_fee_percent | float | Switchere fee percent. |
payin_currency | currency | Payin currency. |
payout_currency | currency | Payout currency. |
payin_group | paymentGroup | Payin payment group. |
payout_group | paymentGroup | Payout payment group. |
payib_method | paymentMethod | Payin payment method. |
payout_method | paymentMethod | Payout payment method. |
payout_txid | string | TXID of payout transaction. |
status | orderStatus | Current status of order. |
substatus | orderSubStatus | Current substatus of order. |
card_type | cardType | Client card type. |
card_number | string | Client card number. |
payin_card_country | country code | Client card country. |
dst_address | string | Wallet address where Switchere will send cryptocurrency. |
dst_tag | integer[0..4294967295] | Tag for XRP address. |
memo_id | string | MEMO_ID for EOS address. |
memo_value | string | MEMO_VALUE for XLM address. |
client_country | country code | Client registration country. |
country_by_ip | country code | Client last login country by IP. |
created_at | unix_timestamp_string | Timestamp when irder was created. |
status_log | order status log | Order status log. |
child_order_id | string | Unique child order id if it exists. |
child_payin_amount | float | Child order payin amount if it exists. |
child_payout_amount | float | Child order payout amount if it exists. |
child_payin_currency | float | Child order payin currency if it exists. |
child_payout_currency | float | Child order payout currency if it exists. |
child_order_status | orderStatus | Current status of child order if it exists. |
child_order_substatus | orderSubStatus | Current substatus of child order if it exists. |
Tip:
Field parameters info here
POST
Client createCreate new partner client.
- Available only for direct by partners
Endpoint
POST https://switchere.com/api/v2/partner/client/register
Parameters
Name | Type | Description |
---|---|---|
client_external_id required | string | Unique client id in your system. |
email required | email | Client email. |
password required | string | Client password. |
phone | phone | Client phone. |
email_verified | bool | Status of email confirmation. |
phone_verified | bool | Status of phone confirmation. |
first_name | string | Client first name. |
last_name | string | Client last name. |
birth_date | datetime | Client birth date. |
gender | male or female | Client gender. |
country | country code | Client's country of residence. |
client_ip required | IPv4 or IPv6 | Client IP. |
remote_country required | country code | Client’s 2 letter country code that was received from client IP. |
Response
{
"client_external_id": "test_client_external_id_23",
"is_registered": 1
}
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
is_registered | bool | 1 if registration was successful. |
POST
Client loginLogin as a specific client.
- Available only for direct by partners
Endpoint
POST https://switchere.com/api/v2/partner/client/login
Parameters
Name | Type | Description |
---|---|---|
email required | email | Client email. |
password required | string | Client password. |
client_ip required | IPv4 or IPv6 | Client IP. |
remote_country required | country code | Client’s 2 letter country code that was received from client IP. |
Response
{
"ts": "16764196840816"
}
Name | Type | Description |
---|---|---|
ts | string | One time token that uses to view an order of a specific client. |
POST
Client VerificationVerify partner client.
- Available only for direct by partners
Endpoint
POST https://switchere.com/api/v2/partner/client/verification/{provider}
Parameters
Name | Type | Description |
---|---|---|
provider | string | Currently you can only use sumsub as a provider. |
external_id required | string | Unique client id in your system. |
Response
{
"client_external_id": "1234567894",
"provider": "sumsub",
"status_msg": {
"verification": "Added In Queue"
},
"success": 1
}
Name | Type | Description |
---|---|---|
client_external_id required | string | Unique client id in your system. |
provider | string | A provider name. |
status_msg | dict | The dict contains information about the status of the verification, in detail, it is necessary to look at the verification key. |
GET
Get Verification URL by clientGet verification URL for your client if they reached the amount limit. You can check their limits via api or when you receive a callback in pending status.
Endpoint
GET https://switchere.com/api/v2/partner/client/verification_url
Parameters
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
client_email | email | Client email. |
required
One of client_external_id
, client_email
is required.
Response
{
"verification_url": "https://switchere.com/onramp/o/xxxxxx?ts=$ts&fv=1"
}
Name | Type | Description |
---|---|---|
verification_url | string | URL for client verification. |
Tip: Partner callbacks
You can read about partner callbacks here
PATCH
Client UpdateUpdate partner client.
- Available only for direct by partners
Endpoint
POST https://switchere.com/api/v2/partner/client/{client_external_id}/update
Parameters
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
email | Client email. | |
phone | phone | Client phone. |
email_verified | bool | Status of email confirmation. |
phone_verified | bool | Status of phone confirmation. |
Response
{
"client_external_id": "123123123123",
"is_updated": 1
}
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
is_updated | bool | 1 if the update was successful. |
POST
Client InfoReturn data about client.
- Available only for direct by partners
Endpoint
POST https://switchere.com/api/v2/partner/client/{client_external_id}
Parameters
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
Response
{
"birth_date": null,
"client_external_id": "1234567895",
"country": "GB",
"external_email": "[email protected]",
"external_email_verified": 1,
"external_phone": "+380991234246",
"external_phone_verified": 1,
"first_name": "Jon",
"gender": "male",
"last_name": "Jones",
"limits": {
"client_limit_in_EUR": 999999,
"verification_level": "bank_statement"
}
}
Name | Type | Description |
---|---|---|
client_external_id | string | Unique client id in your system. |
external_email | email | Client email. |
external_phone | phone | Client phone. |
external_email_verified | bool | Status of email confirmation. |
external_phone_verified | bool | Status of phone confirmation. |
first_name | string | Client first name. |
last_name | string | Client last name. |
birth_date | datetime | Client birth date. |
gender | male or female | Client gender. |
country | country code | Client's country of residence. |
limits | dict | Client's limit info where stored client limit in EUR and verification level. |
Tip: Field parameters info
POST
Send MessageSend message to specific phone via differ in various ways. Such as: WhatsApp, SMS.
Endpoint
POST https://switchere.com/api/v2/partner/client/send_msg
Parameters
Name | Type | Description |
---|---|---|
phone | string | Client phone. |
channel | messageChannel | Message channel to send. |
sms_text | string | SMS text if channel is sms . |
whatsapp_template | string | WhatsApp template name if channel is whatsapp . |
whatsapp_params | string | WhatsApp template params if channel is whatsapp . |
Response
{
"message_id": "720f2aaa-9cee-4520-b6f8-78412da937cf"
}
Name | Type | Description |
---|---|---|
message_id | string | Unique message ID. |
Tip: Field parameters info