Partner
Healthcheck GET
Returns simple answer {"status":"OK"}.
Endpoint
GET https://switchere.com/api/v3/partner/healthcheck
Response
{
status: "OK"
}
| Name | Type | Description |
|---|---|---|
| status | string | System status. |
Currencies GET
Return data about partner currencies.
Endpoint
GET https://switchere.com/api/v3/partner/currency
Response
[
{
"code": "AAVE",
"currency": "AAVE",
"is_crypto": true,
"name": "Aave",
"network": "ETH",
"network_full": "Ethereum (ERC20)",
"token": "ERC20"
},
{
"code": "AUD",
"currency": "AUD",
"is_crypto": false,
"name": "Australian dollar"
},
{
"code": "AXS",
"currency": "AXS",
"is_crypto": true,
"name": "Axie Infinity",
"network": "ETH",
"network_full": "Ethereum (ERC20)",
"token": "ERC20"
},
{
"code": "BNBBSC",
"currency": "BNB",
"is_crypto": true,
"name": "Binance Coin",
"network": "BSC",
"network_full": "Binance Smart Chain (BEP20)",
"token": "BSC"
},
...
]
| Name | Type | Description |
|---|---|---|
| code | string | Currency code. |
| currency | string | Currency name. |
| is_crypto | boolean | Fiat or Crypto. |
| name | string | Currency full name. |
| network | string | Network code. Only for crypto. |
| network_full_name | string | Network full name. Only for crypto. |
| token | string | Network token code. Only for crypto. |
Payment channels GET
Return data about partner available channels.
Endpoint
GET https://switchere.com/api/v3/partner/channel/{modeName}
Parameters
| Name | Type | Description |
|---|---|---|
| modeName required | mode | Payment mode. |
Tip: Field parameters info
Response
{
"in": [
{
"channel": "astropay",
"info": "AstroPay",
"list": [
{
"code": "USD",
"currency": "USD",
"is_crypto": false,
"name": "US Dollar"
},
...
{
"code": "ZAR",
"currency": "ZAR",
"is_crypto": false,
"name": "South African rand"
}
],
"title": "AstroPay"
},
{
"channel": "card",
"info": "USD, EUR",
"list": [
{
"code": "EUR",
"currency": "EUR",
"is_crypto": false,
"name": "Euro"
},
...
{
"code": "ZAR",
"currency": "ZAR",
"is_crypto": false,
"name": "South African rand"
}
],
"title": "Credit/Debit Card"
},
...
],
"out": [
{
"channel": "crypto",
"info": "BTC, ETH, LTC and more",
"list": [
{
"code": "BTC",
"currency": "BTC",
"is_crypto": true,
"name": "Bitcoin",
"network_full_name": "Bitcoin"
},
...
{
"code": "YFI",
"currency": "YFI",
"is_crypto": true,
"name": "Yearn Finance",
"network": "ETH",
"network_full_name": "Ethereum (ERC20)",
"token": "ERC20"
}
],
"title": "Crypto"
}
]
}
| Name | Type | Description |
|---|---|---|
| channel | channel | Payment channel. |
| info | string | Info about channel. |
| list | array | Array objects contain: code, currency, is_crypto and name for all currencies. And additional network, network_full_name and token for crypto. |
| title | string | Title for channel. |
Tip: Field parameters info
- channel
code- currency codecurrency- currency nameis_crypto- fiat or cryptoname- currency full namenetwork- network codenetwork_full_name- network full nametoken- network token code
Request create POST
Create a request with a set of parameters.
Endpoint
POST https://switchere.com/api/v3/partner/create_request
Parameters
| Name | Type | Description |
|---|---|---|
| partner_order_id | string | Unique partner id for the order, 64 characters [A-Za-z0-9-_] - you should make it up yourself - it should be UNIQ. |
| mode | mode | Payment mode. |
| channel | channel | Payment channel. User cannot change value in the widget. |
| channel_default | channel | Payment channel. User can change value in the widget. |
| payin_amount | string | Payin amount. User cannot change value in the widget. |
| payin_amount_default | string | Payin amount. User can change value in the widget. |
| payin_currency | currency | Payin currency. channel or channel_default is required. User cannot change value in the widget. |
| payin_currency_default | currency | Payin currency. channel or channel_default is required. User can change value in the widget. |
| payout_currency | currency | Payout currency. channel or channel_default is required. User cannot change value in the widget. |
| payout_currency_default | `currency | Payout currency. channel or channel_default is required. User can change value in the widget. |
| dst_address | string | Wallet address. Must be used together with payout_currency. You should use address from testnet with sandbox. User cannot change value in the widget. |
| client_ip | string | Client ip. |
| http_return_failed | string | Redirect URL for failed order. |
| http_return_success | string | Redirect URL for successful order. |
Response
{
"request_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
}
| Name | Type | Description |
|---|---|---|
| request_id | string | Created request's ID. |
Order list GET
Return all patner orders info.
Endpoint
GET https://switchere.com/api/v3/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": "1763194869.324230",
"partner_order_id": "9c077655-xxxx-xxxx-xxxx-a7ff776856f4",
"status": "expired"
}
...
]
}
| Name | Type | Description |
|---|---|---|
| rows | integer | Amount of rows returned per page. |
| total | tinteger | Overall amount of rows. |
| data | array | Array objects contain: created_at, status and partner_order_id. |
TIP
created_at- timestampstatus- order statuspartner_order_id- external order id
Order data GET
Returns the data of a specific patner order.
Endpoint
GET https://switchere.com/api/v3/partner/order/{partner_order_id}
Parameters
| Name | Type | Description |
|---|---|---|
| partner_order_id required | string | Unique partner order id. |
Response
{
"channel": "card",
"client_country": "US",
"client_email": "[email protected]",
"client_nice_id": "XXXXXXXX",
"client_order_id": "XXXXX-XXXXXX",
"country_by_ip": "US",
"created_at": "1786309195.365966",
"dst_address": "3MMn....vpJE",
"expected_payin_amount": "150.000000000000000000",
"expected_payout_amount": "0.002118740000000000",
"finished_at": "1786309859.000000",
"mode": "buy",
"partner_order_id": "01ff1f6a-xxxx-xxxx-xxxx-1c8e18eeb7ea",
"payin_amount": "150.000000000000000000",
"payin_currency": "USD",
"payout_amount": "0.002107260000000000",
"payout_currency": "BTC",
"payout_txid": "1340....bccb",
"status": "finished",
"status_log": [
{
"at": "1786309195.000000",
"status": "payin_pending"
},
{
"at": "1786309859.000000",
"status": "finished"
}
]
}
| Name | Type | Description |
|---|---|---|
| mode | mode | Payment mode. |
| channel | channel | Payment channel. |
| client_email | string | Client email. |
| client_nice_id | string | Unique client id. |
| partner_order_id | string | Unique partner order id. |
| client_order_id | string | Unique client order id. |
| payin_amount | float | Payin amount. |
| expected_payin_amount | float | Expected payin amount. |
| payout_amount | float | Payout amount. |
| expected_payout_amount | float | Expected payout amount. |
| payin_currency | currency | Payin currency. |
| payout_currency | currency | Payout currency. |
| payout_txid | string | TXID of payout transaction. |
| status | orderStatus | Current status of order. |
| 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_type | string | MEMO_TYPE for XLM 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 order was created. |
| finished_at | unix_timestamp_string | Timestamp when order was finished. |
| status_log | order status log | Order status log. |
Order fee POST
Return data about partner fee for order.
Endpoint
POST https://switchere.com/api/v3/partner/fee
Parameters
| Name | Type | Description |
|---|---|---|
| mode required | mode | Payment mode. |
| channel required | channel | Payment channel. |
| payin_currency required | currency | Payin currency. |
| payout_currency required | currency | Payout currency. |
| payin_amount required | float | Payin amount. |
Response
{
"network_fee": "string",
"payin_amount": "string",
"payin_max_amount": "string",
"payin_min_amount": "string",
"payout_amount": "string",
"rate": "string",
"service_fee": "string",
}
| Name | Type | Description |
|---|---|---|
| payin_amount | string | Payin amount. |
| payin_min_amount | string | Payin minimal amount. |
| payin_max_amount | string | Payin maximal amount. |
| payout_amount | string | Payout amount. |
| rate | string | Rate payin_currency/payout_currency. |
| network_fee | string | Network fee in payout currency. |
| service_fee | string | Service fee in payin currency. |
Order fee buy POST
Return data about partner fee for buy crypto order.
Endpoint
POST https://switchere.com/api/v3/partner/fee/buy
Parameters
| Name | Type | Description |
|---|---|---|
| payin_currency required | currency | Payin currency. Required only fiat. |
| payin_amount required | float | Payin amount. |
| payout_currency required | currency | Payout currency. Required only crypto. |
Tip: Field parameters info
Response
{
"...": {
"network_fee": "string",
"payin_amount": "string",
"payin_max_amount": "string",
"payin_min_amount": "string",
"payout_amount": "string",
"rate": "string",
"service_fee": "string",
}
}
| Name | Type | Description |
|---|---|---|
| ... | dict of dicts | Payin channel -> { Fee data for this Payin channel } . |
Order fee sell POST
Return data about partner fee for sell crypto order.
Endpoint
POST https://switchere.com/api/v3/partner/fee/sell
Parameters
| Name | Type | Description |
|---|---|---|
| payin_currency required | currency | Payin currency. Required only crypto. |
| payin_amount required | float | Payin amount. |
| payout_currency required | currency | Payout currency. Required only fiat. |
Tip: Field parameters info
Response
{
"...": {
"network_fee": "string",
"payin_amount": "string",
"payin_max_amount": "string",
"payin_min_amount": "string",
"payout_amount": "string",
"rate": "string",
"service_fee": "string",
}
}
| Name | Type | Description |
|---|---|---|
| ... | dict of dicts | Payout channel -> { Fee data for this Payout channel } . |
TIP
Also see field parameters