Skip to main content
POST
/
v1
/
pay
/
transactions
/
native
Order placement (QR code)
curl --request POST \
  --url https://openplatform.gateapi.io/v1/pay/transactions/native \
  --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": "118223456797",
  "env": {
    "terminalType": "APP"
  },
  "goods": {
    "goodsName": "NF2T",
    "goodsDetail": "nef-book"
  }
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "prepayId": "50984376880599040",
    "terminalType": "APP",
    "expireTime": 1674118228000,
    "location": "https://www.gate.io/webpay?prepayid=55583289224171652",
    "qrContent": "http://openplatform.gate.io/qr/amaA9duknMfGKvM5H77Q0STgoTgVPmbPyuPDzlFvJO8="
  }
}

Headers

X-GatePay-Certificate-ClientId
string
required

The clientId assigned when the merchant registers an application in the Gate merchant console.

Example:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
required

Request signature. GatePay uses this signature to verify whether the request is valid.

X-GatePay-Timestamp
string
required

UTC timestamp in milliseconds when the request is generated. GatePay will not process requests where the difference from the receive time exceeds 10 seconds.

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random string. Must comply with HTTP header rules; recommended length is within 32 characters, composed of digits and letters.

Example:

"9578"

Body

application/json
merchantTradeNo
string
required

Merchant Order Number

Example:

"118223456797"

env
object
required
goods
object
required
currency
string

Crypto order currency in uppercase, such as USDT, BTC, etc.

Example:

"USDT"

fiatCurrency
string

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

Example:

"CNY"

fiatAmount
string

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

Example:

"100"

orderAmount
string

Crypto order amount, with up to 6 decimal places, ranging from 0.000001 to 50000.

Example:

"100"

orderExpireTime
integer<int64>

Order Expiration Time in UTC Timestamp, with millisecond precision. The default is 1 hour if not set, and the maximum expiration time is 1 hour.

Example:

"1674118228000"

returnUrl
string

The URL to return to after a successful payment. Maximum length of 256 characters.

Example:

"http://47.99.158.63:8205/payment/callback"

cancelUrl
string

The URL to return to after a failed payment. Maximum length of 256 characters.

Example:

""

channelId
string

Client Name.

Example:

""

Response

200 - application/json

SUCCESS

status
string
required

API response result

Example:

"SUCCESS"

code
string
required

Response error code

Example:

"000000"

errorMessage
string

Error description

Example:

""

data
object