Alipay Online
In this flow, the consumer shops and pays in a desktop browser or on a mobile device.
Payment Method Properties
Available country codes Country where the consumer's wallet is domiciled | CN |
Processing (Presentation) currencies | AUD, CAD, CHF, CNY, EUR, GBP, HKD, JPY, NZD, SGD, USD |
Settlement currencies | AUD, CAD, CHF, EUR, GBP, HKD, JPY, NZD, SGD, USD |
Consumer currencies | CNY |
Channel member tag | alipay |
Scheme name in the settlement file | Alipay |
Minimum transaction amount | CNY 0.1 |
Maximum transaction amount | Bank card: CNY 50,000/bank or lower Wallet balance: CNY 300,000/transaction Total transaction limit in a day: CNY 300,000 |
Session timeout | 3 mins to 12 hours, depending on the flow |
Refund | Full, partial and multiple partial refunds are available. |
Refund Validity | 360 days |
Chargeback | No |
Integration Type | Asynchronous |
Sandbox | Scheme-hosted |
Transaction flow
- On the merchant checkout page, the consumer selects paying with Alipay.
- The merchant sends a transaction request to Alipay.
- If the consumer is paying from a desktop browser:
- The consumer is redirected to an Alipay page
- The page will display a QR code if the mobileview is not set to yes
- The consumer scans the QR code. Alternatively, they can log in to the Alipay website to make the payment.
- If the consumer is paying from a mobile device:
- Alipay returns a payment link to the merchant's mobile website.
- The merchant's mobile website redirects the consumer to the Alipay in-app payment page.
- The consumer completes the payment in the Alipay app.
Merchant business type
There are certain specins that are only required when a partner has a determined merchant business type. The boarding team will confirm your merchant's business type during the onboarding process
Alipay Online Integration
Specific input parameters
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
specin.mobileview | O | ascii | N/A | Set to no to display a QR code on Alipay’s payment page. The consumer can scan the code to proceed with the payment on their mobile device. |
specin.hotelname | C | ascii | N/A | The name of the hotel for which the reservation was made. Mandatory in case the merchant’s business type is Hotel. |
specin.checkintime | C | ascii | [0-9]{4}-[0-9]{2}-[0-9]{2} | The date of the check-in in GMT+8 offset. Separate multiple entries by a | .Mandatory in case the merchant’s business type is Hotel. Example: 2019-03-23|2019-03-25. The number of entries in specin.checkintime must match the number of entries in specin.checkouttime . |
specin.checkouttime | C | ascii | [0-9]{4}-[0-9]{2}-[0-9]{2} | The date of the check-in in GMT+8 offset. Separate multiple entries by a | .Mandatory in case the merchant’s business type is Hotel. Example: 2019-03-25|2019-03-29 .The number of entries in specin.checkouttime must match the number of entries in specin.checkintime . |
specin.flightnumber | C | ascii | N/A | The number of the flight. Mandatory in case the merchant’s business type is Aviation. Separate multiple entries by a | .Example: LH 2041|AZ 436 .The number of entries in specin.flightnumber must match the number of entries in specin.departuretime . |
specin.departuretime | C | ascii | [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2} | The date and time of departure of the flight in GMT+8 offset. Mandatory in case the merchant’s business type is Aviation. Separate multiple entries by a | .Example: 2019-04-28 17:50|2019-04-29 10:30 The number of entries in specin.departuretime must match the number of entries in specin.flightnumber . |
specin.admissionnoticeurl | C | ascii | https?://.+{1,248} | The URL of the admission notice. Mandatory in case the merchant’s business type is Overseas Education. |
specin.goodsinfo | C | ascii | .+^[1-9][0-9]\* The part before the ^ is the description of the item. The part after indicates how many copies of this item are being sold. | Information about the goods being sold. Mandatory in case the merchant’s business type is Retailing .Separate multiple entries by a | .Example: Laptop^1|Socks^12 . |
For standard input parameters, see Input parameters for the TRANSACTION call.
Specific output parameters
Field Name | Description | Type |
---|---|---|
SPECOUT.OUTTRADENO | A unique value that’s assigned to each transaction. | ascii |
SPECOUT.SETTLEMENTCURRENCY | The settlement currency of the transaction. | ascii |
SPECOUT.SETTLEMENTAMOUNT | The amount in the settlement currency of the transaction. | ascii |
SPECOUT.FXRATE | The exchange rate. For example: USD/CNY = 6.59430000 | ascii |
SPECOUT.CNYAMOUNT | The transaction amount in CNY, in major units. | ascii |
SPECOUT.ALIPAYCUSTOMSURL | Alipay customs declaration service URL. | ascii |
SPECOUT.SRCCURRENCY | Hardcoded to CNY , as consumer wallet is in CNY. | ascii |
SPECOUT.SRCAMOUNT | The transaction amount in CNY. | ascii |
For standard output parameters, see Output parameters for the TRANSACTION call.
Specific output parameters for the REFUND call
Field Name | Type | Description |
---|---|---|
SPECOUT.SETTLEMENTCURRENCY | ascii | The settlement currency of the refund. |
SPECOUT.SETTLEMENTAMOUNT | ascii | The amount in the settlement currency of the refund. |
SPECOUT.FXRATE | ascii | The refund exchange rate. The same exchange rate used for the transaction. For example: USD/CNY = 6.59430000 |
SPECOUT.DSTAMOUNT | ascii | The refund amount in CNY. |
SPECOUT.DSTCURRENCY | ascii | Hardcoded to CNY , as consumer wallet is in CNY. |
Note
The refund uses the same exchange rate as the transaction. The total refund amount to be settled will be the same as the original total transaction amount that was settled. In the case of partial refunds, the refund amount will also be calculated with the same exchange rate, so the refund amount will never exceed the original amount.
TRANSACTION call input
tag=alipay
&txtype=TRANSACTION
&countrycode=CN
¤cy=CNY
&amount=1055
&merchanttxid=mCYaU22CeZWh
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOECONTRACT
&channel=testchannel
&merchantredirecturl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&specin.dynamicdescriptor=DynDescriptor
&accountholdername=John%20Doe
&returnmode=urlencodeext
TRANSACTION call output
REQUESTSTATUS=SUCCEEDED
&STATUS=SUCCEEDED
&TXID=844612929
&ERRMSG=
&CHANNEL=testchannel
&TAG=alipay
&REDIRECTSECRET=OTzp0pFUOGPMsW3KQSPhzrgHEa4h1DNw
&SPECOUT.OUTTRADENO=1111111
&SPECOUT.FXRATE=6.59430000
&SPECOUT.SETTLEMENTAMOUNT=15
&SPECOUT.SETTLEMENTCURRENCY=USD
&SPECOUT.CNYAMOUNT=97
&SPECOUT.ALIPAYCUSTOMSURL=https://svc-alipaycustoms.public.k8s.prod.ppro.com/alipay-customs?
sign=vVf3Eo8v1ytd%2BOf9Uy6UcZ8JppF1JCj1Wz%2Fa9r3yXo4%3D&txId=2020051422001336121451470631&amount=0.07
&SPECOUT.SRCCURRENCY=CNY
&SPECOUT.SRCAMOUNT=97
Additional Information
Notes on CNY Processing
All transactions processed in CNY are settled in USD or EUR. Alipay applies a foreign exchange rate per transaction and settles to us the converted amount in the predetermined settlement currency (USD or EUR). We also settle with you the converted amounts. This means you must track the foreign exchange rate per transaction for reconciliation purposes into the settlement currency (USD or EUR). We provide the foreign exchange rate between CNY and the settlement currency in SPECOUT.FXRATE.
Refunds are handled similarly. The SPECOUT.FXRATE parameter tracks the amount that will be deducted from your settlement. The consumer never pays any foreign exchange costs in none of the cases above. In both cases, you handle the cost through the USD or EUR settlement.
The table below shows the differences between CNY versus like-for-like processing currency.
Parameter | CNY (settlement only available in EUR and USD) | Like-for-like (processing and settlement in the same currency) |
---|---|---|
currency value in Transaction call | CNY | Non-CNY. E.g: GBP |
currency value in Refund call | CNY The same value as the currency value in Transaction call | GBP The same value as the currency value in Transaction call |
SPECOUT.SETTLEMENTCURRENCY in Transaction call when STATUS=SUCCEEDED | The predetermined non-CNY settlement currency E.g. USD or EUR | The same value as the currency value in Transaction callE.g. GBP |
SPECOUT.SETTLEMENTCURRENCY in Refund API response upon STATUS=SUCCEEDED | The predetermined non-CNY settlement currency E.g. USD or EUR | The same value as the currency value in Transaction callE.g. GBP |
CURRENCY in settlement files | The predetermined non-CNY settlement currency E.g. USD or EUR Our settlement files will not show or track foreign exchange rates | The same value as the currency value in Transaction API requestE.g. GBP |
Examples
The example used below shows an Alipay transaction with USD as the settlement currency.
Table 1. Transaction call example (only key parameters)
Parameter | Value |
---|---|
tag | alipay |
currency | CNY |
countrycode | CN |
amount | 1000 |
Table 2. Succeeded Transaction response example (only key parameters)
Parameter | Description | Value |
---|---|---|
SPECOUT.FXRATE | Exchange rate (used by Alipay) This exchange rate is guaranteed for potential refunds | 6.44145000 |
SPECOUT.CNYAMOUNT | The amount deducted from the consumer’s wallet In CNY major units | 10.00 |
SPECOUT.SRCCURRENCY | The currency of the consumer’s wallet | CNY |
SPECOUT.SRCAMOUNT | The amount deducted from the consumer’s wallet In minor units, according to ISO 4217 | 1000 |
SPECOUT.SETTLEMENTCURRENCY | The settlement currency of the transaction | USD |
SPECOUT.SETTLEMENTAMOUNT | The amount in the settlement currency of the transaction (amount calculated by Alipay and to be settled to you) In minor units according to ISO 4217 | 160 |
In the example above, the consumer will be billed CNY 10.00 and you will be settled USD 1.60.
Table 3. Refund call example (only key parameters)
Parameter | Value |
---|---|
tag | alipay |
currency | CNY |
countrycode | CN |
amount | 1000 |
Table 4. Succeeded Refund response example (only key parameters)
Parameter | Description | Value |
---|---|---|
SPECOUT.FXRATE | Exchange rate (used by Alipay) This is the guaranteed rate from the initial transaction | 6.44145000 |
SPECOUT.DSTCURRENCY | The currency of the consumer’s wallet | CNY |
SPECOUT.DSTAMOUNT | The amount deducted from the consumer’s wallet In minor units, according to ISO 4217 | 1000 |
SPECOUT.SETTLEMENTCURRENCY | The settlement currency of the transaction | USD |
SPECOUT.SETTLEMENTAMOUNT | SPECOUT.SETTLEMENTAMOUNT The amount in the settlement currency of the refund (amount calculated by Alipay and to be settled to you) In minor units according to ISO 4217 | 160 |
In the sample above, the consumer will be refunded CNY 10.00; you will be debited USD 1.60.
Settlement file examples
Table 5. Volume-per-transaction settlement file
MERCHANT_TX_ID | TX_ID | PAYMENT_REFERENCE | EVENT_TYPE | EVENT_TIMESTAMP | MERCHANT_ID | PAYMENT_METHOD | AMOUNT | CURRENCY | COUNTRY |
---|---|---|---|---|---|---|---|---|---|
202106151 | 999111222 | 3CPCKRA | SUCCEEDED | 2021-06-15T11:37:01Z | TESTCONTRACT | Alipay | 1.60 | USD | CN |
Only the converted amount (USD or EUR) will show in this file.
Table 6. Volume-per-refund settlement file
MERCHANT_TX_ID | RF_ID | PAYMENT_REFERENCE | EVENT_TYPE | EVENT_TIMESTAMP | MERCHANT_ID | PAYMENT_METHOD | AMOUNT | CURRENCY | COUNTRY | REFERENCE_TX_ID |
---|---|---|---|---|---|---|---|---|---|---|
202106151 | 999111222 | 3PZ0FWA | SUCCEEDED | 2021-06-15T15:16:02Z | TESTCONTRACT | Alipay | -1.60 | USD | CN | 999111222 |
Only the converted amount (USD or EUR) will show in this file.
Table 7. Aggregate settlement file
MERCHANT_ID | PAYMENT_METHOD | EVENT_TYPE | EVENT-COUNT | AGGREGATE_AMOUNT | CURRENCY |
---|---|---|---|---|---|
TESTCONTRACT | Alipay | TRANSACTION | 1 | 1.60 | USD |
TESTCONTRACT | Alipay | REFUND | 1 | -1.60 | USD |
TESTCONTRACT | Alipay | ACQUIRING_FEE | 2 | -0.20 | USD |
TESTCONTRACT | Alipay | SUCCEEDED_FEE | 2 | -0.20 | USD |
Only the converted amount (USD or EUR) will show in this file.
Updated 8 months ago