Payment fails when payment method is ApplePay using mastercard card.
Make ApplePay test payment using mastercard. Cards details can be found in ApplePay test page. E.g.
FPAN: 5204 2477 5000 1471
Expiration Date: 11/2022
CVC: 111
12.2
Carthage
v16.0.0
Creation of payment method for generated ApplePay token (using mastercard 5204 2477 5000 1471) fails. https://api.stripe.com/v1/tokens returns an error:
{
"error": {
"code": "invalid_expiry_month",
"doc_url": "https://stripe.com/docs/error-codes/invalid-expiry-month",
"message": "Your card's expiration month is invalid.",
"param": "exp_month",
"type": "card_error"
}
}
raw error in Xcode debugger calling func createPaymentMethod(with payment: PKPayment, completion: @escaping STPPaymentMethodCompletionBlock):
Error Domain=com.stripe.lib Code=70 "Your card's expiration month is invalid" UserInfo={com.stripe.lib:ErrorMessageKey=Your card's expiration month is invalid., com.stripe.lib:StripeErrorCodeKey=invalid_expiry_month, com.stripe.lib:StripeErrorTypeKey=card_error, com.stripe.lib:CardErrorCodeKey=com.stripe.lib:InvalidExpiryMonth, com.stripe.lib:ErrorParameterKey=expMonth, NSLocalizedDescription=Your card's expiration month is invalid}
which is weird because exp month is valid (11).
Same card works fine with Adyen payment system.
VISA cards work fine.
If extra info needed let me know.
EDIT
AMEX card also throws the same error.
@treatwell-ignasurbonas thanks for the report and sorry you're hitting this issue! We're investigating this internally now. I'll let you know if there's any more information we need
Hi guys, I have this issue with the same card in apple business chat. It will be awesome if someone tells how to fix this. Thanks
Hello. I have the same issue with this card when I try to create payment token. What is the reason of issue and how to fix it?
@csabol-stripe any news about resolving this issue? Not able to pay with ApplePay (mastercard or amex) is a blocking factor for our release. We cannot complete migration to stripe. Any updates about this issue will be appreciated.
These sandbox cards are returning a payment token with an expiration date of July 2019. We鈥檙e working to have the cards fixed, and hope to have an update soon.
Is there an update on this. I'm still getting the error.
We're still working with our partners to get these cards updated. I'm incredibly sorry at how long this is taking, but we don't have any control over the sandbox cards.
In the meantime, I'd recommend testing with a test mode API Key and a real Apple Pay card. This generally isn't a supported flow, but it should allow you to test your integration without needing to make live charges.
@davidme-stripe , if these card numbers are provided by Apple, who are these partners and how can they help? Sorry, just want to understand the flow here.
The sandbox cards appear to have been updated, though you may need to remove and re-add the card in Apple Pay to get it working. I just tested the one ending in 1488, and it returned an expiration date of 9/2022.
Most helpful comment
These sandbox cards are returning a payment token with an expiration date of July 2019. We鈥檙e working to have the cards fixed, and hope to have an update soon.