#kiwi_webhooks

1 messages ¡ Page 1 of 1 (latest)

rich auroraBOT
#

👋 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.

gray wharf
#

hi there!

#

I know nothing about kafka. but I can help with any questions related to Stripe webhooks

#

what's your question exactly?

opaque turtle
#

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?

gray wharf
#

which events are you listening to exactly?

opaque turtle
#

checkout.session.completed
entitlements.active_entitlement_summary.updated

#

and maybe checkout.session.expired (not sure if I need that tbh)

gray wharf
#

entitlements.active_entitlement_summary.updated
don't think they have a Customer associated with it

opaque turtle
#

yes, so I can rely on the fact that these events should always contain a customer: cus_... part?

gray wharf
#

and maybe checkout.session.expired
this will contain a Checkout Session payload, so same as checkout.session.completed

opaque turtle
#

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"
}
]
}
}
}

gray wharf
#

yes, so I can rely on the fact that these events should always contain a customer: cus_... part?
if you set the customer property when creating the Checkout Session, then yes! but might be simpler to parse the payload as json and just do data.customer