Alipay+ DocsAlipay+ Docs

Appendices

Common

public class IAPConfiguration

Item

Type

Description

Required

merchantId

String

The unique ID that is assigned by the ACQP to identify a merchant.

Note: The value of this parameter must be the same as the one that is specified when calling the pay API.

M

acquirerId

String

The unique ID that is assigned by Alipay+ to identify an ACQP.

M

language

String

The language that is preferred by the user. The value of the parameter consists of a language code following the ISO-639 standard and a country code following the ISO-3166 standard. The codes are connected by an underscore. For example, en_US.

The default value is en_US.

Valid values are:

  • zh_CN: Simplified Chinese
  • zh_HK: Traditional Chinese
  • en_US: English
  • ko_KR: Korean
  • fil_PH: Filipino
  • ms_MY: Malay
  • id_ID: Indonesian
  • th_TH: Thai

Note: If a valid value is specified for the language parameter, the specified language is used. Otherwise, the English language is used.

O

envType

String

The type of environment where the SDK is installed. The value of this parameter affects the gateway address of the requests that are initiated from the SDK.

Valid values:

  • PROD: indicates the production environment.
  • SANDBOX: indicates the sandbox environment.

Default value: RPOD

O

fromScheme

String

The URL scheme that redirects the user from the MPP app to your app. Set the value to your app scheme.

Currently, you need to specify this parameter only if you accept Alipay payments and import Alipay SDK to optimize the Alipay payment experience.

O

ErrorCode

Error code

Error message

Description

1001

PARAM_ILLEGAL

Illegal parameters exist.

1002

INVALID_NETWORK

A network error occurs.

1003

SYSTEM_ERROR

A system error occurs.

Cashier Payment

public class IAPInquirePaymentOptionParams

Item

Type

Description

Required

paymentCurrency

String

The payment currency, also known as transaction currency, that is supported by the merchant.

The value of this parameter must be an alphabetic code that follows the ISO 4217 standard, for example, "EUR" for Euros.

M

logoPattern

String

The pattern of the logo, such as P1-WEB-01. The value consists of the following three parts:

  • The layout of the logo. Valid values are:
    • P1: indicates that the Alipay+ logo is located on the left of wallet logos.
    • P2: indicates that the Alipay+ logo is above wallet logos.
  • The terminal type that the logo is applied to. Valid values are WEB and APP.
  • Custom field with a maximum length of 10 characters. The default values are sequential numbers starting from01.

O

public class IAPPaymentOption

Item

Type

Description

Required

enabled

boolean

Indicates whether the Alipay+ payment method is available. Valid values are:

  • false: In this case, you can check the disableReason parameter to understand the reason for failure. Generally, you do not need to display the reason to the user.
  • true: In this case, the SDK returns the logo based on the following rules:
    • If no aggregated logo is preconfigured, the SDK returns the default Alipay+ logo.
    • If aggregated logos are preconfigured, the SDK returns one or more aggregated logos based on the currency. If no aggregated logo matches the currency, the default aggregated logo is returned. You can use the logoPattern parameter to specify the logo that you want to use.

M

logos

Array<IAPLogo>

The logo information of the Alipay+ payment method.

Note: Nullable if the value of the enabled parameter is false.

O

brandName

String

The brand name of the Alipay+ payment method.

Note: Nullable if the value of the enabled parameter is false.

O

disableReason

String

The reason why the Alipay+ payment method is unavailable.

Note: The value of this parameter is null if the value of the enabled parameter is true.

O

paymentMethodType

String

The payment method that is provided by Alipay+.

The valid value is CONNECT_WALLET, which indicates the Alipay+ payment method.

M

promoNames

Array<String>

The list of promotion campaigns in the language that is preferred by the user.

The language of the value of this parameter is the one that you specified in the setConfiguration API, or in English if none is specified.

Each element in the array is a string that indicates the promotion name, such as RM1 Voucher.

Currently, the array contains only one element indicating one specific promotion campaign, which is the best offer that Alipay+ recommends to be displayed alongside the logo, rather than multiple different promotion campaigns.

