legiblenews / community

Issues, discussions, and roadmaps for Legible News
11 stars 0 forks source link

Some new subscriptions show `X minutes remaining` after purchasing and being redirected to https://legiblenews.com/plus/subscription #11

Closed bradgessler closed 2 years ago

bradgessler commented 2 years ago

When some people subscribe to Legible News, after the Stripe checkout session they're sent back to https://legiblenews.com/plus/subscription and see a confusing message that their subscription will end between 10 and 0 minutes.

The cause of this bug is because I set a plus subscription to be activated for 10 minutes as a grace period before the checkout process, that way when people come back they have an active subscription.

Swap that grace period out with Stripe's CHECKOUT_SESSION_ID variable, documented at https://stripe.com/docs/payments/checkout/custom-success-page.

What cause this bug? My own ignorance in Stripe's Checkout API. The fix above should eliminate the need for a grace period.

bradgessler commented 2 years ago

This issue was fixed. Now when a person subscribes a grace period is NOT started, but as soon as the transaction finishes, the subscription or trail is started. To the end user, they don't see the weird "your trail will expire in 8 minutes". It looks just as it should, yay!