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

fix(firestore-stripe-payments): trial_period_days #604

Closed
wants to merge 1 commit into from

Conversation

LimarenkoDenis
Copy link

@LimarenkoDenis LimarenkoDenis commented Jan 23, 2024

@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
All committers have signed the CLA.

@LimarenkoDenis LimarenkoDenis changed the title add trial_period_days fix(firestore-stripe-payments): trial_period_days Jan 23, 2024
@LimarenkoDenis
Copy link
Author

@pr-Mais Could you take a look, please

@pr-Mais
Copy link
Member

pr-Mais commented Jan 23, 2024

Thanks for your contribution @LimarenkoDenis! Can you update the tests as well?

@LimarenkoDenis
Copy link
Author

@pr-Mais Looks like pipeline is failing even in typo fix change - #597

Sorry, I'm not able to update tests here

Do you mind merging these changes and updating the Firebase extension?

@manfredleka
Copy link

Hi,
I tried implementing this workaround manually.
As is, I got an error when trying to create a checkout session that I couldn't define both trial_from_plan and trial_period_days
Even setting trial_from_plan to false didn't work, which still makes sense with the error i got

When deleting trial_from_plan, adding the trial_period_days parameter and changing the code as follows :

if (mode === 'subscription') {
          sessionCreateParams.payment_method_collection =
            payment_method_collection;
          sessionCreateParams.subscription_data = {
            trial_period_days: trial_period_days,
            metadata,
          }; 

I got a working redirection to a stripe checkout page recognizing the 7 day trial period i asked for

Hope this helps

@jauntybrain
Copy link
Contributor

Closing this in favor of #605.

@jauntybrain jauntybrain closed this Feb 5, 2024
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.

5 participants