Skip to main content
POST

Authorizations

x-auth-token
string
header
required

The API token for login provided by UQPAY.

Headers

x-client-id
string
required

The API client id generated by UQPAY

x-on-behalf-of
string<uuid>

The authorized connected sub-account to manage. Omit or send an empty value to use the credential account. Use the same target account for all operations on a code. Do not send the credential account ID as an explicit sub-account.

x-idempotency-key
string
required

Use a new key for each new creation. Retry the same request with the same key after an uncertain response. Reusing a key with different request parameters returns a conflict. Send this header only once.

Body

application/json
payment_methods
enum<string>[]
required

Select methods enabled for the target account. Check account and channel readiness through the options endpoint. In payment notifications, data.payment_method.type identifies the single method used for that transaction, not this array.

Required array length: 1 - 4 elements
Available options:
ALIPAY,
WECHAT,
PAYNOW,
UNIONPAY
currency
string
required

Use an uppercase currency returned by the options endpoint. Payment notifications report the transaction currency in data.currency.

amount_mode
enum<string>
required

FIXED uses the specified amount; DYNAMIC lets the payer enter the amount.

Available options:
FIXED,
DYNAMIC
amount
string

Required for FIXED: a positive decimal string in major currency units with exactly two decimal places. For DYNAMIC, omit this field entirely; null, an empty string, and zero are not accepted. For reconciliation, read the transaction amount from data.amount in payment notifications, not the null amount of a DYNAMIC code.

Pattern: ^[0-9]+\.[0-9]{2}$
store_name
string

Maximum 25 bytes. Omit or send an empty string to use the target account name. null is not accepted.

code_no
string

Custom code identifier. Omit or send an empty string to generate one. Keep it as a string to preserve leading zeros. Use only ASCII letters and digits. The values options and requests are reserved. null is not accepted. Static QR payment notifications identify this code in data.payment_method.<method>.static_qrcode_number_plate; one code can be used for multiple payments. See payment notification field mapping.

Maximum string length: 10
Pattern: ^[A-Za-z0-9]{0,10}$
extension
string

Your reference information; defaults to an empty string when omitted. It is not encoded into the QR payment parameters. null is not accepted. The corresponding field in static QR payment notifications is data.payment_method.<method>.static_qrcode_extension; it is not data.metadata or a merchant order ID. See payment notification field mapping.

Maximum string length: 512

Response

Request completed. Interpret the resource status separately.

code_no
string
required

Code identifier. Preserve case and leading zeros. Static QR payment notifications identify this code in data.payment_method.<method>.static_qrcode_number_plate; one code can be used for multiple payments. See payment notification field mapping.

status
string
required

Code creation status, not payment status. INITIATED means creation has started; SUCCEEDED means the code has been created.

payment_methods
enum<string>[]
required

Payment methods associated with this code. In payment notifications, data.payment_method.type identifies the single method used for that transaction, not this array.

Available options:
ALIPAY,
WECHAT,
PAYNOW,
UNIONPAY
currency
string
required

Currency used for payments with this code. Payment notifications report the transaction currency in data.currency.

amount_mode
enum<string>
required

FIXED uses the specified amount; DYNAMIC lets the payer enter the amount.

Available options:
FIXED,
DYNAMIC
amount
string | null
required

Fixed payment amount in major currency units; null for DYNAMIC codes. Response decimal precision may differ from the create request. For reconciliation, read the transaction amount from data.amount in payment notifications, not the null amount of a DYNAMIC code.

store_name
string
required

Store name associated with the code.

city
string
required

City associated with the code.

extension
string
required

Your reference information. It is not encoded in the QR payment parameters. The corresponding field in static QR payment notifications is data.payment_method.<method>.static_qrcode_extension; it is not data.metadata or a merchant order ID. See payment notification field mapping.

create_time
string<date-time>
required

Creation timestamp with a timezone offset.