Alipay Cross-border

Introduction

Alipay Cross-border Logo

Alipay Cross-border E-Payment Service is a payment method that enables Chinese consumers to buy goods online from international merchants using Chinese Yuan (CNY). Alipay Cross-border will then remit the sum to the international merchant in a foreign currency.

When Chinese customers make a purchase in an international online shop with Alipay Cross-border, they are redirected to the Alipay Cross-border  website where they authorize the transaction. A notification confirming the outcome of the transaction is sent to the merchant. This notification should be received within a few minutes.

General Information

Payment Mode, Countries and Currencies

This table illustrates which payment mode Alipay Cross-border belongs to. It also provides detailed information about the countries and currencies, which are relevant for Alipay Cross-border.

Payment Mode, Countries and Currencies

Payment Mode

Wallet

Countries

Worldwide

Currencies

AUD, CAD, CHF, DKK, EUR, GBP, HKD, JPY, KRW, NOK, NZD, SEK, SGD, THB, USD

Communication Formats

This table illustrates how Alipay Cross-border notifications are encoded and which languages and methods can be used for requests and responses.

Communication Formats

Requests/Responses

Format

XML

Methods

POST, GET

IPN Encodement

Please follow the instructions given at Instant Payment Notification to set up IPN.

Transaction Types

For transaction type details which are not given here look at  Appendix B: Transaction Types.

Transaction Type Description Link to the sample

debit

 

debit samples

Used with autoDebit, containing a <periodic>.

refund-debit

 

refundDebit samples

authorization-only

Used with auto-debit: Initiates the sign agreement between Alipay Cross-border and the consumer.

authorization-only (sign) samples

authorization-only (unsign) samples

Test Credentials

Test Credentials

URL(s) Endpoints

For the transaction types authorization-only and debit.

https://api-test.wirecard.com/engine/rest/paymentmethods/

For the transaction types refund-debit and refund-request.

https://api-test.wirecard.com/engine/rest/payments/

Merchant Account ID (MAID)

47cd4edf-b13c-4298-9344-53119ab8b9df

Username

16390-testing

Password

3!3013=D3fD8X7

Additional test credentials on Alipay Cross-border’s environment
debit and refund-debit: For Merchants and Consumers

Merchant Account

Partner

2088101122136241

Key

760bdzec6y9goq7ctyx96ezkz78287de

Consumer Account

Account Name

alipaytest20091@gmail.com

Password

111111

Payment Password

111111

Captcha Code

8888

auto-debit: For Merchants and Consumers

Merchant Account

Partner

2088621880535422

Key

2l2o3ew9ke8d3ojobck40tvur6pmj00h

Consumer Account

Account Name

15145493455

Password

a111111

Payment Password

b111111

Workflow

debit Workflow
Figure 13. debit Workflow
  1. Consumers add items to shopping basket.

  2. Consumers select Payment Method Alipay Cross-border.

  3. Merchant initiates a debit transaction.

  4. Alipay Cross-border responds with a redirection URL to the merchant.

  5. Merchant redirects consumer to Alipay Cross-border.

  6. Consumers enter their account data and confirm the payment.

  7. Alipay Cross-border processes the transaction

  8. Wirecard Payment Gateway receives transaction status.

  9. Wirecard Payment Gateway sends transaction status to merchant and redirects the consumer to the merchant.

  10. Merchant receives the transaction’s status and displays the completion of the payment process to the consumer.

Fields

The fields used for Alipay Cross-border requests, responses and notifications are the same as the REST API Fields. Please refer to: REST API Fields

auto-debit

Only the auto-debit fields listed below have different properties.

The following elements are mandatory (M), optional (O) or conditional © for a request/response/notification.

Field Cardinality Datatype Size Description

periodic/periodic-type

M

xs:string

15

Periodic type value can only be recurring.

periodic/sequence-type

M

xs:string

15

Sequence type value can be first, recurring or final depending on transaction type.

Features

Mobile Payment Service

The merchant can use the parameter entry mode to route the process directly to the mobile endpoint.

