#andrew-samir_webhooks
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/1268146886255054931
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! it's in the checkout.session.completed event. https://stripe.com/docs/payments/checkout/fulfill-orders
so there is no realted field i can handle it from the customer.subscription.created event ?
to be clear, you're asking about a Subsctription that gets created from a PaymentLink https://docs.stripe.com/payment-links ?
yes
then the normal/recommended integration is you listen to the Checkout-related events https://stripe.com/docs/payments/checkout/fulfill-orders and that's how your system would know and react to a new Subscription being created(you can access the object via session->subscription while handling the event).
Mmmmm the problem is the project is implemented to handle the subscription ... by customer.subscription.created event ..... but as i got you i cant access the custom field from this event
so do i need to make a new event to only handle accessing this field ?
not sure what you mean by "make a new event". Generally, you're writing code to handle different event types, and you configure an endpoint in your Stripe Dashboard to recieve certain webhook events; you'd set up that system to recieve the checkout.session.completed event and write your code to handle that event.
for completeness, the other way to handle this is to call https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-subscription to find the CheckoutSession related to a certain Subscription ID if that's what you have, and then you can get the values of the custom fields from the CheckoutSession that way.
Just usually it's easier to handle the Checkout-related webhook event directly