O

public class IAPLogo

Item

Type

Description

Required

logoName

String

The name of the logo.

O

logoUrl

String

The URL of the logo.

O

logoPattern

String

The pattern of the logo, such as P1-WEB-01. The value consists of the following three parts:

  • The layout of the logo. Valid values are:
    • P1: indicates that the Alipay+ logo is located on the left of wallet logos.
    • P2: indicates that the Alipay+ logo is above wallet logos.
  • The terminal type that the logo is applied to. Valid values are WEB and APP.
  • Custom field with a maximum length of 10 characters. The default values are sequential numbers starting from01.

O

logoWidth

String

The width of the logo.

O

logoHeight

String

The height of the logo.

O

public class IAPPaymentSheetEvent

Item

Type

Description

Required

name

String(constant value)

The name of the event that occurred in the lifecycle of the payment sheet.

Note: The following events may occur only after you import Alipay SDK to optimize the Alipay payment experience:

  • IAPPaymentSheetEventPaymentSuccess
  • IAPPaymentSheetEventPaymentFailed
  • IAPPaymentSheetEventPaymentCanceled
  • IAPPaymentSheetEventPaymentException
  • IAPPaymentSheetEventPaymentProcessing

M

message

String

The message that is related to the event.

Note: The message is in the format of "{"memo": "xxx", "resultStatus": "xxx"}" if any of the following events occurs:

  • IAPPaymentSheetEventPaymentSuccess
  • IAPPaymentSheetEventPaymentFailed
  • IAPPaymentSheetEventPaymentCanceled
  • IAPPaymentSheetEventPaymentException
  • IAPPaymentSheetEventPaymentProcessing

O

constant values and possible messages

constant value

Description

IAPPaymentSheetEventDidSelectWalletAndPay

The event where the user selected an MPP and clicked Pay Now to get redirected to the MPP app or WAP page.

IAPPaymentSheetEventThrowException

The event where an exception is thrown.

IAPPaymentSheetEventUserDidCancel

The event where the user clicked Close to cancel the payment.

IAPPaymentSheetEventDidShow

The event where the payment sheet was successfully rendered.

IAPPaymentSheetEventPaymentSuccess

The event where the payment succeeds.

Note:

  1. The event notification returned by the MPP client only signals the termination of payment processing at the MPP side. To obtain the final payment result from Alipay+, you need to integrate the inquiryPayment and notifyPayment APIs.
  2. Currently, this type of event may occur only after you import Alipay SDK to optimize the Alipay payment experience.

IAPPaymentSheetEventPaymentFailed

The event where the payment failed.

Note:

  1. The event notification returned by the MPP client only signals the termination of payment processing at the MPP side. To obtain the final payment result from Alipay+, you need to integrate the inquiryPayment and notifyPayment APIs.
  2. Currently, this type of event may occur only after you import Alipay SDK to optimize the Alipay payment experience.

IAPPaymentSheetEventPaymentCanceled

The event where the payment is canceled.

Note:

  1. The event notification returned by the MPP client only signals the termination of payment processing at the MPP side. To obtain the final payment result from Alipay+, you need to integrate the inquiryPayment and notifyPayment APIs.
  2. Currently, this type of event may occur only after you import Alipay SDK to optimize the Alipay payment experience.

IAPPaymentSheetEventPaymentException

The event where an exception is thrown.

Note:

  1. The event notification returned by the MPP client only signals the termination of payment processing at the MPP side. To obtain the final payment result from Alipay+, you need to integrate the inquiryPayment and notifyPayment APIs.
  2. Currently, this type of event may occur only after you import Alipay SDK to optimize the Alipay payment experience.

IAPPaymentSheetEventPaymentProcessing

The event where the payment is in unknown status.

Note:

  1. The event notification returned by the MPP client only signals the termination of payment processing at the MPP side. To obtain the final payment result from Alipay+, you need to integrate the inquiryPayment and notifyPayment APIs.
  2. Currently, this type of event may occur only after you import Alipay SDK to optimize the Alipay payment experience.