Billing Integration Template
A template for integrating a payment provider (Stripe, Paddle) with subscription management, webhook handling, plan upgrades/downgrades, and billing portal access.
Template Preview
Copy and use in your projectIntegrate [Payment Provider] for subscription billing
As a user who wants to upgrade to a paid plan, I want a smooth checkout experience with clear pricing so that I can unlock premium features and manage my subscription easily.
Description
Acceptance Criteria
Given I am on the free plan and click 'Upgrade to Pro'
When I complete the checkout flow with the payment provider
Then my account is upgraded to Pro within 30 seconds, premium features are unlocked, and I receive a confirmation email
Given my subscription renews or a payment event occurs
When the payment provider sends a webhook
Then the webhook signature is verified using HMAC and the subscription status in our database is updated accordingly
Given a payment fails for my subscription
When the payment provider notifies us via webhook
Then my account enters a grace period with a banner prompting me to update my payment method before features are restricted
Given I want to manage my subscription (cancel, update card, view invoices)
When I click 'Manage Billing' in my account settings
Then I am redirected to the payment provider's customer portal where I can make changes
Given I attempt to use a Pro-only feature on the free plan
When the feature gate check runs
Then I see an upgrade prompt with the feature's value proposition and a direct link to the checkout page
Import directly into Codepylot
Skip the copy-paste. Codepylot has built-in templates you can use with one click, plus AI that generates even richer stories from your ideas.
Try Codepylot Free