Alipay+ DocsAlipay+ Docs

Accept payment

To integrate the Merchant-presented Mode Payment Order Code, the Acquiring Partner (ACQP) needs to complete the following steps.

Merchant registration

In certain countries or regions, for legal or compliance reasons, the merchant information that is related to this payment must be registered before a payment can be processed. The merchant registration process only needs to be performed once. For more information, see Registration.

Create a payment

To initiate a payment request, merchants should present an order code for users to complete the payment. The order code here is a unique QR code that is generated by the Alipay+ system for each transaction.

Processing logic

After the user scans the order code and completes the payment, the ACQP is recommended to monitor the payment result notifications, or use the inquiryPayment interface to query the payment result.

Note:

  • It is recommended to listen to the Async notification from the Alipay+ system. Meanwhile, calling the inquiryPayment interface to get the result is also needed.
  • When the order is closed, you must also stop displaying the order code.

Sample

The ACQP sends a request to Alipay+.

copy
{
	"paymentExpiryTime": "2019-06-01T12:01:01+08:00",
	"paymentNotifyUrl": "http://xmock.inc.alipay.net/api/Ipay/globalSite/automtion/paymentNotify.htm",
	"paymentRequestId": "pay_1089760038715669_102775745075669",
	"paymentFactor": {
		"isInStorePayment": "true",
		"isCashierPayment": "true",
    "inStorePaymentScenario":"OrderCode"
	},
	"order": {
		"referenceOrderId": "102775745075669",
		"orderDescription": "Mi Band 3 Wrist Strap Metal Screwless Stainless Steel For Xiaomi Mi Band 3 ",
		"orderAmount": {
			"currency": "JPY",
			"value": "100"
		},
		"merchant": {
			"referenceMerchantId": "M00000000001",
			"merchantName": "cup Hu",
			"merchantMCC": "1405",
			"merchantAddress": {
				"region": "JP",
				"city": "xxx"
			},
			"store": {
				"referenceStoreId": "S00000000001",
				"storeName": "UGG-2",
				"storeMcc": "1405"
			}
		},
    "env":{
    	"storeTerminalId":"122222",
      "storeTerminalRequestTime": "2019-06-01T12:01:01+08:00"
    }
	},
	"settlementStrategy": {
		"settlementCurrency": "USD"
	},
	"paymentAmount": {
		"currency": "JPY",
		"value": "100"
	},
	"paymentMethod": {
		"paymentMethodType": "CONNECT_WALLET"
	}
}

Alipay+ returns a response to the ACQP.

copy
{
	"acquirerId": "2021228100000000",
	"result": {
        "resultCode": "PAYMENT_IN_PROCESS",
        "resultMessage": "The payment in process.",
        "resultStatus": "U"
   },
	"paymentId": "20190608114010800100188820200355883",
	"paymentAmount": {
		"value": "100",
		"currency": "JPY"
	},
	"orderCodeForm": {
		"paymentMethodType": "CONNECT_WALLET",
		"expireTime": "2019-06-01T12:01:01+08:30",
		"codeDetails": [{
				"codeValueType": "QRCODE",
				"codeValue": "https://qr.alipay.com/bavh4wjlxf12tper3b",
				"displayType": "TEXT"
			},
			{				
        "codeValueType": "QRCODE",
				"codeValue": "https://global.alipay.com/merchant/order/showQrImage.htm?code=https%3A%2F%2Fglobal.alipay.com%2F281002040011kGko31tPT30V6G9hJiH8YNMa&picSize=L",
				"displayType": "BIGIMAGE"
			},
			{
        "codeValueType": "QRCODE",
				"codeValue": "https://global.alipay.com/merchant/order/showQrImage.htm?code=https%3A%2F%2Fglobal.alipay.com%2F281002040011kGko31tPT30V6G9hJiH8YNMa&picSize=M",
				"displayType": "MIDDLEIMAGE"
			},
			{
        "codeValueType": "QRCODE",
				"codeValue": "https://global.alipay.com/merchant/order/showQrImage.htm?code=https%3A%2F%2Fglobal.alipay.com%2F281002040011kGko31tPT30V6G9hJiH8YNMa&picSize=S",
				"displayType": "SMALLIMAGE"
			}
		]
	}
}

More information

For more information about how to use the interface (such as the field description), see pay.

Handle payment result notifications

Alipay+ calls the notifyPayment interface to notify the ACQP about the payment result when payment reaches a final state of success or failure. After that, the ACQP needs to notify merchants of the result accordingly.

For how to receive and handle Alipay+ payment result notification, and the sample codes, see Receive payment notification.