Skip to main content
POST
/
v1
/
pay
/
address
/
create
Place Order
curl --request POST \
  --url https://openplatform.gateapi.io/v1/pay/address/create \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "merchantTradeNo": "93840202212210025",
  "env": {
    "terminalType": "MINIAPP"
  },
  "goods": {
    "goodsName": "USDT_PAY_BTC_TEST",
    "goodsDetail": "yc"
  },
  "orderExpireTime": 1673410179000,
  "merchantUserId": 1336974,
  "chain": "BSC",
  "fullCurrType": "BTC_BSC",
  "channelId": "123456"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "prepayId": "47656656276819968",
    "terminalType": "MINIAPP",
    "expireTime": 1673410179000,
    "chain": {
      "chain_type": "BSC",
      "fullCurrType": "USDT_BSC",
      "address": "0x1699dB45Dc502A0395038265fCBC4Fa05d6afFBD"
    }
  }
}
API description:Create an order. When the order currency and payment currency are consistent, create a direct address payment order; if the order currency and payment currency are inconsistent, create a convert address payment order.

Headers

X-GatePay-Certificate-ClientId
string
required

Merchant client ID, obtained from GatePay platform

X-GatePay-Signature
string
required

HMAC-SHA256 signature for request validation

X-GatePay-Timestamp
string
required

Timestamp in milliseconds, must not differ from server time by more than 5 minutes

X-GatePay-Nonce
string
required

Random nonce for replay attack prevention

Body

application/json

Request for creating a payment order.

merchantTradeNo
string
required

Merchant transaction ID in the merchant's system.

env
object
required

Transaction source, optional values: APP, WEB, WAP, MINIAPP, OTHERS.

goods
object
required

Goods.

orderExpireTime
integer<int64>
required

Merchant-specified expiration time of the order, in milliseconds.

merchantUserId
integer<int64>
required

Unique consumer ID from the merchant’s platform.

chain
string
required

Selected chain name.

fullCurrType
string
required

Currency field that includes the chain name and corresponds to the specific currency on the specific chain.

channelId
string
required

Client Name.

currency
string

Crypto order currency.

orderAmount
string

Crypto order amount.

toleranceAmount
string

Tolerance Amount:If the remaining unpaid amount is less than or equal to the configured tolerance amount, the order will be automatically marked as Paid, with no further payment required.

fiatCurrency
string

Fiat order currency in uppercase form, such as EUR, GBP, USD, CNY, JPY, AUD, CAD, CHF.

fiatAmount
string

Fiat order amount, with a maximum precision of 2 digits.

surchargeAmount
string

Surcharge, a fee borne by the consumer.

payCurrency
string

User-selected payment currency, not required for non-flash payment orders.

returnUrl
string

Callback URL for payment completion.

cancelUrl
string

Callback URL for payment cancellation.

Response

200 - application/json

SUCCESS

Response parameters

status
string
code
string
errorMessage
string
data
object