STPPaymentMethodCardParams
@interface STPPaymentMethodCardParams : NSObject <STPFormEncodable>
The user’s card details.
-
A convenience initializer for creating a payment method from a card source. This should be used to help with migrations to Payment Methods from Sources.
Declaration
Objective-C
- (nonnull instancetype)initWithCardSourceParams: (nonnull STPCardParams *)cardSourceParams;
Swift
init(cardSourceParams: STPCardParams)
-
The card number, as a string without any separators. Ex. @“4242424242424242”
Declaration
Objective-C
@property (nonatomic, copy, readwrite, nullable) NSString *number;
Swift
var number: String? { get set }
-
Two-digit number representing the card’s expiration month.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, nullable) NSNumber *expMonth;
Swift
var expMonth: NSNumber? { get set }
-
Two- or four-digit number representing the card’s expiration year.
Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, nullable) NSNumber *expYear;
Swift
var expYear: NSNumber? { get set }
-
For backwards compatibility, you can alternatively set this as a Stripe token (e.g., for apple pay)
Declaration
Objective-C
@property (nonatomic, copy, readwrite, nullable) NSString *token;
Swift
var token: String? { get set }
-
Card security code. It is highly recommended to always include this value.
Declaration
Objective-C
@property (nonatomic, copy, readwrite, nullable) NSString *cvc;
Swift
var cvc: String? { get set }