#niraj-p_error
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/1471731824366583902
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
That's the decline response from issuer bank. It's a normal thing
If you want to reproduce, we have some testing card for decline
Yes i want to generate same error with code and message on my machine so provide me decline card.
Because from stripe i have get the message for this error
payment_method_not_available
Here you go: https://docs.stripe.com/testing#declined-payments
For this error code payment_method_not_available
which specific card use?
Can you share the real PI with that error? pi_xxx
Sorry i don't have PI because this error are facing customers and this error inform by stripe so i'm still try to generate this but it is not generated from my end.
Stripe message
Um sorry I think we may don't have the exact decline card to provide you that error code. Please treat it as any possible incoming error message for testing. It should behave the same to the generic decline card on the Doc above
No this is not same.
According to error docs this error are different so i want to produce this error because multiple customer are faced.
https://docs.stripe.com/error-codes#payment-method-not-available
Yes the error code is specifically payment_method_not_available, I understand. But it would be the same shape as any error on the that table. How are you handling errors btw?
We are handling error like using try-catch block and this stripe element errors verify from our logic it is from stripe or not and also add this error logs in track js.
I mean you are also unable to generate this same error?
Sorry I have trouble understanding you. Are you saying that you are catching error from frontend?
Yes absolutely this error getting on fronted side in payment element when customer made payments.
Ok so if you use the pm_card_visa_chargeDeclined card, what error message do you receive?
{
"message": "Your card has been declined.",
"__error": {},
"code": "paymentFailed",
"paymentFailed": {
"declineCode": "generic_decline"
}
}
And how does this response look like exactly when you had payment_method_not_available ?
{ "message": "An error occurred while processing your payment. Try again in a little bit or try a different payment method.",
"__error": {},
"code": "paymentFailed",
"paymentFailed": {
"declineCode": "payment_method_not_available"
}
Alright, so the declineCode would be different from payment_method_not_available to generic_decline. How would you handle them differently then?
Checking declineCode then branching?
I don't handle specific error. My simple concern is how to generate this same error on my checkout or stripe payment element because if this issue simple error then it is okay other wise this is from my side so i want to handle this error.
if this issue simple error then it is okay other wise this is from my side so i want to handle this error.
Sorry don't follow this part. Unfortunately no it's not possible to generate this exact error, but you should handle it as any other "decline" error asgeneric_declineabove
So how to handle this error and what can i do for this error because this error getting from stripe payment element.
The error says the Payment Method is not available, so you want to ask the Customer to provide a different card
That means customer entered payment method invalid? Right
Yep
Is there any way can we reproduce this same error?