Skip to content

Create a GMPay order ​

POSThttps://pay.example.com/payments/gmpay/v1/order/create-transaction

Request example ↓

Sign the request on your server and open payment_url for the buyer. Supply token and network together or omit both so the buyer can choose at checkout.

Parameters ​

FieldTypeRequiredDescription
pidstringYesMerchant PID used to look up the signing key.
order_idstringYesUnique merchant order ID, up to 32 characters.
currencystringYesFiat currency, for example usd or cny.
tokenstringConditionalReceiving asset. Pair with network or omit both.
networkstringConditionalNetwork ID from public config, for example binance.
amountnumberYesFiat amount, greater than 0.01.
notify_urlstringYesAsynchronous success callback URL.
redirect_urlstringNoBrowser return URL.
namestringNoProduct or order name.
payment_typestringNoDefaults to GMPay. EPay (case-insensitive) selects EPay callback format and requires a numeric PID. Include any nonempty value in the signature.
signaturestringYes64-character lowercase HMAC-SHA256 signature.

The sample signature uses the demonstration key epusdt_secret_key. Recalculate it on your server whenever the fields or merchant key change.

Responses

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data object

    Response payload; null on error.

    • trade_id string
    • order_id string
    • status integer
    • expiration_time integer
    • payment_url string
  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

application/json
Response fields
  • status_code integer

    Application result code.

  • message string

    Human-readable result.

  • data null

    Response payload; null on error.

  • request_id string

    Request identifier for tracing.

error-codes.json ↓