When using ReST API the provision of the mobile endpoint has to be indicated in the paramenter entry mode with each request.

When using HPP/EPP Wirecard Payment Gateway detects the device in use automatically and displays the corresponding payment page.

Merchants using HPP/EPP can overwrite the auto detect function. They must send the paramenter entry mode in each request.

Customizing

Use the Provider Parameter connector.wap.autodetect to customize the activation of the layout type. The layout can either be mobile or desktop.

When the parameter is set to true, it depends on the value of the entry mode, set by the merchant.

When the parameter is set to false, all payment processes will activate the desktop layout.

Overview

When Provider Parameter connector.wap.autodetect is set to true.

Attribute REST API HPP/EPP

Name

Attribute Sent?

Value

entry-mode (ReST API)
entry_mode (HPP/EPP)

no

Activates desktop layout.

Detects device type automatically

yes

mcommerce

Activates layout for mobile payment.

Activates layout for mobile payment.

yes

For further questions, please contact your sales manager.

auto-debit

The auto-debit service is used for enabling consumers using Alipay Cross-border to make recurring purchases (subject to Alipay Cross-border confirmation of authorization). Merchants initiate a request for collecting payments from consumers in accordance with Alipay Cross-border’s auto-debit Service Agreement.

Workflow
Alipay Cross-border auto-debit_Workflow
Figure 14. auto-debit Workflow
  1. The consumer selects the payment method Alipay Cross-border.

  2. The merchant requests the consumer to sign in to Alipay Cross-border.

  3. WPG requests a redirect URL from Alipay Cross-border.

  4. Alipay Cross-border generates a redirect URL and sends it to WPG.

  5. WPG forwards the redirect URL to the merchant.

  6. The merchant redirects the consumer to Alipay Cross-border.

  7. The consumer enters his access key and the password.

  8. Alipay Cross-border confirms the consumer’s access credentials.

  9. WPG forwards the confirmation to the merchant and redirects the consumer to the merchant’s shop.

  10. The merchant displays the confirmation page to the consumer.

  11. If the merchant offers recurring payments, the merchant initiates an auto-debit request to WPG.

  12. WPG forwards this request to Alipay Cross-border.

  13. Alipay Cross-border processes the payment and sends a payment notification to the consumer.

Samples

Alipay Cross-border returns coded payment method URLs in the response!

When you perform a test transaction, the <payment-method-url> that is returned in the XML response is encoded and cannot be used directly. You must decode the URL first to link to the correct page. You can use any tool that decodes URLs. Maybe you want to try Coder’s Toolbox, available at: https://coderstoolbox.net/string/#!encoding=xml&action=decode&charset=us_ascii.

