Partner

System status GET

Return simple answer {"status":"OK"}.

Endpoint

GET https://switchere.com/api/v2/partner/healthcheck

Response

{
    status: "OK"
}
NameTypeDescription
statusstringSystem status.

Available currencies GET

Return data about partner payin->payout currencies.

Endpoint

GET https://switchere.com/api/v2/partner/currency

Response

{
    "...": [
        "...",
        "...",
        "..."
    ]
}
NameTypeDescription
...dict of arraysPayin currency -> [ Payout currencies for this Payin currency ].

Available payment methods GET

Return data about partner payments.

Endpoint

GET https://switchere.com/api/v2/partner/payment/{directionName}

Parameters

NameTypeDescription
directionName requireddirectionName of direction.

Response

[
    {
        "group": "card",
        "info": "USD, EUR",
        "list": [
            {
            "currency": "USD",
            "is_crypto": false
            }
        ],
        "title": "Credit/Debit Card"
    }
]
NameTypeDescription
grouppaymentGroupPayment group.
infostringInfo about group.
listarrayArray objects contain: currency and is_crypto.
titlestringTitle for group.

Tip: Field parameters info

Ticker list GET

Return 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"
    }
]
NameTypeDescription
namestringPair name.
askfloatAsk rate.
bidfloatBid rate.
floating_ratefloatFloating rate.

Ticker GET

Return data about partner rate.

Endpoint

GET https://switchere.com/api/v2/partner/ticker/{tickerName}

Parameters

NameTypeDescription
tickerName requiredstringExample: BTC-USD
Name of rate.

Response

{
    "ask": "21187.44",
    "bid": "20364.70",
    "floating_rate": "20752.5",
    "name": "BTC-USD"
}
NameTypeDescription
namestringPair name.
askfloatAsk rate.
bidfloatBid rate.
floating_ratefloatFloating rate.

Order create POST

Create new order for your partner client.

Endpoint

POST https://switchere.com/api/v2/partner/order/create

Parameters

NameTypeDescription
partner_order_id requiredstringUnique partner order id.
payin_currency requiredcurrencyPayin currency.
payin_amountfloatPayin amount. One of payin_amount, payout_amount is required.
payin_grouppaymentGroupIf empty, will be choosen first available method for payin currency. See order in enum.
payout_currency requiredcurrencyPayout currency.
payout_amountfloatPayout amount. One of payin_amount, payout_amount is required.
payout_grouppaymentGroupIf empty, will be choosen first available method for payout currency. See order in enum.
purchase_currencycurrencyPurchase currency for merchant order. can only be fiat: EUR, USD.
purchase_amountfloatPurchase amount for merchant order.
dst_addressstringDestination address.
memostringCrypto memo.
client_emailemailEmail of a particular client.
couponstringSwitchere coupon.
free_firstinteger[0..1]Enable or disable free first order policy. By default free_first = 1.
client_ip requiredIPv4 or IPv6Client IP.
remote_country requiredcountry codeClient’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
}
NameTypeDescription
client_order_idstringUnique Switchere order id.
created_atdatetimeOrder creation time.
crypto_addressstringCrypto address for balance order type.
crypto_delayinteger[0..900]Crypto address expiration time.
dst_addressstringDestination address.
partner_order_idstringUnique partner order id.
payin_amountfloatPayin amount.
payin_currencycurrencyPayin currency.
payin_grouppaymentGroupPayin group.
payin_txidstringPayin TXID.
payout_amountfloatPayout amount.
payout_currencycurrencyPayout currency.
payout_grouppaymentGroupPayout group.
redirectURLPayment page URL.
statusorderStatusStatus 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"
}
NameTypeDescription
client_order_idstringUnique Switchere order id is used to indify your order.
uuidstringUnique Switchere order uuid is used to confirm your withdrawal.
expiration_time_sectimestamplifetime of your code.

Tip: Client Withdrawal

You can read about how to use client withdrawal instead of partners here

Confirm Withdrawal POST will be available soon

Confirm a withdrawal order.

Endpoint

POST https://switchere.com/api/v2/client/order/confirm

Parameters

NameTypeDescription
uuidstringUnique Switchere order uuid generated by order creation.
codestringUnique 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
}
NameTypeDescription
client_order_idstringUnique Switchere order id.
created_atdatetimeOrder creation time.
crypto_addressstringCrypto address for balance order type.
crypto_delayinteger[0..900]Crypto address expiration time.
dst_addressstringDestination address.
partner_order_idstringUnique partner order id.
payin_amountfloatPayin amount.
payin_currencycurrencyPayin currency.
payin_grouppaymentGroupPayin group.
payin_txidstringPayin TXID.
payout_amountfloatPayout amount.
payout_currencycurrencyPayout currency.
payout_grouppaymentGroupPayout group.
statusorderStatusStatus of created order.

