#meteograms-checkout

1 messages · Page 1 of 1 (latest)

primal tundra
hidden prawn
#

Or a one-off fee charged up front, but refunded automatically if customer cancels during the trial, would be fine too.... that would only be possible by responding to a cancellation webhook?

primal tundra
#

Hello! Let me try a couple things out

#

So what you described initially would work - you listen for checkout.session.completed and from there you can update the subscription and set add_invoice_items for the one-off price you want to add after the trial. The only thing you'll have to be careful of is that if the customer cancels you delete the invoice items that were generated (https://stripe.com/docs/api/invoiceitems/delete)

hidden prawn
#

OK, gotcha, thanks.

#

When the customer cancels, I will get a generic customer.subscription.updated webhook call, and I check status is set to canceled? Is that it, or is there a more specific event type for "subscription cancelled"?

primal tundra
#

You'll get a customer.subscription.deleted event when a subscription has ended/been cancelled