Alipay+ DocsAlipay+ Docs

inquireAuthorizationOption()

Use this API to inquire whether the Alipay+ payment method is available and if so, related data about the Alipay+ payment method, such as the Alipay+ logo, brand name, and promotion information.

You can directly render the payment method page or the add payment method page based on the data about the Alipay+ payment method. Alternatively, you can process the data about the Alipay+ payment method and append the processing result to the data about your existing payment methods, and then render the payment method page or the add payment method accordingly.

Syntax

copy
alipayPlus.inquireAuthorizationOption(params);

Arguments

Name

Type

Description

Required

params

InquireAuthorizationOptionParams

An object that contains the parameters for querying the data about the Alipay+ payment method.

M

Returns

Type

Description

Promise<IAuthorizationOption>

The data about the Alipay+ payment method.

This parameter is returned if the inquiry is successful.

Errors

Type

Description

IErrorCode

The error code about the inquiry.

Sample

copy
alipayPlus.inquireAuthorizationOption({
  paymentCurrency: 'PHP',
}).then((authorizationOption) => {
  console.log(authorizationOption);
}, (error) => {
  // handle error
});