Use Alipay

Alipay is a third-party online payment solution, allowing customers to make and receive payments on the Internet. Alipay's market share of online payments exceeds 54% in China.

Supported currencies

Alipay supports USD and CNY transactions.

Workflow

  1. Shoppers select Alipay as a payment option in the checkout interface you provide to them.

  2. Create the order object. Use “ALIPAY” as the type of the PaymentDetails object.

  3. Use the placeOrder method to send the data to 2Checkout.

  4. Once you place the order, 2Checkout logs it into the system. At this point, the status of the order is PENDING.

  5. 2Checkout returns an Order object as the output of the placeOrder method.

  6. Use the Redirect Object in the PaymentMethod object of the response to create a redirect URL for your shoppers. Using the provided URL, make a request using the provided method (usually a GET request) and add the parameters (located in the Params object) as key-value pairs to URL of the request.

Request parameters

Parameter
Type / Description

sessionID

Required (string) Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes.

Required (Object) Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details. See code sample for more details.

Request sample

Response parameters

Parameter
Type / Description

Object

Object containing order information.

Response sample

Last updated

Was this helpful?