The stripe SDK repo is a pretty good resource for this sort of question:
https://github.com/stripe/stripe-ios/blob/master/Stripe/STPCardParams.m
You can set the zipcode with the addressZip
field as in:
public func submitForm(cardHolderName: String, ccNumber: String, securityCode: String, expirationDate: String, zipcode: String) {
let stripeCard = STPCardParams()
let expirationDateSplit = expirationDate.componentsSeparatedByString("/")
let expMonth = UInt(Int(expirationDateSplit[0])!)
let expYear = UInt(Int(expirationDateSplit[1])!)
stripeCard.number = ccNumber
stripeCard.cvc = securityCode
stripeCard.expMonth = expMonth
stripeCard.expYear = expYear
stripeCard.addressZip = zipcode
STPAPIClient.sharedClient().createTokenWithCard(stripeCard) { (token:STPToken?, error:NSError?) -> Void in
if let err = error {
self.handleError(err)
} else if let toke = token {
self.sendTokenToBackend(toke)
}
}
}