Alipay+ DocsAlipay+ Docs

SDK overview

The Alipay+ NFC SDK provides APIs for implementing Alipay+ NFC payment functionality in your applications. The following table lists the available functions.

Phase

Function

Description

Initialization

IAPApplePay.setConfiguration(config:)

Initialize the SDK and set overall configurations.

IAPApplePay.connect(params:)

Switch the current operation context to the specified user account. Call this after user login or account switch.

IAPApplePay.disconnect()

Disconnect the current user and clear sensitive context from memory. Call this after user logout.

IAPApplePay.destroy()

Deinitialize the SDK, release memory resources, and terminate background tasks.

Proxy Settings

IAPApplePay.setNetworkProxy(_:)

Set up a network proxy for communication between the SDK and the Alipay+ Server.

IAPApplePay.setLoggerProxy(_:)

Set up a logger proxy for log output.

IAPApplePay.setTrackingProxy(_:)

Set up a proxy for event tracking.

IAPApplePay.setRemoteConfigProxy(_:)

Set up a proxy for managing SDK configurations remotely.

Static Token

IAPApplePay.createStaticToken(completion:)

Create a static token for the current user.

IAPApplePay.getStaticTokenInfo(completion:)

Retrieve information about the current user's static token.

IAPApplePay.getStaticTokenVerificationInfo(completion:)

Retrieve static token verification information.

Service Management

IAPApplePay.suspendService(completion:)

Pause all services and suspend all tokens, including those added to Apple Wallet.

IAPApplePay.unsuspendService(completion:)

Resume all services and tokens, including those added to Apple Wallet.

IAPApplePay.getServiceState(completion:)

Get the current service state for the user.

Apple Wallet and Device Token

IAPApplePay.addToAppleWallet(completion:)

Create a device token for the current device or paired device and add the token to Apple Wallet.

IAPApplePay.canAddToCurrentDevice(completion:)

Check whether the current device is capable of adding the token.

IAPApplePay.canAddToPairedDevice(completion:)

Check whether the paired device, for example, an Apple Watch, is capable of adding the token.

IAPApplePay.presentCurrentDeviceToken(completion:)

Present the device tokens already provisioned for the current user on the current device.

IAPApplePay.getDeviceTokenOnCurrentDevice(completion:)

Retrieve the device token of the current device.

IAPApplePay.getDeviceTokenOnPairedDevice(completion:)

Retrieve the device token on the paired Apple Watch.

In-App Verification

IAPApplePay.activateDeviceToken(deviceAccountIdentifier:redirectUrlStr:completion:)

Activate a device token. Perform user authentication before calling this method.

Wallet Extension

IAPApplePay.statusForPassEntries(completion:)

Report the status of your Wallet Extensions.

IAPApplePay.availablePassEntries(completion:)

Report the list of device tokens available to add to the current device.

IAPApplePay.availableRemotePassEntries(completion:)

Report the list of device tokens available to add to the current paired device.

IAPApplePay.generateAddPaymentPassRequestForPassEntryWithIdentifier(_:configuration:certificates:nonce:nonceSignature:completion:)

Create the data object required by Apple to add a card to ApplePay

Note: If your project integrates this SDK using Objective-C code, you need to use the IAPApplePayBridge class instead of the IAPApplePay class, to ensure full compatibility. IAPApplePayBridge is a bridging class specifically optimized for Objective-C code and is used in the same way as IAPApplePay.