AlipayHK
Basic information
Customers use an AlipayHK wallet to confirm the purchase.
- Integration paths: Direct API, Checkout
- Transaction type: One-time payment
lpmsInfo.lpmsType:AlipayHK
| Payer wallet market | Order currency |
|---|---|
| 🇭🇰 HK | HKD |
This guide applies to a configuration enabled for your merchant account and application. Supply the required customer details before creating the payment, as described in Before you begin. Before using another market or order currency, confirm the enabled scope for your merchant account and application with Onerway, then check the current order with List available payment methods.
Before you begin
Complete Setup and confirm that AlipayHK is enabled. Also confirm transaction limits, the applicable payment validity period, settlement arrangements, and the test procedure. For amount formatting, see Currency and amount validation.
Prepare the billing and shipping information required by the API, including the customer’s email and the actual country for each address. Configure your notification and return URLs, and store the mapping between your order and the Onerway identifiers. The wallet’s region does not determine the merchant’s eligibility or the customer’s billing country; use the actual address details and confirm your enabled scope with Onerway.
Supply the required email and country in both billingInformation and shippingInformation, together with the other fields required by the API conditions. Use the customer’s actual address details and supply them before creating the payment.
Start the payment
Direct API
- Check List available payment methods for the current order. After the customer selects AlipayHK, call Create direct transaction from your server with
productType=LPMS,subProductType=DIRECT,txnType=SALE, andpaymentMode=WEB. SetlpmsType=AlipayHKinlpmsInfo, encoded as a JSON string. - Supply the customer details prepared above in
billingInformationandshippingInformation, both encoded as JSON strings. Include products, notification and return URLs, and merchant-collected end-user IP, browser, and device information intxnOrderMsg. Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up toorderAmount.
Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method withAlipayHK, use HKD for this flow, and supply the actual order and customer details. The example amount does not establish a transaction limit. - Store the returned
paymentIdandtransactionId. Whenstatus=RandactionType=RedirectURL, direct the customer toredirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting. - The returned
redirectUrlmay open a provider payment page or the wallet. The customer follows the instructions for that attempt. When the customer returns to your site, display the result retrieved from your server. See Request authentication for authentication.
Checkout
When locking Checkout to this method, first call List available payment methods for the current order and confirm that the method is returned. When Checkout displays all available methods, Onerway performs this filtering.
- On your server, call Create checkout payment with
productType=ALL,subProductType=DIRECT, andtxnType=SALE. To show only AlipayHK, setlpmsInfo.lpmsTypetoAlipayHK, sendinglpmsInfoas a JSON string. If you omitlpmsInfo, the customer chooses from the methods available for the order. - Supply the required billing, shipping, product, return URL, and notification URL fields. Encode
billingInformationandshippingInformationas JSON strings. Keep product and order currencies consistent, and ensure that product amounts, discount entries, and shipping fees add up toorderAmount.
Select the request example “Unified Checkout with all available payment methods”. Replace the order and customer details, use HKD for this flow, and add this method’slpmsInfoif you want to select only AlipayHK. Remove the example’scardInfoobject for this flow. The example shows the shared Checkout request structure. - Select the response example “Unified Checkout session created”. Store the returned
paymentIdandtransactionIdagainst your order, then redirect the customer’s browser toredirectUrl. The initialstatus=Umeans that payment has not been completed. - Checkout handles the payment page and subsequent customer interaction. When the customer reaches
returnUrl, display the result retrieved from your server. For request authentication, redirects, and return handling, see Checkout integration.
Customer actions and final result
Customers follow the payment page or wallet opened for the current attempt to continue with AlipayHK. If the page displays a QR code, they scan it with the AlipayHK wallet; if it offers a wallet redirect, they follow that option. They check the amount, complete any requested wallet authentication, and confirm the purchase. Available actions depend on the page and device. Your application does not generate wallet payment codes or collect wallet passwords or verification codes.
Customers may leave before completing payment. Completing authentication or returning to your site does not confirm payment. Keep the order awaiting confirmation until your server retrieves the Onerway result.
Process the order using a signature-verified payment result webhook. If no notification has arrived or you need to check the result, call Query payments with the stored paymentId. Fulfill the order only after your server confirms a successful payment. For verification, acknowledgement, idempotency, and query fallback, see Webhooks.
Refunds and disputes
Confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.
Testing and go-live
Confirm the test environment and available AlipayHK test procedure with Onerway, then follow Sandbox testing:
- Create an order with HKD and the required customer details. For Direct API payments, handle the actual response and confirm that
R + RedirectURLopens the returned address. For Checkout, confirm that the initialredirectUrlopens Checkout and that AlipayHK is available. - Check the purchase details and the authentication and confirmation steps provided by the AlipayHK flow. Complete the agreed payment test, then confirm the result on your server. Completing verification or reaching a return page alone does not pass the successful-payment check.
- Test a customer leaving before authorization, unsuccessful verification or purchase, and a return to your site before a final result. Verify query fallback when no notification has arrived and idempotent handling of duplicate notifications.
- For go-live acceptance, retain the notification and acknowledgement for the same order. Query the payment status and check that it matches the notification. Check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.
OVO
Accept one-time OVO payments through Checkout with customer details and the wallet phone number supplied in advance, then confirm the result on your server.
Kakao Pay
Accept one-time Kakao Pay purchases through the Direct API or Checkout with customer details supplied in advance, and confirm the result on your server.