General
debit
debit Request (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
      <payment-methods>
          <payment-method name="alipay-xborder" />
      </payment-methods>
      <merchant-account-id>47cd4edf-b13c-4298-9344-53119ab8b9df</merchant-account-id>
      <request-id>31b5bee8-cea9-4037-b604-4401a063dab1</request-id>
      <transaction-type>debit</transaction-type>
      <requested-amount currency="USD">2.22</requested-amount>
      <order-number>180528105918955</order-number>
      <order-detail>Test product 001</order-detail>
      <ip-address>127.0.0.1</ip-address>
      <locale>en</locale>
      <account-holder>
          <first-name>Max</first-name>
          <last-name>Cavalera</last-name>
          <email>max.cavalera@wirecard.com</email>
      </account-holder>
   <cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/cancel</cancel-redirect-url>
   <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
   <fail-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/error</fail-redirect-url>
</payment>
debit Response (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
   <merchant-account-id>47cd4edf-b13c-4298-9344-53119ab8b9df</merchant-account-id>
   <transaction-id>2cc70f39-4d50-4c1a-9566-b8a5422e00ed</transaction-id>
   <request-id>31b5bee8-cea9-4037-b604-4401a063dab1</request-id>
   <transaction-type>debit</transaction-type>
   <transaction-state>success</transaction-state>
   <completion-time-stamp>2018-05-28T08:59:19.000Z</completion-time-stamp>
   <statuses>
      <status code="201.0000" description="The resource was successfully created." severity="information" />
   </statuses>
   <requested-amount currency="USD">2.22</requested-amount>
   <account-holder>
      <first-name>Max</first-name>
      <last-name>Cavalera</last-name>
      <email>max.cavalera@wirecard.com</email>
   </account-holder>
   <ip-address>127.0.0.1</ip-address>
   <order-number>180528105918955</order-number>
   <order-detail>Test product 001</order-detail>
   <payment-methods>
      <payment-method url="https://openapi.alipaydev.com/gateway.do?sign_type=MD5&amp;partner=2088101122136241&amp;service=create_forex_trade&amp;notify_url=https%3A%2F%2Fapi-test.wirecard.com%3A443%2Fengine%2Fnotification%2Falipay-xborder%2F&amp;return_url=https%3A%2F%2Fapi-test.wirecard.com%3A443%2Fengine%2Fnotification%2Falipay-xborder%2Fredirect%2F2cc70f39-4d50-4c1a-9566-b8a5422e00ed%2F&amp;out_trade_no=2cc70f39-4d50-4c1a-9566-b8a5422e00ed&amp;subject=180528105918955&amp;total_fee=2.22&amp;currency=USD&amp;secondary_merchant_id=0000003173B0F907&amp;secondary_merchant_name=testing-merchant&amp;secondary_merchant_industry=4555&amp;order_gmt_create=2018-05-28+16%3A59%3A19&amp;order_valid_time=21600&amp;timeout_rule=12h&amp;body=Test+product+001&amp;sign=2a95b723ee0c59eb4d6e320dd4abc558" name="alipay-xborder" />
   </payment-methods>
   <cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/cancel</cancel-redirect-url>
   <fail-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/error</fail-redirect-url>
   <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
   <locale>en</locale>
</payment>
refund-debit
refund-debit Request (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment">
    <merchant-account-id>47cd4edf-b13c-4298-9344-53119ab8b9df</merchant-account-id>
    <request-id>88bba544-5d77-4f52-9b43-531642b2543f</request-id>
    <transaction-type>refund-debit</transaction-type>
    <parent-transaction-id>${former debit transaction}</parent-transaction-id>
    <ip-address>127.0.0.1</ip-address>
    <payment-methods>
        <payment-method name="alipay-xborder" />
    </payment-methods>
</payment>
refund-debit Response (Successful)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction" self="https://api-test.wirecard.com:443/engine/rest/merchants/47cd4edf-b13c-4298-9344-53119ab8b9df/payments/66382a82-e48d-4c7c-a644-2ce3f91eeb5e">
   <merchant-account-id ref="https://api-test.wirecard.com:443/engine/rest/config/merchants/47cd4edf-b13c-4298-9344-53119ab8b9df">47cd4edf-b13c-4298-9344-53119ab8b9df</merchant-account-id>
   <transaction-id>66382a82-e48d-4c7c-a644-2ce3f91eeb5e</transaction-id>
   <request-id>5ae58f7c-7922-4486-baf8-33276120fd29</request-id>
   <transaction-type>refund-debit</transaction-type>
   <transaction-state>success</transaction-state>
   <completion-time-stamp>2018-05-28T09:14:57.000Z</completion-time-stamp>
   <statuses>
      <status code="201.0000" description="alipay-xborder:The resource was successfully created." severity="information" />
   </statuses>
   <requested-amount currency="USD">1.23</requested-amount>
   <parent-transaction-id>a9bbf42e-ed7a-4b0a-8111-511747d3b762</parent-transaction-id>
   <account-holder>
      <first-name>Max</first-name>
      <last-name>Cavalera</last-name>
      <email>max.cavalera@wirecard.com</email>
   </account-holder>
   <ip-address>127.0.0.1</ip-address>
   <order-number>180528105415146</order-number>
   <order-detail>Test product 001</order-detail>
   <payment-methods>
      <payment-method name="alipay-xborder" />
   </payment-methods>
   <parent-transaction-amount currency="USD">1.230000</parent-transaction-amount>
   <api-id>elastic-api</api-id>
   <cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/cancel</cancel-redirect-url>
   <fail-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/error</fail-redirect-url>
   <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
   <locale>en</locale>
</payment>
auto-debit
authorization-only (Sign Agreement)
authorization-only (Sign) Request (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>09383431-11cf-4eab-9905-a0a84f3c89e0</merchant-account-id>
   <request-id>2003495d-5d8b-4afc-9787-860e6713b8f8</request-id>
   <transaction-type>authorization-only</transaction-type>
   <requested-amount currency="USD">0.00</requested-amount>
   <order-detail>XBOX</order-detail>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>first</sequence-type>
   </periodic>
   <ip-address>127.0.0.1</ip-address>
   <payment-methods>
   <payment-method name="alipay-xborder"/>
   </payment-methods>
</payment>
_get-url (Sign) Response (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
   <merchant-account-id>09383431-11cf-4eab-9905-a0a84f3c89e0</merchant-account-id>
   <transaction-id>417c2896-c33d-46c4-99a0-2c6e4bf07873</transaction-id>
   <request-id>2003495d-5d8b-4afc-9787-860e6713b8f8-get-url</request-id>
   <transaction-type>get-url</transaction-type>
   <transaction-state>success</transaction-state>
   <completion-time-stamp>2018-09-05T19:12:39.000Z</completion-time-stamp>
   <statuses>
      <status code="201.0000" description="The resource was successfully created." severity="information"/>
   </statuses>
   <requested-amount currency="USD">0.00</requested-amount>
   <ip-address>127.0.0.1</ip-address>
   <order-detail>XBOX</order-detail>
   <payment-methods>
      <payment-method url="https://openapi.alipaydev.com/gateway.do?_input_charset=utf-8&amp;access_info=%7B%22channel%22%3A%22PC%22%7D&amp;external_sign_no=417c2896-c33d-46c4-99a0-2c6e4bf07873&amp;notify_url=https%3A%2F%2Fdev.thesolution.com%2Fengine%2Fnotification%2Falipay-xborder%2F&amp;partner=2088621880535422&amp;product_code=GENERAL_WITHHOLDING_P&amp;return_url=https%3A%2F%2Fdev.thesolution.com%2Fengine%2Fnotification%2Falipay-xborder%2Fredirect%2F417c2896-c33d-46c4-99a0-2c6e4bf07873%2F&amp;sales_product_code=FOREX_GENERAL_WITHHOLDING&amp;scene=INDUSTRY%7CMEDICAL&amp;service=alipay.dut.customer.agreement.page.sign&amp;sign=7a5b3a8efc97e007b190adbfe4c806c3&amp;sign_type=MD5&amp;third_party_type=PARTNER" name="alipay-xborder"/>
   </payment-methods>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>first</sequence-type>
   </periodic>
</payment>
debit (with <periodic>)
debit Request (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>83716d0c-9663-4329-81f6-898ac57776fa</merchant-account-id>
   <request-id>f626c59f-afd6-4926-8f31-dbd26d07a757</request-id>
   <transaction-type>debit</transaction-type>
   <parent-transaction-id>649cb805-5aa0-4ee7-b00e-75a6332a85aa</parent-transaction-id>
   <requested-amount currency="USD">2.01</requested-amount>
   <payment-methods>
      <payment-method name="alipay-xborder"/>
   </payment-methods>
   <order-detail>XBOX</order-detail>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>recurring</sequence-type>
   </periodic>
   <sub-merchant-info>
      <store-id>BJ_ZZ_001</store-id>
      <store-name>Muku in the Dreieichstrabe</store-name>
   </sub-merchant-info>
   <ip-address>127.0.0.1</ip-address>
</payment>
get-url Response (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
   <merchant-account-id>83716d0c-9663-4329-81f6-898ac57776fa</merchant-account-id>
   <transaction-id>2b9afc33-c8b8-4c0f-8755-730a2abbbfef</transaction-id>
   <request-id>f626c59f-afd6-4926-8f31-dbd26d07a757-get-url</request-id>
   <transaction-type>get-url</transaction-type>
   <transaction-state>success</transaction-state>
   <completion-time-stamp>2018-09-05T15:11:16.000Z</completion-time-stamp>
   <statuses>
      <status code="201.0000" description="The resource was successfully created." severity="information" provider-transaction-id="2018090521001004890500277853"/>
   </statuses>
   <requested-amount currency="USD">2.01</requested-amount>
   <parent-transaction-id>649cb805-5aa0-4ee7-b00e-75a6332a85aa</parent-transaction-id>
   <account-holder>
      <first-name>John</first-name>
      <last-name>Doe</last-name>
      <email>john.doe@wirecard.com</email>
      <phone>1 555 555 5555</phone>
      <address>
         <street1>123 test</street1>
         <city>Toronto</city>
         <state>ON</state>
         <country>CA</country>
         <postal-code>M4P1E8</postal-code>
      </address>
   </account-holder>
   <ip-address>127.0.0.1</ip-address>
   <order-number>123456</order-number>
   <order-detail>XBOX</order-detail>
   <payment-methods>
      <payment-method name="alipay-xborder"/>
   </payment-methods>
   <api-id>elastic-payment-page-nvp</api-id>
   <processing-redirect-url>http://10.0.0.114:8080/shop/complete.jsp?state=processing&amp;</processing-redirect-url>
   <cancel-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/cancel</cancel-redirect-url>
   <fail-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/error</fail-redirect-url>
   <success-redirect-url>https://demoshop-test.wirecard.com/demoshop/#/success</success-redirect-url>
   <locale>en</locale>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>recurring</sequence-type>
   </periodic>
   <sub-merchant-info>
      <store-id>BJ_ZZ_001</store-id>
      <store-name>Muku in the Dreieichstrabe</store-name>
   </sub-merchant-info>
</payment>
authorization-only (Unsign Agreement)
authorization-only (Unsign) Request (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment">
   <merchant-account-id>09383431-11cf-4eab-9905-a0a84f3c89e0</merchant-account-id>
   <request-id>1219a275-6032-4854-ba10-ee44ccf9c802</request-id>
   <transaction-type>authorization-only</transaction-type>
   <requested-amount currency="USD">0.00</requested-amount>
   <parent-transaction-id>f704f0a9-8a9c-4639-bb98-28f97744dd60</parent-transaction-id>
   <order-detail>XBOX</order-detail>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>final</sequence-type>
   </periodic>
   <ip-address>127.0.0.1</ip-address>
   <payment-methods>
      <payment-method name="alipay-xborder"/>
   </payment-methods>
</payment>
authorization-only (Unsign) Response (Successful)
<payment xmlns="http://www.elastic-payments.com/schema/payment" xmlns:ns2="http://www.elastic-payments.com/schema/epa/transaction">
   <merchant-account-id>09383431-11cf-4eab-9905-a0a84f3c89e0</merchant-account-id>
   <transaction-id>9af5964e-5d8c-467a-8299-1f3204a56e0b</transaction-id>
   <request-id>1219a275-6032-4854-ba10-ee44ccf9c802</request-id>
   <transaction-type>authorization-only</transaction-type>
   <transaction-state>success</transaction-state>
   <completion-time-stamp>2018-09-05T19:12:48.000Z</completion-time-stamp>
   <statuses>
      <status code="201.0000" description="The resource was successfully created." severity="information" provider-transaction-id=""/>
   </statuses>
   <requested-amount currency="USD">0.00</requested-amount>
   <parent-transaction-id>f704f0a9-8a9c-4639-bb98-28f97744dd60</parent-transaction-id>
   <ip-address>127.0.0.1</ip-address>
   <order-detail>XBOX</order-detail>
   <payment-methods>
      <payment-method name="alipay-xborder"/>
   </payment-methods>
   <consumer-id>2088622907141895</consumer-id>
   <api-id>---</api-id>
   <periodic>
      <periodic-type>recurring</periodic-type>
      <sequence-type>final</sequence-type>
   </periodic>
</payment>
Custom URL: