10. Order Create

Bill Payment Order Creation

API Overview

PropertyValue
Interface Namealipay.intl.hk.wallet.charge.order.create
TypeAPI
Processing MethodSynchronous
DescriptionCreate a payment order for bill payment or single payment (e.g., stored-value card top-up).

Request Parameters

FieldTypeLengthRequiredDescription
requestIdString64YesUnique request ID. Used for idempotency: the same requestId returns the same merchant order ID. 
userIdString64

Conditional

AlipayHK user ID.

For keys 「openId」 & 「userId」, one of them must have content

openIdString64

Conditional

User OpenID

For keys 「openId」 & 「userId」, one of them must have content

merchantAccountIdString64YesMerchant account ID.
subMerchantIdString64NoSub-merchant ID.
orderTypeString64Yes

Order type:- SINGLE_PAYMENT_ORDER — Single payment (e.g., stored-value card top-up)

BILL_ORDER — Bill payment (for linked bills)

businessIdString64NoBusiness ID provided by the merchant (e.g., plan ID for stored-value card top-up).
accountIdString64

Yes

ID of merchant's user.

orderAmountAmount-

No

Order amount

Amount

FieldTypeLengthRequiredDescription
valueString64YesAmount in cents (e.g., "1000" = 10.00 HKD).
currencyString1024YesCurrency code: HKD.

Response Parameters

FieldSub-fieldTypeLengthRequiredDescription
resultObject-YesResult object.
resultCodeString64YesResult code: SUCCESS or FAIL.

resultStatus

String

Yes

Result code: S or F.

resultCodeId

String

10

Yes

0000

resultMessageString256NoResult message (e.g., failure reason).
orderIdString64YesMerchant order ID.
orderAmountAmount64YesOrder amount
acquiringSiteString64

no

Acquiring site.

- aboss

- ipay

redirectUrlString256

no

Redirect URL. Returned when the user needs to be redirected to the operator's page for payment. Returned for template payment and linked bill payment.
orderDetailString-Yes

Order detail. Need to convert Json to String format. See OrderDetail below.

OrderDetail

FieldTypeLengthRequiredDescription

notifyUrl

String64Yes

The URL for receiving asynchronous notifications after the payment is completed.

orderTitle

String1024Yes

Brief description of the transaction. Special characters are not supported. 

Result Codes

Result CodeStatusDescriptionAction
SUCCESSSRequest processed successfully.Proceed with payment flow.
PARAM_ILLEGALFInvalid request parameters (e.g., non-numeric input, invalid date).Check and correct request parameters.
PROCESS_FAILFGeneral business failure. Do not retry with the same parameters.Review the error message and adjust.
UNKNOWN_EXCEPTIONUAPI failed due to an unknown reason.Retry with a new requestId.

Samples

Request

copy
{
  "requestId": "req_20260508_001",
  "openId": "o123456789abcdefgh",
  "merchantAccountId": "2160400000002012",
  "subMerchantId": "4555219051",
  "orderType": "BILL_ORDER",
  "accountId": "88701108",
  "orderAmount": {
        "value": "100.00",
        "currency": "HKD"
  }
}

Response

copy
{
  "result": {
    "resultStatus": "S",
    "resultCodeId": "0000",
    "resultCode": "SUCCESS",
    "resultMessage": "success"
  },
  "orderId": "order_auto_topup_001",
  "orderAmount": {
    "value": "2000",
    "currency": "HKD"
  },
  "orderDetail": "{\"notifyUrl\":\"https://merchant.example.com/notify\",\"orderTitle\":\"Auto Payment - Mobile Recharge\"}"
}

Important Notes

  1. Idempotency: The requestId is used as the idempotency key. Submitting the same requestId returns the same order. If the associated order has expired, an error will be returned.
  2. Order Expiry: Each order has a validity window. Payment must be completed within this period.
  3. Retry Logic: On the AlipayHK side, if the order creation API call or auto-debit fails, the system retries with a new requestId later (e.g. every hour).