Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decline_code in declined case is missing #1755

Closed
nguyenhuutinh opened this issue Feb 2, 2021 · 2 comments
Closed

decline_code in declined case is missing #1755

nguyenhuutinh opened this issue Feb 2, 2021 · 2 comments
Assignees
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@nguyenhuutinh
Copy link

hi team ,
according to the document, we should get the decline_code in declined case
but I debug and found there is no decline_code in error response.
Can you tell me how to get the decline_code in declined case?

Thanks
Error Domain=com.stripe.lib Code=70 "Your card was declined" UserInfo={com.stripe.lib:ErrorMessageKey=Your card was declined., com.stripe.lib:StripeErrorCodeKey=card_declined, com.stripe.lib:StripeErrorTypeKey=card_error, com.stripe.lib:CardErrorCodeKey=com.stripe.lib:CardDeclined, NSLocalizedDescription=Your card was declined})

@yuki-stripe
Copy link
Collaborator

Hi @nguyenhuutinh,

We'll get this fixed in the next release. In the mean time, if you're using PaymentIntents, you may be able to find the decline code in its lastPaymentError property

e.g.
paymentIntent.lastPaymentError.declineCode

@yuki-stripe yuki-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Feb 2, 2021
@yuki-stripe yuki-stripe self-assigned this Feb 2, 2021
@davidme-stripe
Copy link
Contributor

This should be fixed in 21.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants