#pratikco
1 messages · Page 1 of 1 (latest)
Hi there! Sorry for the delay.
I'm not sure I understand your question. Can you try to give a specific example on what you are trying to do?
I want to do like Netflix every month on the same day money will get deducted, but the thing this in my website I will credit some credits to the user account after every successful monthly payment
user only checkout for once and money will deduct every month automatically by strip but i want strip to give me some confirmation programmatically so that i can also credit user account in my database
So you want to run some custom code (to add some credits to the customer) every time the customer is billed for their subscription?
yeah
So you should listen to the webhook event invoice.payment_succeeded
https://stripe.com/docs/api/events/types#event_types-invoice.payment_succeeded
And when you receive that event you run some code
so the user doesn't need to subscribe every month strip will handle this till the user cancle the subscription and strip will send on event on webhook to inform me about the payment every month
You create a Stripe subscription once, and then every month Stripe will automatically try to debit the customer. When that happens, Stripe sends you the invoice.payment_succeeded event.
To learn how to create subscription, you can check this doc: https://stripe.com/docs/billing/subscriptions/build-subscriptions
ohh ok got it thanks