Allied Wallet China UnionPay API (Ver 1.15 Updated 2/20/2011)
This manual will guide you through the integration process that makes your website and Allied Wallet function as one. Integration involves implementing our APIs. APIs, application programming interfaces, are source code-based specifications that are intended to be used by software components that enable the components to communicate.
Implementing Allied Wallet’s Payment API will enable you to process your online transactions without as much tedious legwork. After our API codes are inserted you’ll be able to submit and process shopping cart and subscription transactions.
Our Payment API invokes an HTTP POST that initiates requests to Allied Wallet. Allied Wallet’s POST can be implemented into any web-programming language or even a simple web page.
Allied Wallet makes it easy. But if you find the API process a little overwhelming, don’t worry. Contact a representative and we will perform the integration for you at NO ADDITIONAL CHARGE.
Before you will be able to submit live transactions to Allied Wallet, you will need an
Allied Wallet merchant account for your website. Upon establishing an Allied Wallet merchant account, you will be provided a Merchant ID and a Site ID. These IDs uniquely identify your websites, customers, and payments. If you haven’t applied for a merchant account you can do so at:
If you wish to offer subscriptions on your website, you will also need Allied Wallet to configure your subscription groups. The group configuration will set the levels, pricing, and terms for your subscriptions.
For example, you may have a standard subscription that costs $19.95 per month and a premium subscription that costs $99.99 per quarter. Allied Wallet will configure the two different groups so that your customers will be automatically rebilled at the end of each term period.
After Allied Wallet configures your subscription groups, you will need the URL to POST transactions to. The URL for HTML form posts is:
In order to POST your customers’ payments to Allied Wallet, you must include these fields. Please note the required fields and the optional fields and add accordingly:
You can include the purchase form on any page(s) on your site that is/are capable of posting information to Allied Wallet. You’re welcome to use any standard web-programming language, even HTML. You can construct the purchase forms to allowing recurring subscriptions and products.
Here are examples of a subscription and shopping cart form:
The ‘Complete Page’ can be any page on your website. The page will welcome the customer back after they complete their purchase. Here, you can provide any additional information regarding their product or subscription purchase (i.e. shipping information, subscription activation, etc.).
The URL of the ‘Complete Page’ is supplied by your page or application in the ReturnURL field.
After a customer has completed their purchase, Allied Wallet will load the designated ‘Complete Page’ which will contain a transaction ID and merchant reference. For example, if you provided the following ReturnURL in your purchase form:
Allied Wallet would complete the transaction and return the customer to the following URL:
After a customer has successfully completed a transaction, Allied Wallet will post the transaction details onto a page that you designate on your site. This page should validate and store the transaction information in your database. The ‘Confirm Page’ should provide communication between Allied Wallet and your application. The page does not need to provide user functionality.
Allied Wallet 7 Rev. 1.14
The URL of the ‘Confirm Page’ must be a valid page on your website or application, then placed in the ConfirmURL field. If a URL is not supplied or does not point to a valid page on your site, the transaction will not be completed successfully. If you do not wish to save transaction details and information, the page can be a blank HTML page.
Information posted to the ‘Confirm Page’ is posted as standard HTTP Post name-value pairs (NVP) separated by ampersands (&). An example of a confirm post reads:
After a customer has completed a transaction through the ChinaPay/UnionPay system and their purchase has been declined, Allied Wallet will redirect the customer to this page. This page is similar to the ReturnURL, but additionally, it alerts the customer that their purchase was not successful.
The URL of the decline page is supplied by your domain and/or application in the DeclineReturnURL field. The URL is optional. If this value is not passed with the purchase information, they will be redirected to the ReturnURL instead.
After you have completed the process as detailed in this manual, your integration is ready for review and you are one step closer to processing payments with Allied Wallet. Fill out the form bellow to allert Allied Wallet compliance that you have completed the integration of your Allied Wallet China UnionPay APIs.