Settl API Reference
What is Settl?
Settl is a hosted crypto payment gateway. Merchants use it to accept cryptocurrency from their customers without running wallet, exchange-rate, or settlement infrastructure themselves. The service handles address generation, price conversion, confirmation tracking, and optional auto-conversion of received crypto into a preferred settlement currency.
Every endpoint in this document is a REST call made over HTTPS with a JSON body and an Authorization: Bearer <token> header. Responses are JSON.
How It Works
- Merchant signs in. Using an API key and secret issued by the platform, the merchant exchanges those credentials for a short-lived JWT Bearer token. Every subsequent call carries this token. See Sign in for a bearer token.
- Merchant creates a payment. Call
POST /v1/paymentwith the invoice details. The service returns a payment record identified by apaymentId. - Customer pays. The merchant fetches
GET /v1/payment/{paymentId}/addressesto obtain one crypto receive address per supported currency/network, then presents them (or the embeddable widget) to the customer. The customer sends funds to any of those addresses. - Service watches the blockchain. As confirmations accumulate, the payment transitions through
Pending → Unconfirmed → Complete. If the customer sends less than expected for a fixed-amount invoice, the payment stays partial; anything sent on an open-deposit invoice is credited as received. - Service notifies the merchant. If the merchant has registered a webhook, the service POSTs status-change events — payment created, payment complete, and so on — to the merchant's URL, signed with the webhook secret.
- Merchant withdraws settled funds. Send to an external address via
POST /v1/withdrawal, optionally approving with a TOTP code.
Two common invoice shapes
Every invoice is created by the same endpoint — the shape is determined by a single field, amount_required.
Scenario 1 — Fixed Amount Invoice
Use this when you want to charge the customer exactly a specific amount (e.g. "Pay 0.05 ETH for order #42"). The payment is considered Complete only once the full amount has been received on-chain and confirmed.
Step-by-step
- (Once, at merchant setup) Register a webhook via
POST /v1/webhookso you're notified when a payment completes, rather than polling. - List supported currencies via
GET /v1/currencyso you know what values to pass formerchant_order_currency_id. - Create the invoice with
POST /v1/payment. Set:amount_required— the exact amount, > 0.merchant_order_currency_id— the quote currency (e.g."ETH","BTC","USDT").merchant_order_currency_network— settlement network (e.g."ETH"for Ether,"TRC20"for USDT on Tron,"fiat"for fiat currencies).merchant_order_id— your own order reference.
{ "amount_required": 0.05, "merchant_order_currency_id": "ETH", "merchant_order_currency_network": "ETH", "merchant_order_id": "order-0001" } - Show the customer the pay-to addresses returned by
GET /v1/payment/{paymentId}/addresses. Each address is scoped to one currency/network and encodes the exact amount when the chain supports it. - Wait for settlement. Either listen for the webhook or poll
GET /v1/payment/ the payment-detail read. Status transitions fromPending→Unconfirmed→Complete. - Fulfil the order once the status reaches
Complete.
Scenario 2 — Open Deposit Invoice
Use this when you want the customer to top up an account by an unspecified amount (e.g. "Deposit crypto to your balance — any amount"). There is no "right" amount, so any received funds are credited in full and the invoice stays open for further deposits until it expires.
Step-by-step
- (Once, at merchant setup) Register a webhook via
POST /v1/webhook— you especially want the credit event for this scenario. - Create the invoice with
POST /v1/payment. The key difference:amount_requiredis0.{ "amount_required": 0, "merchant_order_currency_id": "ETH", "merchant_order_currency_network": "ETH", "merchant_order_id": "deposit-alice-20260101", "merchant_order_metadata": "customer=alice@example.com" } - Show the customer a receive address via
GET /v1/payment/{paymentId}/addresses. Because no fixed amount is required, you typically display the address to the customer in their account dashboard for as long as you want the deposit window to stay open. - Credit the customer as funds arrive. Each deposit emits an event on your webhook with the amount and the
merchant_order_id. Usemerchant_order_metadatato tie the payment back to the internal user. - Optional: close the deposit window later by calling
PATCH /v1/payment/{paymentId}/Complete, which prevents further crediting.
Authentication
Exchange your API key and secret for a short-lived JWT bearer token. Every other endpoint in this reference requires this token in the Authorization: Bearer <token> header. Tokens expire — repeat this call to refresh.
POST
/graphql
Sign in for a bearer token
Calls the service_signin GraphQL mutation with your API key and secret. Returns a JWT and its expiration timestamp. Use the returned jwt as the Bearer token on every subsequent REST call.
Variables
| Name | Type | Required | Description |
|---|---|---|---|
service_api_key |
string |
required | Your Settl API key, issued by the platform. |
service_api_secret |
string |
required | Your Settl API secret. Treat as a password — do not embed in client-side code. |
Response
| Field | Type | Description |
|---|---|---|
data.service_signin.jwt |
string |
The bearer token. Send as Authorization: Bearer <jwt> on every other endpoint. |
data.service_signin.expires_at |
number |
Token expiration as a Unix timestamp. Re-sign to refresh before this time. |
Code Examples
curl -X POST 'https://vakotrade-demo.cryptosrvc.com/graphql' \
-H 'Content-Type: application/json' \
-d '{"query":"mutation service_signin($key: String!, $secret: String!) { service_signin(service_api_key: $key, service_api_secret: $secret) { jwt expires_at } }","variables":{"key":"YOUR_API_KEY","secret":"YOUR_API_SECRET"}}'
import requests
url = "https://vakotrade-demo.cryptosrvc.com/graphql"
body = {
"query": "mutation service_signin($key: String!, $secret: String!) { service_signin(service_api_key: $key, service_api_secret: $secret) { jwt expires_at } }",
"variables": {"key": "YOUR_API_KEY", "secret": "YOUR_API_SECRET"},
}
response = requests.post(url, json=body)
jwt = response.json()["data"]["service_signin"]["jwt"]
print(jwt)
const response = await fetch("https://vakotrade-demo.cryptosrvc.com/graphql", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
query: "mutation service_signin($key: String!, $secret: String!) { service_signin(service_api_key: $key, service_api_secret: $secret) { jwt expires_at } }",
variables: { key: "YOUR_API_KEY", secret: "YOUR_API_SECRET" },
}),
});
const data = await response.json();
const jwt = data.data.service_signin.jwt;
console.log(jwt);Example response
{
"data": {
"service_signin": {
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": 1735689600
}
}
}
User
Read and update merchant and sub-user settings, preferred currency, widget theming, and confirmation thresholds.
GET
/v1/user/settings
Get merchant settings
Return the merchant's widget, currency, and confirmation settings in one payload.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/user/settings' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/settings"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/settings", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/user/info
Get merchant info
Return the authenticated merchant's profile.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/user/info' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/info"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/info", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/user/child-users
List sub-users
Return the sub-users (child users) belonging to the authenticated merchant.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pageIndex |
number |
optional | Zero-based page index. |
pageSize |
number |
optional | Items per page (default 10). |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/user/child-users?pageIndex=0&pageSize=10' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/child-users?pageIndex=0&pageSize=10"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/child-users?pageIndex=0&pageSize=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/user/checkin
Check-in
Heartbeat endpoint — touches the merchant record's "last active" timestamp.
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/user/checkin' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/checkin"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/checkin", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
POST
/v1/user/child
Create a sub-user
Create a sub-user under the authenticated merchant.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
email |
string |
required | Login email for the sub-user. |
label |
string |
required | Display name. |
preferred_currency_id |
string |
required | Default currency for amounts shown to this user. |
fee_group_id |
string |
required | Fee group to associate with this user. |
own_default_fee |
number |
optional | Optional override — default deposit fee for this user, in percent. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/user/child' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"email":"ops@example.com","label":"Ops team","preferred_currency_id":"ETH","fee_group_id":"standard","own_default_fee":0.5}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/child"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"email": "ops@example.com",
"label": "Ops team",
"preferred_currency_id": "ETH",
"fee_group_id": "standard",
"own_default_fee": 0.5
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/child", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"email": "ops@example.com",
"label": "Ops team",
"preferred_currency_id": "ETH",
"fee_group_id": "standard",
"own_default_fee": 0.5
}),
});
const data = await response.json();
console.log(response.status, data);
PUT
/v1/user/child/{id}
Update a sub-user
Update the sub-user with the given id. Exact body shape varies by deployment; see the UI form for supported fields.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
required | The sub-user id. |
Code Examples
curl -X PUT 'https://crypto-pay-service.cryptosrvc.com/v1/user/child/{id}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/child/{id}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.put(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/child/{id}", {
method: "PUT",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/user/widget-settings
Update widget settings
Persist the JSON-encoded widget configuration (logos, colours, theme, etc.) used by the embeddable payment widget.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
widget_settings |
string |
required | JSON string of widget configuration. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/user/widget-settings' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"widget_settings":"{\"theme\":\"light\",\"accent\":\"#2563eb\"}"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/widget-settings"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"widget_settings": "{\"theme\":\"light\",\"accent\":\"#2563eb\"}"
}
response = requests.patch(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/widget-settings", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"widget_settings": "{\"theme\":\"light\",\"accent\":\"#2563eb\"}"
}),
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/user/update-currency-settings
Update currency settings
Enable/disable currencies the merchant accepts, and configure automatic conversion per currency.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
currency_settings |
array<object> |
required | Array of {currency_id, network, is_converted, enabled} objects. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/user/update-currency-settings' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"currency_settings":[{"currency_id":"BTC","network":"BTC","is_converted":false,"enabled":true},{"currency_id":"USDT","network":"TRC20","is_converted":true,"enabled":true}]}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/update-currency-settings"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"currency_settings": [
{
"currency_id": "BTC",
"network": "BTC",
"is_converted": false,
"enabled": true
},
{
"currency_id": "USDT",
"network": "TRC20",
"is_converted": true,
"enabled": true
}
]
}
response = requests.patch(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/update-currency-settings", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"currency_settings": [
{
"currency_id": "BTC",
"network": "BTC",
"is_converted": false,
"enabled": true
},
{
"currency_id": "USDT",
"network": "TRC20",
"is_converted": true,
"enabled": true
}
]
}),
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/user/update-preferred-currency
Update preferred currency
Set the merchant's default display currency.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
currency_id |
string |
required | Currency identifier. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/user/update-preferred-currency' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"currency_id":"ETH"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/update-preferred-currency"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"currency_id": "ETH"
}
response = requests.patch(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/update-preferred-currency", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"currency_id": "ETH"
}),
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/user/update-crypto-confirmations
Update confirmation thresholds
Customise the number of on-chain confirmations required before a deposit is marked complete, per currency/network.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
crypto_confirmation_settings |
array<object> |
required | Array of {currency_id, network, confirmations} objects. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/user/update-crypto-confirmations' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"crypto_confirmation_settings":[{"currency_id":"BTC","network":"BTC","confirmations":2},{"currency_id":"USDT","network":"TRC20","confirmations":20}]}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/user/update-crypto-confirmations"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"crypto_confirmation_settings": [
{
"currency_id": "BTC",
"network": "BTC",
"confirmations": 2
},
{
"currency_id": "USDT",
"network": "TRC20",
"confirmations": 20
}
]
}
response = requests.patch(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/user/update-crypto-confirmations", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"crypto_confirmation_settings": [
{
"currency_id": "BTC",
"network": "BTC",
"confirmations": 2
},
{
"currency_id": "USDT",
"network": "TRC20",
"confirmations": 20
}
]
}),
});
const data = await response.json();
console.log(response.status, data);Currency
Look up the currencies the platform supports, along with their networks and confirmation thresholds.
GET
/v1/currency
List supported currencies
Return every currency the merchant can accept, along with confirmation thresholds and block-time estimates.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/currency' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/currency"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/currency", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/currency/{currency_id}
Get currency by id
Look up a single currency and its network metadata.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
currency_id |
string |
required | The currency identifier, e.g. "BTC" or "USDT". |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/currency/USDT' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/currency/USDT"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/currency/USDT", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);Payment
Create invoices, fetch crypto receive addresses, list payment history, and manually reconcile payments.
GET
/v1/payment
List payments
Return the merchant's payments, newest first. Supports pagination and filtering.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pageIndex |
number |
optional | Zero-based page index. |
pageSize |
number |
optional | Items per page (default 10). |
status |
string |
optional | Filter by payment status (e.g. "Pending", "Complete", "Expired"). |
search |
string |
optional | Match against merchant_order_id or payment id. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/payment?pageIndex=0&pageSize=10' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/payment?pageIndex=0&pageSize=10"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/payment?pageIndex=0&pageSize=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
POST
/v1/payment
Create a payment
Create an invoice. Set amount_required to a positive number for a fixed-amount invoice, or leave it as 0 for an open-deposit invoice that accepts any amount.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
amount_required |
number |
required | Amount in the merchant-order currency. Use 0 for an open-deposit invoice. |
merchant_order_currency_id |
string |
required | The currency the amount is quoted in (e.g. "ETH", "BTC", "USDT"). |
merchant_order_currency_network |
string |
required | Settlement network for the currency (e.g. "ETH" for Ether on Ethereum, "TRC20" for USDT on Tron, "fiat" for fiat currencies). |
merchant_order_id |
string |
optional | Your internal order identifier. Echoed back in webhooks for reconciliation. |
merchant_order_metadata |
string |
optional | Free-form metadata string, returned as-is on reads. |
expiration |
string |
optional | Optional ISO-8601 timestamp after which the invoice is no longer payable. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/payment' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"amount_required":0.05,"merchant_order_currency_id":"ETH","merchant_order_currency_network":"ETH","merchant_order_id":"order-0001","merchant_order_metadata":"customer=alice@example.com"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/payment"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"amount_required": 0.05,
"merchant_order_currency_id": "ETH",
"merchant_order_currency_network": "ETH",
"merchant_order_id": "order-0001",
"merchant_order_metadata": "customer=alice@example.com"
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/payment", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount_required": 0.05,
"merchant_order_currency_id": "ETH",
"merchant_order_currency_network": "ETH",
"merchant_order_id": "order-0001",
"merchant_order_metadata": "customer=alice@example.com"
}),
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/payment/{paymentId}/addresses
Get payment crypto addresses
Return the crypto receive addresses the customer should send funds to, one per supported currency/network.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
paymentId |
string |
required | The payment id returned from Create a payment. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/addresses' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/addresses"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/addresses", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/payment/export
Export payments to CSV
Download a CSV of payments matching the supplied filters. Returns a CSV body, not JSON.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status |
string |
optional | Filter by payment status. |
count |
number |
optional | Maximum rows to export (default 1 000 000). |
date_from |
string |
optional | ISO-8601 lower bound on created_at. |
date_to |
string |
optional | ISO-8601 upper bound on created_at. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/payment/export?count=1000' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/payment/export?count=1000"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/payment/export?count=1000", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/payment/{paymentId}/{paymentStatus}
Update payment status
Manually transition a payment to Complete or Reject. Typically used for off-chain reconciliation by operators.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
paymentId |
string |
required | The payment id. |
paymentStatus |
string |
required | Either Complete or Reject. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/Complete' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/Complete"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/payment/{paymentId}/Complete", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);Withdrawal
Move settled funds out to external addresses — create, approve, reject, and inspect withdrawals.
POST
/v1/withdrawal
Create a withdrawal
Request a crypto withdrawal to an external address. Returns a withdrawal record pending approval.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
amount |
number |
required | Amount to withdraw in the source currency. |
currency_id |
string |
required | Currency identifier, e.g. "BTC" or "USDT". |
address |
string |
required | Destination on-chain address. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"amount":0.5,"currency_id":"BTC","address":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"amount": 0.5,
"currency_id": "BTC",
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount": 0.5,
"currency_id": "BTC",
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
}),
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/{withdrawalId}
Get withdrawal by id
Look up a single withdrawal, including its current approval state and on-chain status.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
withdrawalId |
string |
required | The withdrawal id returned from Create a withdrawal. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/list
List withdrawals
Return the merchant's withdrawals, newest first. Supports pagination and filtering.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pageIndex |
number |
optional | Zero-based page index. |
pageSize |
number |
optional | Items per page (default 10). |
status |
string |
optional | Filter by status. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/list?pageIndex=0&pageSize=10' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/list?pageIndex=0&pageSize=10"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/list?pageIndex=0&pageSize=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/withdrawal/{withdrawalId}/approve
Approve withdrawal
Approve a pending withdrawal and release it to the on-chain queue. Requires the merchant's MFA code.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
withdrawalId |
string |
required | The withdrawal id to approve. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
mfa_code |
string |
required | Current 6-digit TOTP code for the merchant user. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/approve' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"mfa_code":"123456"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/approve"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"mfa_code": "123456"
}
response = requests.patch(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/approve", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"mfa_code": "123456"
}),
});
const data = await response.json();
console.log(response.status, data);
PATCH
/v1/withdrawal/{withdrawalId}/reject
Reject withdrawal
Reject a pending withdrawal. The record is kept for audit; funds are not moved.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
withdrawalId |
string |
required | The withdrawal id to reject. |
Code Examples
curl -X PATCH 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/reject' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/reject"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.patch(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/{withdrawalId}/reject", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/payment-routes
Supported withdrawal routes
Return the currencies and networks available for outgoing withdrawals.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/payment-routes' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/payment-routes"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/payment-routes", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/addresses-history
Previously used withdrawal addresses
Return addresses the merchant has withdrawn to before — useful for an "address book" experience at withdrawal time.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/addresses-history' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/addresses-history"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/addresses-history", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/fee-estimation/{currency_id}/{network}/{amount}
Estimate network fee
Estimate the on-chain network fee for a hypothetical withdrawal of the given currency, network, and amount.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
currency_id |
string |
required | Currency identifier. |
network |
string |
required | Blockchain network for the currency. |
amount |
string |
required | Amount as a decimal string. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/fee-estimation/USDT/TRC20/50' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/fee-estimation/USDT/TRC20/50"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/fee-estimation/USDT/TRC20/50", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/withdrawal/info/{currency_id}
Withdrawal info for a currency
Return merchant-specific withdrawal limits and enabled networks for a currency.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
currency_id |
string |
required | Currency identifier. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/info/BTC' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/info/BTC"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/withdrawal/info/BTC", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);Webhook
Register a URL to receive real-time events, rotate secrets, or remove a webhook.
GET
/v1/webhook
List webhooks
Return every webhook the merchant has registered.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/webhook' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/webhook"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/webhook", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
POST
/v1/webhook
Register a webhook
Register a URL to receive event notifications. The secret is shared between you and the service — store it safely and use it to verify incoming message signatures.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
label |
string |
required | Human-readable label, e.g. "Production order events". |
url |
string |
required | HTTPS URL that will receive POST deliveries. |
secret |
string |
required | Shared secret used to sign deliveries (HMAC-SHA256 over the JSON body). |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/webhook' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"label":"Production events","url":"https://example.com/webhooks/settl","secret":"s3cr3t-rotate-me"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/webhook"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"label": "Production events",
"url": "https://example.com/webhooks/settl",
"secret": "s3cr3t-rotate-me"
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/webhook", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"label": "Production events",
"url": "https://example.com/webhooks/settl",
"secret": "s3cr3t-rotate-me"
}),
});
const data = await response.json();
console.log(response.status, data);
PUT
/v1/webhook/{webhook_id}
Update a webhook
Update an existing webhook. Use this to rotate the secret or change the delivery URL.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
webhook_id |
string |
required | The webhook id returned from Register a webhook. |
Code Examples
curl -X PUT 'https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.put(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}", {
method: "PUT",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
DELETE
/v1/webhook/{webhook_id}
Delete a webhook
Permanently remove a webhook. Pending deliveries are cancelled.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
webhook_id |
string |
required | The webhook id to remove. |
Code Examples
curl -X DELETE 'https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/webhook/{webhook_id}", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);Address Book
Save destination addresses so withdrawals don't need to re-type them.
POST
/v1/addressbook
Add address-book contacts
Save one or more destination addresses the merchant can later use for withdrawals without re-typing.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
address_book_contacts |
array<object> |
required | Array of {name, currency, network, address, address_tag_type?, address_tag_value?} objects. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/addressbook' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"address_book_contacts":[{"name":"Cold storage","currency":"BTC","network":"BTC","address":"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq","address_tag_type":"","address_tag_value":""}]}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/addressbook"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"address_book_contacts": [
{
"name": "Cold storage",
"currency": "BTC",
"network": "BTC",
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"address_tag_type": "",
"address_tag_value": ""
}
]
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/addressbook", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"address_book_contacts": [
{
"name": "Cold storage",
"currency": "BTC",
"network": "BTC",
"address": "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",
"address_tag_type": "",
"address_tag_value": ""
}
]
}),
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/addressbook/list
List address-book contacts
Return the saved address-book entries, paginated.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
pageIndex |
number |
optional | Zero-based page index. |
pageSize |
number |
optional | Items per page (default 10). |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/addressbook/list?pageIndex=0&pageSize=10' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/addressbook/list?pageIndex=0&pageSize=10"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/addressbook/list?pageIndex=0&pageSize=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);Fee
Define per-currency deposit fees and route sub-users through different fee schedules.
GET
/v1/fee/payment-fees
List payment fees
Return the fee schedule the merchant pays on incoming payments, across all currencies.
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/fee/payment-fees/{paymentId}
Fees for a specific payment
Return the realised fees charged on a single payment.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
paymentId |
string |
required | The payment id. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees/{paymentId}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees/{paymentId}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/payment-fees/{paymentId}", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/fee/groups
List fee groups
Return every fee group the merchant has defined for routing sub-users.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
type |
string |
optional | Filter by type: Child or Own. |
pageIndex |
number |
optional | Zero-based page index. |
pageSize |
number |
optional | Items per page (default 10). |
search |
string |
optional | Match against group name. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/fee/groups?type=Child&pageIndex=0&pageSize=10' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/groups?type=Child&pageIndex=0&pageSize=10"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/groups?type=Child&pageIndex=0&pageSize=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
GET
/v1/fee/group/{groupName}
Get fee group by name
Look up a single fee group.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupName |
string |
required | The group's unique name. |
Code Examples
curl -X GET 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}", {
method: "GET",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
POST
/v1/fee/group
Create a fee group
Create a new fee group with per-currency rates.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
name |
string |
required | Unique name. |
default_deposit_fee |
number |
required | Default deposit fee in percent, applied when a currency has no override. |
fees |
array<object> |
required | Array of {currency_id, deposit_fee} overrides. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"standard","default_deposit_fee":1,"fees":[{"currency_id":"BTC","deposit_fee":0.5},{"currency_id":"USDT","deposit_fee":0.8}]}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"name": "standard",
"default_deposit_fee": 1,
"fees": [
{
"currency_id": "BTC",
"deposit_fee": 0.5
},
{
"currency_id": "USDT",
"deposit_fee": 0.8
}
]
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "standard",
"default_deposit_fee": 1,
"fees": [
{
"currency_id": "BTC",
"deposit_fee": 0.5
},
{
"currency_id": "USDT",
"deposit_fee": 0.8
}
]
}),
});
const data = await response.json();
console.log(response.status, data);
PUT
/v1/fee/group
Update a fee group
Rename a fee group or update its rates. Identify the group by its current name via old_name.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
old_name |
string |
required | Existing group name. |
new_name |
string |
required | Desired group name (may equal old_name). |
default_deposit_fee |
number |
required | Default deposit fee in percent. |
fees |
array<object> |
required | Array of {currency_id, deposit_fee} overrides. |
Code Examples
curl -X PUT 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"old_name":"standard","new_name":"standard","default_deposit_fee":1,"fees":[{"currency_id":"BTC","deposit_fee":0.4}]}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"old_name": "standard",
"new_name": "standard",
"default_deposit_fee": 1,
"fees": [
{
"currency_id": "BTC",
"deposit_fee": 0.4
}
]
}
response = requests.put(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group", {
method: "PUT",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"old_name": "standard",
"new_name": "standard",
"default_deposit_fee": 1,
"fees": [
{
"currency_id": "BTC",
"deposit_fee": 0.4
}
]
}),
});
const data = await response.json();
console.log(response.status, data);
DELETE
/v1/fee/group/{groupName}
Delete a fee group
Remove a fee group. Sub-users currently routed through it must be reassigned first.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupName |
string |
required | The group's unique name. |
Code Examples
curl -X DELETE 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}' \
-H 'Authorization: Bearer YOUR_TOKEN'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group/{groupName}", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(response.status, data);
POST
/v1/fee/group/add-user
Add a sub-user to a fee group
Route a sub-user through the given fee group.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
user_id |
string |
required | Sub-user id. |
group_name |
string |
required | Fee group name. |
Code Examples
curl -X POST 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group/add-user' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"user_id":"user_abc","group_name":"standard"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group/add-user"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"user_id": "user_abc",
"group_name": "standard"
}
response = requests.post(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group/add-user", {
method: "POST",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"user_id": "user_abc",
"group_name": "standard"
}),
});
const data = await response.json();
console.log(response.status, data);
PUT
/v1/fee/group/change-user
Change a sub-user's fee group
Move a sub-user from their current fee group to a different one.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
user_id |
string |
required | Sub-user id. |
group_name |
string |
required | New fee group name. |
Code Examples
curl -X PUT 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group/change-user' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"user_id":"user_abc","group_name":"vip"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group/change-user"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"user_id": "user_abc",
"group_name": "vip"
}
response = requests.put(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group/change-user", {
method: "PUT",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"user_id": "user_abc",
"group_name": "vip"
}),
});
const data = await response.json();
console.log(response.status, data);
DELETE
/v1/fee/group/remove-user
Remove a sub-user from their fee group
Detach a sub-user from their fee group. The sub-user will fall back to the default rates.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
user_id |
string |
required | Sub-user id. |
group_name |
string |
required | Current fee group name. |
Code Examples
curl -X DELETE 'https://crypto-pay-service.cryptosrvc.com/v1/fee/group/remove-user' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"user_id":"user_abc","group_name":"vip"}'
import requests
url = "https://crypto-pay-service.cryptosrvc.com/v1/fee/group/remove-user"
headers = {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json",
}
body = {
"user_id": "user_abc",
"group_name": "vip"
}
response = requests.delete(url, json=body, headers=headers)
print(response.status_code, response.json())
const response = await fetch("https://crypto-pay-service.cryptosrvc.com/v1/fee/group/remove-user", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${YOUR_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"user_id": "user_abc",
"group_name": "vip"
}),
});
const data = await response.json();
console.log(response.status, data);