STPToken
public class STPToken : NSObject, STPAPIResponseDecodable, STPSourceProtocol
A token returned from submitting payment details to the Stripe API. You should not have to instantiate one of these directly.
-
The value of the token. You can store this value on your server and use it to make charges and customers.
Declaration
Swift
@objc public private(set) var tokenId: String { get }
-
Whether or not this token was created in livemode. Will be YES if you used your Live Publishable Key, and NO if you used your Test Publishable Key.
Declaration
Swift
@objc public private(set) var livemode: Bool { get }
-
The type of this token.
Declaration
Swift
@objc public private(set) var type: STPTokenType { get }
-
The credit card details that were used to create the token. Will only be set if the token was created via a credit card or Apple Pay, otherwise it will be nil.
Declaration
Swift
@objc public private(set) var card: STPCard? { get }
-
The bank account details that were used to create the token. Will only be set if the token was created with a bank account, otherwise it will be nil.
Declaration
Swift
@objc public private(set) var bankAccount: STPBankAccount? { get }
-
When the token was created.
Declaration
Swift
@objc public private(set) var created: Date? { get }
-
Declaration
Swift
@objc public private(set) var allResponseFields: [AnyHashable : Any] { get }
-
Declaration
Swift
@objc public var stripeID: String { get }
-
Declaration
Swift
@objc public class func decodedObject(fromAPIResponse response: [AnyHashable : Any]?) -> `Self`?