Alipay for Payment Pages

  Last updated: 



Alipay is a Chinese e-wallet that belongs to AntFinancial, an affiliate of the Alibaba group, the largest e-commerce company in the world. When selecting Alipay, customers will be redirected to their hosted pages, enter their personal details and agree to the payment, before being redirected back to your website. Once completed, you will receive confirmation via a URL notification.

  Supported customer countries   No restrictions on customer countries.
  Supported currencies   AUD, CAD, CHF, DKK, EUR, GBP, HKD, JPY, KRW, NOK, NZD, SEK, SGD, THB, USD

  Full and partial refunds permitted.


  Payments are not subject to chargebacks.


  Not supported.

  Recurring payments

  Not supported.



  This integration supports Alipay WAP Payments (Wireless Application Protocol)

Before you can begin processing WAP Payments, you will need to contact Alipay and request your account is enabled for WAP Payments.

Click here to learn more about WAP Payments (link to external site).

  This integration supports Alipay In-App Payment

Before you can begin processing In-App Payments, you will need to contact Alipay and request your account is enabled for In-App Payments.

Click here to learn more about In-App Payments (link to external site).


  1. To enable this payment method on your account, please get in touch with your account manager.
    A test sandbox account will be provided, which you will need when testing your implementation.
  2. Modify your POST to Payment Pages as needed:

    Field name

    Required during payment session

    (Either included in POST by merchant or entered by customer on Payment Pages)

    Required in POST Description
    applicationsystem No Conditional

    Required if using Alipay In-App Payments interface (applicationtype is “APP”).

    Defines the platform on which the app is being run. Supported values are “android” and “ios”.

    This cannot be entered by the customer on the payment details page and must be submitted in the POST.

    applicationtype No Conditional

    Required if using Alipay WAP or In-App Payments interface

    Determines the payment interface displayed to the customer after they have been redirected to the checkout hosted by Alipay:

    • If this field is omitted from your request, the standard Alipay e-commerce checkout page is displayed to the customer (default behaviour).
    • If “WAP” is submitted – The transaction is processed using the Alipay WAP Payments interface (Wireless Application Protocol), which is primarily designed for use by mobile devices.
    • If “APP” is submitted – The transaction is processed using the Alipay In-App Payments interface, which is primarily designed for use from within mobile apps.

    Note: Before processing transactions using WAP or In-App Payments (both through the sandbox environment and with live payments), you will need to contact Alipay and request for these features to be enabled on your Alipay account.

    billingcountryiso2a Yes No The country entered for the billing address, using ISO2A format.
    orderreference Yes Yes

    Unique order reference that can be stored on Trust Payments and Alipay’s systems.

    Recommended length 25 characters or less (exact length dependent on acquiring bank). Failure to adhere to this requirement may result in the text being truncated in the transaction.

    ruleidentifier No No

    If your POST to the Payment Pages already includes all fields required by the payment method, you can streamline the checkout process for the customer by also submitting ruleidentifier=STR-14.

    This allows the customer’s browser to immediately go to the pages hosted by the payment method to complete the transaction. (We refer to this as Journey C)

    Click here to learn about different journeys.



Once a payment has been authorised, funds will be settled at a later time, as determined by Alipay.

  The settlement notification may not be sent immediately after processing the payment.
In the unlikely event that payment is still pending settlement after 7 days (settlestatus “10”), this will be scheduled for investigation and we will contact you with further information.

Before you begin testing, we recommend that you contact our Support Team and request that rules are enabled on your account, which submit URL notifications to your system in the following scenarios:

  • When a payment is authorised.
  • When funds have been settled.


Configuring the authorisation notification

We recommend including at least the following fields in your authorisation notification:

  • Acquirer Response Message (acquirerresponsemessage)
  • Base Amount (baseamount) (e.g. £10.50 is “1050”)*
  • Main Amount (mainamount) (e.g. £10.50 is “10.50”)*
  • Billing Country (billingcountryiso2a)
  • Currency (currencyiso3a)
  • Error Code (errorcode)
  • Live Status (livestatus)
  • Order Reference (orderreference)
  • Payment Type (paymenttypedescription)
  • Request Type (requesttypedescription)
  • Settle Status (settlestatus)
  • Site Reference (sitereference)
  • Transaction Reference (transactionreference)
  • Transaction Started Timestamp (transactionstartedtimestamp)

*Please choose your preferred format.


Configuring the settlement notification

We recommend including the following fields in your settlement notification:

  • Settle Status (settlestatus)
  • Site Reference (sitereference)
  • Transaction Reference (transactionreference)


Check the notification

You will need to check the contents of each notification received and respond accordingly by following the processes outlined in our URL notifications documentation. In particular, you will need to look at the updated settlestatus value:

  • On authorisation: If the settlestatus is “0”, “1” or “10”, the payment has been authorised and you are not required to take further action at this time. However, values of “2” or “3” indicate funds are not scheduled for settlement (suspended and cancelled, respectively).
  • On settlement: If the settlestatus has been updated to “100”, this indicates that the funds have been settled. Alternatively, if this has been updated to “3”, this indicates there has been a problem and the payment was subsequently cancelled.



You will need to test your solution before you can begin processing live payments. Test transactions are processed through your test Site Reference.


You will need to contact our Support Team, providing your Alipay test account details. We will then configure your test site reference to connect directly to the Alipay testing environment.

When performing test transactions, your browser will be redirected to the Alipay testing environment to simulate a payment. Other than this, the process will be exactly the same as processing live payments.



After processing a payment, it is possible to refund the customer using MyST.

Refunds for Alipayare settled immediately (settlestatus “100”).



  • You cannot refund a payment until the AUTH has been settled (settlestatus is “100”).
  • You cannot refund a greater amount than was originally settled.
Was this article helpful?
0 out of 0 found this helpful