#morteza-tp-1990_api

1 messages ยท Page 1 of 1 (latest)

brave sandBOT
#

๐Ÿ‘‹ 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.

olive vector
#

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

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods and redirects.

tired remnant
#

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

olive vector
tired remnant
#

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 ???

olive vector
#

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

tired remnant
#

I guess error codes happen in API calls right ???

olive vector
#

correct

tired remnant
#

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

olive vector
#

| To distinguish these categories or get more information about how to respond, consult the error code, decline code, and charge outcome

brave sandBOT
late lion
#

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)

tired remnant
#

no by network i mean Visa, Master, etc. networks

late lion
#

Ah, perfect, then what my teammate says stands!

tired remnant
#

where can I find all the possible error codes denton said both error codes list and decline code list are non-exhaustive

late lion
#

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.

tired remnant
#

we have some errors that can;t find their decline codes no where on stripe docs

late lion
#

Not all errors have decline codes

tired remnant
#

like live_mode_test_card i

late lion
#

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

tired remnant
#

pi_3SNEaYLmjdnG8GX006WS6HbR

#

can you check this payment intent for me

#

what you can see from this payment intent

late lion
#

Ah, yeah, decline_code is populated

tired remnant
#

but can't find that decline_code!!

late lion
#

I don't understand, you know that decline code exists, add it to your list?

tired remnant
#

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 ?

late lion
#

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.

tired remnant
#

yeah exactly

#

what's normal ? showing decline code to the user ?

late lion
tired remnant
#

or showing message in last_payemtn_error ?

late lion
tired remnant
#

ok

#

thank you for your help

late lion
#

Any time!