Creating a Static wallet
post
https://api.cryptomus.com/v1/wallet
Request
Query parameters
Name | Parameter type | Default value | Definition |
---|---|---|---|
currency* | string | Currency code | |
network* | string | Blockchain network code | |
order_id* | stringmin: 1max: 100alpha_dash | 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. | |
url_callback | stringmin: 6max: 255url | null | URL, to which the webhook will be sent after each top-up of the wallet |
from_referral_code | string | null | 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. |
Parameter type
stringDefinition
Currency codeParameter type
stringDefinition
Blockchain network codeParameter type
stringmin: 1max: 100alpha_dashDefinition
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: 255urlDefinition
URL, to which the webhook will be sent after each top-up of the walletParameter type
stringDefinition
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"
}'
COPYResponse
Response parameters
Name | Definition |
---|---|
wallet_uuid | uuid of the merchant's wallet |
uuid | uuid of the wallet in a particular network |
address | Wallet address in a particular network |
network | Wallet network code |
currency | Wallet network currency |
url | Link to payment form |
Definition
uuid of the merchant's walletDefinition
uuid of the wallet in a particular networkDefinition
Wallet address in a particular networkDefinition
Wallet network codeDefinition
Wallet network currencyDefinition
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}
COPYPossible 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}
COPYIf your payments are blocked. In this case you need to contact support.
1{
2 "state": 1,
3 "message": "You are forbidden"
4}
5
COPYIf we don’t find the payment service with the currency and network:
1{
2 "state": 1,
3 "message": "The service was not found"
4}
COPYIf 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