Alipay+ DocsAlipay+ Docs

disconnect

Call the disconnect API to disconnect the current user and clear sensitive context from memory, such as temporary keys and cached data. Call this API after the user logs out.

Method signature

copy
public static func disconnect() -> Bool

Request parameters

N/A

Response parameters

Parameter

Type

Required

Description

result

Bool

Yes

Whether the user was successfully disconnected and sensitive data was cleared.

Valid values are:

  • true: successful
  • false: failed

Sample

copy
let success = IAPApplePay.disconnect()
if success {
    // Disconnected
}