Tip: Field parameters info

Get Verification URL by order ID GET

Get 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
NameTypeDescription
partner_order_id requiredstringUnique partner order id.

Response

{
    "verification_url": "https://switchere.com/onramp/o/xxxxxx?ts=$ts&fv=1"
}
NameTypeDescription
verification_urlstringURL for client verification.

Tip: Partner callbacks

You can read about partner callbacks here

Order list GET

Return all patner orders info.

Endpoint

GET https://switchere.com/api/v2/partner/order/list

Parameters

NameTypeDescription
pageintegerPage number.
rowsintegerAmount of rows returned per page.
timestampunix_timestamp_stringSelect 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",
    }
    ...
}
NameTypeDescription
rowsintegerAmount of rows returned per page.
totaltintegerOverall amount of rows.
dataarrayArray of order data. Each element of the array has fields: created_at, id, partner_order_id.

TIP

  • created_at - timestamp
  • id - internal order id
  • partner_order_id - external order id

Order fee POST

Return data about fee for order.

Endpoint

POST https://switchere.com/api/v2/partner/order/fee

Parameters

NameTypeDescription
partner_order_id requiredstringUnique partner order id.
payin_currency requiredcurrencyPayin currency.
payin_amountfloatPayin amount. One of payin_amount, payout_amount is required.
payin_grouppaymentGroupIf empty, will be choosen first available method for payin currency. See order in enum.
payout_currency requiredcurrencyPayout currency
payout_amountfloatPayout amount. One of payin_amount, payout_amount is required.
payout_grouppaymentGroupIf empty, will be choosen first available method for payout currency. See order in enum.
is_floating_rateinteger[0..1]Calculate order fee with or without floating rate. By default is_floating_rate = 0.
client_external_idstringSend this parameter if you want to get client limits data.
client_ipIPv4 or IPv6Client IP.
remote_countrycountry codeClient’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"
    }
}
NameTypeDescription
payin_amountfloatPayin amount.
payout_amountfloatPayout amount
payin_min_amountfloatPayin min amount.
payin_max_amountfloatPayin max amount.
payout_amountfloatPayout max amount.
payout_max_amountfloatPayout min amount.
ratefloatRate payin_currency/payout_currency.
payin_feefloatNetwork fee in payin currency.
payout_feefloatNetwork fee in payout currency.
margin_feefloatService fee in payin currency.
limitsdictClient'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

Order data GET

Returns the data of a specific order.

Endpoint

GET https://switchere.com/api/v2/partner/order/{partner_order_id}

Parameters

NameTypeDescription
partner_order_id requiredstringUnique 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"
        }
    ]
}
NameTypeDescription
partner_order_idstringUnique partner order id.
client_order_idstringUnique client order id.
payin_amountfloatPayin currency.
payin_amount_eurfloatPayin currency in EUR.
payout_amountfloatPayout amount.
payout_amount_eurfloatPayout amount in EUR.
service_fee_amountfloatSwitchere fee.
service_fee_amount_eurfloatSwitchere fee in EUR.
service_fee_percentfloatSwitchere fee percent.
payin_currencycurrencyPayin currency.
payout_currencycurrencyPayout currency.
payin_grouppaymentGroupPayin payment group.
payout_grouppaymentGroupPayout payment group.
payib_methodpaymentMethodPayin payment method.
payout_methodpaymentMethodPayout payment method.
payout_txidstringTXID of payout transaction.
statusorderStatusCurrent status of order.
substatusorderSubStatusCurrent substatus of order.
card_typecardTypeClient card type.
card_numberstringClient card number.
payin_card_countrycountry codeClient card country.
dst_addressstringWallet address where Switchere will send cryptocurrency.
dst_taginteger[0..4294967295]Tag for XRP address.
memo_idstringMEMO_ID for EOS address.
memo_valuestringMEMO_VALUE for XLM address.
client_countrycountry codeClient registration country.
country_by_ipcountry codeClient last login country by IP.
created_atunix_timestamp_stringTimestamp when irder was created.
status_logorder status logOrder status log.
child_order_idstringUnique child order id if it exists.
child_payin_amountfloatChild order payin amount if it exists.
child_payout_amountfloatChild order payout amount if it exists.
child_payin_currencyfloatChild order payin currency if it exists.
child_payout_currencyfloatChild order payout currency if it exists.
child_order_statusorderStatusCurrent status of child order if it exists.
child_order_substatusorderSubStatusCurrent substatus of child order if it exists.

