Order

create and query order information .

Every request must contain common parameters

Demo code can be found at Github

Deposit_address

Retrieves a deposit address of a specific crypto asset

POST /v1/order/deposit_address

Request Body

NameTypeDescription

currency*

String

the name of crypto asset to deposit

customer_ref_id*

String

The ID for the partner to associate the owner of funds(customer) with transactions

description

String

extend info, don't store any sensitive information

{
    // Response
   "code":200,
   "message":"success",
   "data": {
        "currency": "ETH",
        "address": "0x55d398326f99059fF775485246999027B3197955",
        "tag": ""
    }
}
Code example
// 
curl --location --request POST 'https://api.musepay.io/v1/order/deposit_address' \
--header 'Content-Type: application/json' \
--data-raw '{
    * "partner_id": "2000001", 
    * "sign_type": "RSA", 
    * "timestamp": "1688371190810", 
    * "nonce": "abccefeafjkjsl", 
    * "sign": "examplesignnotcorrect", 
    * "currency": "USDT_BSC", 
    * "customer_ref_id": "USER_123",
      "description": ""
    
}'

Query

Retrieves a specific transaction details

POST /v1/order/query

Request Body

NameTypeDescription

request_id*

String

The external ID of the transaction provided by the partner

order_no

String

The ID of the transaction to return

{    
     "code":"200",
     "data":{
         "order_no":"2022093020000600011063033204",
         "request_id":"2022093002029700786237858945",
         "partner_id":"2000061",
         "currency":"ETH_TEST",
         "order_type":"charge",
         "order_amount":"0.100000000000000000",
         "arrive_amount":"0.099000000000000000",
         "fee_amount":"0.001000000000000000",
         "finish_time":"1664519433",
         "status":99,
         "reason":"",
         "metadata":"{
               \"txnHash\": \"0x28f0a68ecd8b88700d7bcaeb62f50bd9d58e0cc8a9c29fb3bd6832868eaac428\", 
               \"networkFee\": \"0.000042000000000000\", 
               \"blockHeight\": \"7684865\", 
               \"description\": \"C100005_descETH_TEST\", 
               \"customerRefId\": \"C100005\", 
               \"numOfConfirms\": \"1\", 
               \"sourceAddress\": \"0xCf441129dC8d91B07fB8cb5122570Bfc607eC471\", 
               \"networkCurrency\": \"ETH_TEST\", 
               \"destinationAddress\": \"0xb4df156e6a10F5DB28E701B79E71Bc2F77B97aa1\"
               }"
         },
   "message":"success"
}

Withdraw

Submits a new withdraw transaction

POST /v1/order/withdraw

Request Body

NameTypeDescription

request_id*

String

The external ID of the transaction provided by the partner

currency*

String

The name of crypto asset to withdraw

address*

String

The destination address to withdraw

tag

String

The withdraw destination tag for Ripple; memo for EOS/XLM

amount*

String

The requested amount to withdraw

notify_url

String

Web-hook url

customer_ref_id*

String

The ID for the partner to associate the owner of funds(customer) with transactions

description

String

extend info, don't store any sensitive information

{
 "data":
 {
    "order_no":"2022082020000600101063128149",
    "request_id":"1660977087787",
    "partner_id":"2000051",
    "currency":"USDT_TRC20",
    "address":"0xCf441129dC8d91B07fB8cb5122570Bfc607eC471",
    "tag":null,
    "order_amount":"2.200000000000000000",
    "arrive_amount":"2.178000000000000000",
    "fee":"0.022000000000000000",
    "status":22,
    "fail_reason":""
 },
 "code":"200",
 "message":"Success"
}
Code example
// Some code

curl --location --request POST 'https://api.musepay.io/v1/order/withdraw
--header 'Content-Type: application/json' \
--data-raw '{
    * "partner_id": "2000001", 
    * "sign_type": "RSA", 
    * "timestamp": "1688371190810", 
    * "nonce": "abccefeafjkjsl", 
    * "sign": "examplesignnotcorrect", 
    * "request_id": "custom_code9982674851738108",
    * "currency": "USDT_BSC", 
    * "customer_ref_id": "USER_123",
    * "address": "TWVA2tcuA7124a884xuC199sCX8YpUbHFa",
    * "amount": "150",
      "notify_url": "https://notify.url",
      "description": ""
    
}'

VerifyDepositAddress

verify an address whether belong to the platform

POST /v1/order/verifyDepositAddress

Request Body

NameTypeDescription

currency*

String

The name of crypto asset related to the address

address*

String

The address to verify

tag

String

Tag for Ripple; memo for EOS/XLM

{
 "data":
 {
    "result": true
 },
 "code":"200",
 "message":"Success"
}

Pay

allow to submit a payin by checkout page or direct integration

POST /v1/order/pay

Request Body

NameTypeDescription

request_id*

String

The external ID of the transaction provided by the partner

payment_method*

String

The way to pay, values: one of [on_line, direct,on_chain]

amount*

String

order amount

currency*

String

order currency

remark

String

The detail information of product in the checkout page

product_name*

String

The product name to be shown in the checkout page

return_url

String

web redirect url when payment is finish, if needed

notify_url

String

Web-hook url

customer.email

String

The e-mail address of customer

customer.phone

String

The phone number of customer

payment_channel

String

required if payment method is direct, see Enums

payment_type

String

required if payment method is direct, see Enums

customer.name

String

customer name

customer_ref_id*

String

customer unique id

pay_currency

String

The name of crypto asset to pay

customer

JSONString

customer info

{"code":"200",
 "data":{
   "request_id":"1675157000687",
   "partner_id":"2000051",
   "order_no":"2023013120000600262092321146",
   "currency":"USDT_TRC20",
   "order_amount":"0.3",
   "status":11,
   "payment_method":"on_line",
   "checkout_url":"http://api.dev.xx/v1/qrcode/CnHmkPayhcIFlyat"
 },
 "message":"success"
 }
Pay Example

Payout

allow to submit a payout request

POST/v1/order/payout

Request Body

NameTypeDescription

request_id*

String

The external ID of the transaction provided by the partner

account_type

String

required if payout_method is wallet_transfer

-one of[ PHONE, EMAIL,CPF, CNPJ ]

account_no*

String

Beneficiary's account No

account_name*

String

Beneficiary's name -Min 5 , Max 100 -

country*

String

country code

bank_code

String

required if payout_method is bank_transfer

wallet_code

String

required if payout_method is wallet_transfer

payout_method*

String

One of [bank_transfer | wallet_transfer]

settle_currency*

String

The currency to receive

amount*

String

Merchant's Payout Amount

currency*

String

Merchant's account currency

remark

String

Payout Remark

- Max length: 40 -

bank_routing_code

String

Bank Routing Code

- Max length: 100 -

document_type

String

Identification type

document_id

String

Identification number

phone*

String

Beneficiary's phone.

email*

String

Beneficiary's email

notify_url

String

web redirect url when payment is finish,if needed

{"code":"200",
 "data":{
   "request_id":"1675157000687",
   "partner_id":"2000051",
   "order_no":"2023013120000600262092321146",
   "currency":"USDT_TRC20",
   "order_amount":"0.3",
   "status":11
 },
 "message":"success"
 }
Payout Example

Last updated