Skip to main content
POST
/
payment
/
open
/
institution
/
v1
/
pay
/
transactions
/
native
Create prepay order
curl --request POST \
  --url https://openplatform.gateapi.io/payment/open/institution/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-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
  --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": "0",
  "errorMessage": "",
  "data": {
    "prepayId": "50913213697495040",
    "terminalType": "APP",
    "expireTime": 1674100394000,
    "qrContent": "http://openplatform.gate.io/qr/AjQHJ56mDQ26dtx5ftspl9usV9tlIA8iom35toXhX7Y=",
    "location": "https://114.55.238.130:13555/webpay?prepayid=50913213697495040"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.gate.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This page documents the POST /payment/open/institution/v1/pay/transactions/native endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

Notes

  • Authentication uses the standard GatePay signed headers.
  • This page documents the standard merchant endpoint.
  • qrContent returns the content URL used to generate the QR code image, not a pre-rendered QR image itself.
  • For shared signing rules, see /api-reference/version/100/en/common/securityAndSignature.

Headers

X-GatePay-Certificate-ClientId
string
required

Merchant client ID, obtained from GatePay platform

Example:

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

X-GatePay-Signature
string
required

HMAC-SHA256 signature for request validation

Example:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"

X-GatePay-Timestamp
string
required

Timestamp in milliseconds, must be within 5 minutes of server time

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random nonce for replay attack prevention

Example:

"3525756760"

X-GatePay-On-Behalf-Of
string
required

Required delegated-subject header. Provide the initiating account ID for this request. For institution merchant APIs, this is typically the target sub-account ID; for institution charge and transfer APIs, it can be either an institution account ID or a sub-account ID.

Body

application/json

Request body for creating a Web payment prepay order.

merchantTradeNo
string
required

Merchant order number, up to 32 bytes.

env
object
required

Transaction source information.

goods
object
required

Goods information.

currency
string

Order currency, uppercase, such as USDT, BTC, etc.

orderAmount
string

Order amount, ranging from [0.0001, 500000].

fiatCurrency
string

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

fiatAmount
string

Fiat order amount. Minimum 0.01 with maximum precision of 2 decimal places.

actualCurrency
string

The actual currency requested by the merchant for settlement. Use this field to specify the actual incoming currency if the settlement currency requested by the merchant is different from the order currency.

orderExpireTime
integer<int64>

Order expiration time, UTC timestamp in milliseconds. If not set, it defaults to 1 hour, with a maximum expiration time of 1 hour.

returnUrl
string

The return URL for the order after successful payment, up to 256 characters long.

cancelUrl
string

The return URL for the order after payment failure, up to 256 characters long.

channelId
string

Client name.

Response

200 - application/json

Prepay order created successfully

Response body for creating a prepay order.

status
string
required

SUCCESS or FAIL.

code
string
required

Error code.

errorMessage
string

Error message.

data
object

Prepay order data.