Tip:

Field parameters info here

Client create POST

Create new partner client.

  • Available only for direct by partners

Endpoint

POST https://switchere.com/api/v2/partner/client/register

Parameters

NameTypeDescription
client_external_id requiredstringUnique client id in your system.
email requiredemailClient email.
password requiredstringClient password.
phonephoneClient phone.
email_verifiedboolStatus of email confirmation.
phone_verifiedboolStatus of phone confirmation.
first_namestringClient first name.
last_namestringClient last name.
birth_datedatetimeClient birth date.
gendermale or femaleClient gender.
countrycountry codeClient's country of residence.
client_ip requiredIPv4 or IPv6Client IP.
remote_country requiredcountry codeClient’s 2 letter country code that was received from client IP.

Response

{
    "client_external_id": "test_client_external_id_23",
    "is_registered": 1
}
NameTypeDescription
client_external_idstringUnique client id in your system.
is_registeredbool1 if registration was successful.

Client login POST

Login as a specific client.

  • Available only for direct by partners

Endpoint

POST https://switchere.com/api/v2/partner/client/login

Parameters

NameTypeDescription
email requiredemailClient email.
password requiredstringClient password.
client_ip requiredIPv4 or IPv6Client IP.
remote_country requiredcountry codeClient’s 2 letter country code that was received from client IP.

Response

{
    "ts": "16764196840816"
}
NameTypeDescription
tsstringOne time token that uses to view an order of a specific client.

Client Verification POST

Verify partner client.

  • Available only for direct by partners

Endpoint

POST https://switchere.com/api/v2/partner/client/verification/{provider}

Parameters

NameTypeDescription
providerstringCurrently you can only use sumsub as a provider.
external_id requiredstringUnique client id in your system.

Response

{
    "client_external_id": "1234567894",
    "provider": "sumsub",
    "status_msg": {
        "verification": "Added In Queue"
    },
    "success": 1
}
NameTypeDescription
client_external_id requiredstringUnique client id in your system.
providerstringA provider name.
status_msgdictThe dict contains information about the status of the verification, in detail, it is necessary to look at the verification key.

Get Verification URL by client GET

Get 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

NameTypeDescription
client_external_idstringUnique client id in your system.
client_emailemailClient email.

required

One of client_external_id, client_email is required.

Response

{
    "verification_url": "https://switchere.com/onramp/o/xxxxxx?ts=$ts&fv=1"
}
NameTypeDescription
verification_urlstringURL for client verification.

Tip: Partner callbacks

You can read about partner callbacks here

Client Update PATCH

Update partner client.

  • Available only for direct by partners

Endpoint

POST https://switchere.com/api/v2/partner/client/{client_external_id}/update

Parameters

NameTypeDescription
client_external_idstringUnique client id in your system.
emailemailClient email.
phonephoneClient phone.
email_verifiedboolStatus of email confirmation.
phone_verifiedboolStatus of phone confirmation.

Response

{
    "client_external_id": "123123123123",
    "is_updated": 1
}
NameTypeDescription
client_external_idstringUnique client id in your system.
is_updatedbool1 if the update was successful.

Client Info POST

Return data about client.

  • Available only for direct by partners

Endpoint

POST https://switchere.com/api/v2/partner/client/{client_external_id}

Parameters

NameTypeDescription
client_external_idstringUnique 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"
    }
}
NameTypeDescription
client_external_idstringUnique client id in your system.
external_emailemailClient email.
external_phonephoneClient phone.
external_email_verifiedboolStatus of email confirmation.
external_phone_verifiedboolStatus of phone confirmation.
first_namestringClient first name.
last_namestringClient last name.
birth_datedatetimeClient birth date.
gendermale or femaleClient gender.
countrycountry codeClient's country of residence.
limitsdictClient's limit info where stored client limit in EUR and verification level.

Tip: Field parameters info

Send Message POST

Send 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

NameTypeDescription
phonestringClient phone.
channelmessageChannelMessage channel to send.
sms_textstringSMS text if channel is sms.
whatsapp_templatestringWhatsApp template name if channel is whatsapp.
whatsapp_paramsstringWhatsApp template params if channel is whatsapp.

Response

{
    "message_id": "720f2aaa-9cee-4520-b6f8-78412da937cf"
}
NameTypeDescription
message_idstringUnique message ID.

Tip: Field parameters info

Last Updated: