#morteza-tp-1990_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433446105810735216
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, that doc you linked it the most complete public doc we have on decline codes. live_mode_test_card is an internal decline from using one of Stripe's test cards in a production deployment
so I should only use the ones I shared ???
the problem is I want to customize all the errors
I asked support and they said it's an api error actually and I guess API errors are not listed in the decline codes
so how can I make sure if the error was an api error and stripe declined the card not issuer
@olive vector
you can also look at the list of payment error codes we maintain here https://docs.stripe.com/error-codes
as well as this section on how to handle errors https://docs.stripe.com/error-handling#payment-errors
card_declined The card has been declined. When a card is declined, the error returned also includes the decline_code attribute with the reason why the card was declined. To learn more, see decline codes.
we have this in the Error Codes and it says go to decline Errors page to and look for live_mode_test_card see the details but I can't find it
which one is complete ? Error Codes you sent or Decline Codes I shared ???
live_mode_test_card doesn't appear to be included on either, so I believe these are both non-exhaustive lists. I don't see a public doc that includes that code
I guess error codes happen in API calls right ???
correct
live_mode_test_card is a api error right ?
how can I know from the payment intent object that it failed because of an api error or network error
https://docs.stripe.com/error-handling#payment-errors explains this
| To distinguish these categories or get more information about how to respond, consult the error code, decline code, and charge outcome
Hi there ๐ jumping in as my teammate needs to step away. There is one thing that I want to clarify. When you say "network error" is that referring to a problem with the internet between your servers and ours that prevents the request from completing? (As opposed to an error thrown by the card networks, like Visa or Mastercard)
no by network i mean Visa, Master, etc. networks
Ah, perfect, then what my teammate says stands!
where can I find all the possible error codes denton said both error codes list and decline code list are non-exhaustive
I don't think we have an exhaustive list anywhere, though you may be able to find one if you inspect the inner workings of our strongly typed libraries. But I also don't think you should expect to be able to have an exhaustive list. We may add new ones whenever they're needed. Your code should be prepared to handle any error/decline codes that it hasn't seen before.
we have some errors that can;t find their decline codes no where on stripe docs
Not all errors have decline codes
like live_mode_test_card i
That charge wouldn't even make it to a network, so I'm not sure we would consider that a decline.
We can detect our own test cards pretty early in the flow
pi_3SNEaYLmjdnG8GX006WS6HbR
can you check this payment intent for me
what you can see from this payment intent
Ah, yeah, decline_code is populated
but can't find that decline_code!!
I don't understand, you know that decline code exists, add it to your list?
that;s exactly what we have done but we first want to make a complete list possible and after that add the ones missing later
in the outcome field of charge we have network_status as not_sent_to_network, does it mean that this is an api error ? can we suppose that ?
I don't have a better list to provide than we my teammate already provided. I suggest you build your system such that it can detect and flag errors it hasn't seen before, so they can be reviewed and added to your error handling.
No, it is not an API error, it's exactly what I was describing earlier. We didn't send that transaction to the network because we knew it was our test card.
or showing message in last_payemtn_error ?
That's up to you and the customer experience you want to build. But I suggest provided human readable error messages.
For errors you haven't seen before, you can return a generic "an unknown error has occurred, please contact us at:" kind of message
Any time!