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

[12.x] Allow Stripe dashboard subscriptions #1058

Merged
merged 3 commits into from
Feb 9, 2021

Conversation

driesvints
Copy link
Member

Allows subscriptions to be created from the Stripe dashboard. The newSubscriptionName allows users to configure a different default key when overriding the WebhookController.

The only limitation with this PR is that it won't work in situations where you have more than one type of subscription and need to differentiate between the names.

@LukeTowers
Copy link

@driesvints is there anything preventing the newSubscriptionName() method from evaluating the payload to identify the products / prices in the subscription provided by stripe and using an internal mapping of that to dynamically return a subscription name for Cashier to use?

@driesvints
Copy link
Member Author

@LukeTowers heya. Not really. Once you have the payload you can do whatever you want with it I think.

@LukeTowers
Copy link

@driesvints awesome, thanks! I thought that would be the case, was just asking because of your extra note in the original PR:

The only limitation with this PR is that it won't work in situations where you have more than one type of subscription and need to differentiate between the names.

@driesvints
Copy link
Member Author

@LukeTowers ah yeah sorry. In case you have multiple subscription types, for example, a tennis and a gym subscription, you can't derive the name from the subscription alone because there's no way to set metadata when subscribing a user from the dashboard. But you could indeed derive it from the prices like you said, that's a good shout.

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

Successfully merging this pull request may close these issues.

3 participants