Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Embeddable Pricing Tables #1622

Open
scalaxofaiur opened this issue Dec 19, 2023 · 4 comments
Open

Add support for Embeddable Pricing Tables #1622

scalaxofaiur opened this issue Dec 19, 2023 · 4 comments

Comments

@scalaxofaiur
Copy link

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

@driesvints
Copy link
Member

Please see #1590

@driesvints
Copy link
Member

Ah sorry that's something else. I'll have a look.

@driesvints
Copy link
Member

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

@scalaxofaiur
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants