ST Pay Merchant APIST Pay Merchant API
Guide
API
Error codes
Back office
AI-assisted integration
  • 繁體中文
  • 简体中文
  • English
Guide
API
Error codes
Back office
AI-assisted integration
  • 繁體中文
  • 简体中文
  • English
  • Getting started

    • Overview
    • Request and response format
    • Authentication and IP whitelist
    • Signature
    • Merchant back office
    • AI-assisted integration
  • API

    • Create a collection order
    • Create a payout order
    • Order query
    • Callback notifications
  • Reference

    • Order status and amounts
    • Duplicate requests and confirming results
    • Error codes
    • Bank codes
    • Go-live checklist

Request and response format

Requests

  • Always use HTTPS and POST, with Content-Type: application/json. The request body must be encoded in UTF-8.
  • The body is a JSON object. Every field value must be a JSON string, including amounts, for example "amount": "1000.00". Sending the number 1000.00 will fail (with invalid_signature or invalid_parameter).
  • Every request must include api_identity, timestamp, and sign (see Signature).
  • timestamp is the time the request is sent, in the same format as time below (UTC+8, yyyy-MM-dd HH:mm:ss). A request that differs from the ST Pay server time by more than 5 minutes (in either direction) is rejected with timestamp_expired. Enable NTP time synchronization on your servers.
  • Sending an empty string "" for an optional field is treated the same as not sending the field.

Responses

All APIs return the same structure:

FieldDescription
codeOK on success; on failure, an English error code (see Error codes). Your program must use this field to determine the result.
messageA description in Traditional Chinese, intended for humans to read. Its wording may change, so do not use it to determine the result.
dataThe response data on success; null on failure.

HTTP status code: 200 on success; on failure, a 4xx or 5xx code depending on the type of error (see Error codes).

{
  "code": "merchant_order_no_duplicate",
  "message": "商戶單號重複",
  "data": null
}

Data formats

TypeFormat
AmountString. In requests: greater than 0, at most 2 decimal places (counted literally, so "1000.500" has 3), no more than 9999999999999999.99, and only digits and a decimal point, for example "1000", "1000.5", "1000.50". "1,000.00", "1000.001", "-5", and "0" are all invalid.
Amounts in responses and Callbacks always have 2 decimal places, for example "1000.50". There is no currency field.
TimeString in UTC+8, in the format yyyy-MM-dd HH:mm:ss, for example "2026-10-13 10:30:05".
ST Pay order number order_noA string generated by ST Pay. Store it as an opaque string; do not parse its contents or rely on its format.
Merchant order number merchant_order_noGenerated by you. 1 to 200 characters, containing only English letters, digits, underscores _, and hyphens -.

Data retention

Orders are retained for 6 months from creation and are then deleted. After deletion, an order query returns order_not_found, and the merchant order number can be used again.

Prev
Overview
Next
Authentication and IP whitelist