#somebodysysop_api
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/1225324415005229127
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you share what you are trying to achieve? Are you looking for the successful invoice payment of the recurring cycle?
I have a webhook that receives the Stripe events. I have a Drupal website, and what I want to do is create/update account info on my site when successful subscription payment comes in. To do this, I need cust email address, cust id (stripe), product id (stripe) and amount paid. On initial subscription, I get all the events at the same time where I can get this info. On recurring subscriptions, the customer.subscription.updated event arrives immediately, followed by the payment_intend.succeeded and customer.updated events an hour later. My question really boils down to: how can I retrieve the cust email address and invoice amt paid when I only have the customer.subscription.updated event?
payment_intent.succeeded has the information I need, but it is arriving an hour after customer.subscription.updated.
You shouldn't use customer.subscription.updated event to check if the recurring payment was made successful. invoice.paid event should be used: https://docs.stripe.com/billing/subscriptions/webhooks#active-subscriptions
invoice.paid event contains:
- customer ID
- customer email
- product ID
- amount paid
Here's an example invoice.paid event: https://dashboard.stripe.com/test/events/evt_1P1ikPJRE4EJdR2wS3U8Cw2b
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Perfect. But that event is not sent on my recurring subscription payments.
Your webhook endpoint didn't subscribe to invoice.paid event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
got it. How do I add invoice.paid to that endpoint?
On the top right corner of the Webhook endpoint page, there is a three dots (...). Click on it and > Choose "Update details" > Then add invoice.paid event to "Events to send" list
OK, done. This recurring transaction is processed daily, so hopefully I'll see invoice.paid on tomorrow's run. Thank you so very much!
I'd recommend using Test Clock https://docs.stripe.com/billing/testing/test-clocks for billing integration in test mode, so that you don't have to wait for the time to pass