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 pausing a subscription when trial ends without a payment method #623

Open
krishsatya opened this issue May 3, 2024 · 0 comments

Comments

@krishsatya
Copy link

Feature request

  • Extension name: firestore-stripe-payments

Is your feature request related to a problem? Please describe.

I want to offer users the option to go through checkout without a payment option, which is already supported with payment_method_collection: "if_required". However, if their trial ends and they haven't provided a payment method, I'd like the subscription to be paused instead of cancelled.

Describe the solution you'd like

I believe the solution is to include the below map into subscription_data, similar to what's being done for trial_period_days. Could be as simple as exposing a field called trial_end_behavior that takes a string and defaults to "cancel".

trial_settings: {
  end_behavior: {
    missing_payment_method: "paused",
  },
}

Describe alternatives you've considered

I suppose I could wait for the subscription object to get created and then modify it after checkout. Not ideal though.

Additional context

n/a

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

No branches or pull requests

1 participant