#divya.shalini.ics

1 messages Β· Page 1 of 1 (latest)

carmine cryptBOT
desert ferry
#

If you use declined test card in a payment, it should trigger charge.failed event

#

Can you share the Payment Intent (pi_xxx) that you attempt to use declined test card, but doesn't have charge.failed event?

tribal storm
#

Actually I am trying to add decline test cards but not able to add any of those

#

Showing like this

desert ferry
#

Oh! I see that you're trying to setup a payment directly via Dashboard

tribal storm
#

I tried it through api also

desert ferry
#

Have you tried the test card I mentioned?

tribal storm
#

Let me try this

#

Please don't close the thread

#

Ok, These card is triggered both charge.failed and payment_intent.payment_failed. But is there any way that we can check it while payment intent is getting success?

#

For an example

#

While placing any order/payment_intent person do have balance is his card, but while closing the order/capturing the payment intent to success he doesn't have sufficient fund in his card or maybe card would get expired in that month.

#

I want to check this scenario

#

Is there any way to check this?

desert ferry
#

Once the authorisation of a payment is successful, it's not possible to have insufficient fund error as the bank has reserved the funds for payment

tribal storm
#

Oh ok

#

For any order we have these may webhook events right?

#

While creating any order from our application we are trigger below 3 webhooks

desert ferry
#

It depends on your use case. What are you trying to achieve?

tribal storm
#

And while closing any order we are tiggering below three webhooks

#

I am trying to check if in real time scenario there be any order which has been placed for future date

#

And at the time of order closing, if there be any case of charge getting failed or payment_intent getting failed then to handle those cases, how to achieve it?

desert ferry
#

To find out whether the payment has been succeeded payment_intent.succeeded event can be listened. If payment_intent.succeeded event has been sent, there shouldn't be any further payment failures since the payment has been made successfully

tribal storm
#

And in code I am calling below to capture the intent

#

Is there any card or any specific set of steps to check that?

desert ferry
#

Ah I see that you use separate auth and capture flow. When the payment is authorised successfully, payment_intent.amount_capturable_updated will be sent. Only when the payment is captured successfully, then payment_intent.succeeded will be sent.

You can use any successful test card to test above flow: https://stripe.com/docs/testing#cards

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.

tribal storm
#

I tried all the declined card, but it's not getting attached showing error of respective cards.
https://stripe.com/docs/testing#declined-payments

Also tried using below card then, while placing order only it's throwing error of charge.failed and payment_intent.payment_failed
Decline after attaching 4000000000000341 Attaching this card to a Customer object succeeds, but attempts to charge the customer fail.

That's why I am not able to achieve the scenario while closing the order

#

Is there any other way or any other cards?

desert ferry
#

I see! If you're attempting to test capture failure, I'm afraid we don't have such test card for that

tribal storm
#

Oh ok. So in that case, only live card is only option to check right?

desert ferry
#

Yup, it may happen in live mode

tribal storm
#

Ok, Thank you

#

It helped a lot

#

You guys are very helpful 😊

desert ferry
#

No problem! Happy to help πŸ˜„

tribal storm
#

Hi

#

One more thing

#

How to check balance transactions for manual payouts?

#

?

desert ferry
tribal storm
#

Is there a way to know through payout id if it is manual of automatic?

#

Because sometime it is coming from connected account some time it is coming without connected account also

#

So is there a way where I can get it in a go?

desert ferry
tribal storm
#

Oh ok

desert ferry
#

automatic: true means the payout is automatic; automatic: false for manual payout

tribal storm
#

Ok, is that.

#

Thank you so much

#

I will design my code as per the above replies.

#

It hepled me a lot ☺️