How to deal with subscription payment fail from stripe

I am getting this error when user is subscribed in live mode. Customer is created but not charged for subscription. How can I deal with this issue.

Kindly Help

Its clearly stating that the payment method is not being attached with customer, thus not charging it.

what i do, i create a checkout page for customer, and it will automatically do it , charge the customer with the payment method customer give and then save it and attached it with customer for future transection.|

Can use this to setup customer, and attach a payment method.

and you can also use this to charge the customer.

but you do need to use webhook after the checkout is completed, save the things form backend which you want to save like cus id,

I am also doing the same when user is signed up I attach the card to the customer. How can I send email if user’s payment is failed?

when a payment faild happen, you can get a webhook about the faild payment, form there you can determine the customer and inform him, and aslo stop any services to him.

you need to setup the webhook. i hope you know how to do it, its pretty simple create a webhook make it in detect data, goto strip add it there with correct event on which you want strip to call you webhook,

make the senario so that strip call your webhook and bubble know the payload type , and that set.

I am already using webhook what for subscription payment failed I don’t know which event I should use. :neutral_face:

Do a google , there are lot of them, and also try to use Discord, stripe have a very vibrat discord help channel you ask there, but be mindfull to other else, they will block you and you event can’t ask why :smiley:

I got this Using webhooks with subscriptions | Stripe Documentation but I am not getting how to use this, how can I initialize the webhook when payment fails.

Look brother, the error is saying the customer does not have a payment method attach, that can be in your call you are sending a wrong method any maybe some thign else.

Now come to you question, how can you notify the customer about payment is not being made, (Failling)

Number 1: it not any use to us, because you can use it only when the invoice is automaticly being create on month eand and you need to inform user about it.
Number 2: this is when invoice is not finalized, you use this to get notified.

Number 3: can also use this i advice to use this before using the 2nd one.

Number 4: we dont need this, this is will triger every time , when invoice created or updated or even its paid, it will be trigger. you only use this when you are tracking the invice each stage.

Now, i dont know the exact senario you are using invoice on stripe, i suggest use subscription without creating an invoice.

I am also trying the 3rd event, but how i can initialize this event

This is what happened in stripe

Hey, sorry for lat reply, but when you make the webhook, and get the data in bubble, You need to remove Initialize form webhook url

Actually initializing is the process of tell bubbling what type of json he will be expecting when the other platform( strip ) call his workflow we need to tell him what type of json payload he should expect.

for this we can either manully type it, or we click detect data, and let bubble detect the payload, by making sure the other system(stripe) call the webhook.

we can do this by creating the senario for strip to trigger the event, like intentionaly failing an invoice.

1 Like