Closed scalaxofaiur closed 3 months ago
Ah sorry that's something else. I'll have a look.
Right now I don't see an immediate way to make this work with Cashier. We solely rely on the customer.subscription.created and/or customer.subscription.updated webhooks to create the subscription and attach it to the user. There doesn't seems to be a way to let checkout attach this client_reference_id
to the subscription as well. Therefor, from what I can tell, this isn't possible.
I don't have the time at the moment to deep dive into this to find workarounds but would appreciate PR's or other insights if there are any. Thanks
Thanks @driesvints, at the moment i decided to avoid using Embeddable Pricing Tables and have implemented one on my own by reading products data directly from Cashier facade.
Should i have more updates i will surely write them here.
Thanks.
Going to close this one as it's not likely this can be resolved.
Hello i found that Cashier currently doesn't work with Embeddable Pricing Tables
https://stripe.com/docs/payments/checkout/pricing-table
Currently, when the user creates a subscription with pricing tables, Stripe creates a new customer.
Customer.subscription.created webhook doesn't seem to be able to connect the new customer to laravel user.
Stripe gives the chance to attach a "client-reference-id" that could be used to pass the authenticated user id (or better an encrypted string that identify the user) back to cashier with checkout.session.completed webhook
https://stripe.com/docs/payments/checkout/pricing-table#track-subscriptions