getStaticTokenVerificationInfo
Call the getStaticTokenVerificationInfo API to retrieve static token verification information.
Method signature
copy
public static func getStaticTokenVerificationInfo(completion: @escaping (Result<IAPAPStaticTokenVerificationInfo, IAPAPErrors>) -> Void)Request parameters
Parameter | Type | Required | Description |
completion | (Result<IAPAPStaticTokenVerificationInfo, IAPAPErrors>) -> Void | Yes | An asynchronous completion callback that returns the result of calling the getStaticTokenVerificationInfo API. |
IAPAPStaticTokenVerificationInfo
Field | Type | Required | Description |
tokenUniqueReference | String | Yes | The unique identifier to identify the static token. |
tokenNumber | String | Yes | The card number of the static token. |
expiryMonth | String | Yes | The expiration month of the static token. |
expiryYear | String | Yes | The expiration year of the static token. |
cvc2 | String | Yes | The Card Validation Code 2 of the card. |
Response parameters
N/A
Sample
copy
IAPApplePay.getStaticTokenVerificationInfo { result in
switch result {
case .success(let info):
print("Token ID: \(info.tokenUniqueReference)")
print("Card Number: \(info.tokenNumber)")
print("Valid Until: \(info.expiryMonth)/\(info.expiryYear)")
print("CVC: \(info.cvc2)")
case .failure(let error):
print("Error: \(error.localizedDescription)")
}
}