Creating a Static wallet

post
https://api.cryptomus.com/v1/wallet
COPY

Request

Query parameters

NameParameter typeDefault valueDefinition
currency*stringCurrency code
network*stringBlockchain network code
order_id*stringmin: 1max: 100alpha_dashOrder ID in your systemThe parameter should be a string consisting of alphabetic characters, numbers, underscores, and dashes. It should not contain any spaces or special characters.The order_id must be unique within the merchant invoices/static wallets/recurrence paymentsWhen we find an existing invoice with order_id, we return its details, a new invoice will not be created.
url_callbackstringmin: 6max: 255urlnullURL, to which the webhook will be sent after each top-up of the wallet
from_referral_codestringnullThe merchant who makes the request connects to a referrer by code.For example, you are an application that generates invoices via the Cryptomus API and your customers are other stores.
They enter their api key and merchant id in your application, and you send requests with their credentials and passing your referral code.
Thus, your clients become referrals on your Cryptomus account and you will receive income from their turnover.

Parameter type

string

Definition

Currency code

Parameter type

string

Definition

Blockchain network code

Parameter type

stringmin: 1max: 100alpha_dash

Definition

Order ID in your systemThe parameter should be a string consisting of alphabetic characters, numbers, underscores, and dashes. It should not contain any spaces or special characters.The order_id must be unique within the merchant invoices/static wallets/recurrence paymentsWhen we find an existing invoice with order_id, we return its details, a new invoice will not be created.

Parameter type

stringmin: 6max: 255url

Definition

URL, to which the webhook will be sent after each top-up of the wallet

Parameter type

string

Definition

The merchant who makes the request connects to a referrer by code.For example, you are an application that generates invoices via the Cryptomus API and your customers are other stores.
They enter their api key and merchant id in your application, and you send requests with their credentials and passing your referral code.
Thus, your clients become referrals on your Cryptomus account and you will receive income from their turnover.

* - mandatory parameter

Request example


curl https://api.cryptomus.com/v1/wallet \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
    "currency": "USDT",
    "network": "tron", 
    "order_id": "1",
    "url_callback": "https://your.site/callback"
}'
COPY

Response

Response parameters

NameDefinition
wallet_uuiduuid of the merchant's wallet
uuiduuid of the wallet in a particular network
addressWallet address in a particular network
networkWallet network code
currencyWallet network currency
urlLink to payment form

Definition

uuid of the merchant's wallet

Definition

uuid of the wallet in a particular network

Definition

Wallet address in a particular network

Definition

Wallet network code

Definition

Wallet network currency

Definition

Link to payment form

Response example


1{
2	"state": 0,
3	"result": {
4		"wallet_uuid": "de15b0f6-883f-4585-b27b-73a648044a92",
5		"uuid": "87961ae5-80c5-413a-a4fe-d38199894940",
6		"address": "TTEtddVZyNtLD9wbq4PzomjBhtxenSMXbb",
7		"network": "tron",
8		"currency": "USDT",
9		"url": "https://pay.cryptomus.com/wallet/3901446a-4b74-4796-b50a-14e14dafe3ed"
10	}
11}
COPY

Possible errors

Validation errors

code : 422

Example responses:

If some parameter is required and not passed:


1{
2	"state": 1,
3	"errors": {
4		"currency": ["validation.required"]
5	}
6}
COPY

If your payments are blocked. In this case you need to contact support.


1{
2    "state": 1,
3    "message": "You are forbidden"
4}
5
COPY

If we don’t find the payment service with the currency and network:


1{
2    "state": 1,
3    "message": "The service was not found"
4}
COPY

If technical work occurs and the payment is temporarily unavailable, you can receive this error message:


1{
2    "state": 1,
3    "message": "The terminal was not found"
4}
COPY


1{
2    "state": 1,
3    "message": "Server error"
4}
COPY


1{
2    "state": 1,
3    "message": "Wallet not found"
4}
COPY