#kiwi_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260933497342791733
đ Have more to share? Add details, code, screenshots, videos, etc. below.
hi there!
I know nothing about kafka. but I can help with any questions related to Stripe webhooks
what's your question exactly?
Hi! Yes that's the important part
If I only plan on ingesting events that are related to customers
Is it a good idea to extract the customer id with a string regex
or are there events for customers that might not include the customer id.. for some reason?
which events are you listening to exactly?
checkout.session.completed
entitlements.active_entitlement_summary.updated
and maybe checkout.session.expired (not sure if I need that tbh)
checkout.session.completed
here the payload will contain a Checkout Session object. assuming it has an associated Customer, then you'll find it here: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-customer
entitlements.active_entitlement_summary.updated
don't think they have a Customer associated with it
yes, so I can rely on the fact that these events should always contain a customer: cus_... part?
and maybe checkout.session.expired
this will contain a Checkout Session payload, so same ascheckout.session.completed
this is how an entitlement update event looks like:
{
"object": {
"object": "entitlements.active_entitlement_summary",
"customer": "cus_QGi1Yxgrb9beOv",
"entitlements": {
"object": "list",
"data": [
],
"has_more": false,
"url": "/v1/customer/cus_QGi1Yxgrb9beOv/entitlements"
},
"livemode": false
},
"previous_attributes": {
"entitlements": {
"data": [
{
"id": "ent_test_61QZYmDbjnUZBRoOi41P8ZmTfPdBzKm8",
"object": "entitlements.active_entitlement",
"feature": "feat_test_61QYCpck2IhlWzgdL41P8ZmTfPdBzN8S",
"livemode": false,
"lookup_key": "branded-calls"
}
]
}
}
}
yes, so I can rely on the fact that these events should always contain a customer: cus_... part?
if you set thecustomerproperty when creating the Checkout Session, then yes! but might be simpler to parse the payload as json and just dodata.customer