#theryanmark

1 messages · Page 1 of 1 (latest)

ripe vortexBOT
dry willow
#

Nope

tall elk
#

cool. and when the checkout.session events hit the webhook i assume it passes an id. is it the Checkout Session object id or payment_intent? i am trying to determine what to store in my DB to know which payment is being communicated about.

dry willow
#

Which contains a lot of info (including both payment intent id and checkout session id)

tall elk
#

ok cool. I just notices in test mode that the payment_intent was null. but if the whole object gets passed that allows me flexibility. I guess i could set a client_reference_id as well.

dry willow
#

payment intent will be null if it's a subscription payment

#

otherwise should be populated

tall elk
#

Oh. that makes sense I just changed that. does stripe handle any email notification when future subscription payments execute? or would i need to handle that on my end with webhooks?

dry willow
#

Do you want the customer to get an email, or you as the account holder want to get the email?

tall elk
#

the customer

dry willow
tall elk
#

awesome. thank you.

one last thing (I think) can my customer cancel their subscription through Stripe or do I need to develop an in app implementation of this?

dry willow
#

it's the stripe-hosted portal to manage their invoices/subscriptions

tall elk
#

ok great. thank you. I really appreciate that there is a dev discord. You guys have made it really simple to get support!

dry willow
#

Of course!

tall elk
#

how would you suggest handling different types of payments?

For example I have an account subscription to be a paid user and also a merch store. what is best practice for sorting through different session events?

dry willow
#

You're going to be using checkout.session.completed and want to differentiate between subscription events and one-time events?

tall elk
#

i guess i could pass a reference into client_reference_id also?

dry willow
#

will be payment for 1-time payments

#

will be subscription for subscription payments

tall elk
#

got it. ok thanks a bunch for the clarifications. you just got a brain dump from my thoughts over the last few days. I really appreciate your patience.

dry willow
#

No problem

#

One thing to note if you're using checkout.session.completed events is depending on the payment method type, that won't necessarily mean payment has succeeded

#

If you accept any of: Bacs Direct Debit, Bank transfers, Boleto, Canadian pre-authorized debits, Konbini, OXXO, SEPA Direct Debit, SOFORT, or ACH Direct Debit. then you'll need to listen to additional events

tall elk
#

yup. already on that. i want to listen for the checkout.session.async_payment_failed and checkout.session.async_payment_succeeded. So if I am only accepting CC then payment is immediate and checkout.session.completed is sufficient?

dry willow
#

Yeah

tall elk
#

Awesome on my way to being a Stripe Dev Superuser!

dry willow
#

Indeed!