Ability to add promocode on payments page (#2019)

# Pull Request Checklist

## Description
- [ ] **Description of PR**: Clear and concise description of what this
PR accomplishes
- [ ] **Breaking Changes**: Document any breaking changes (if
applicable)
- [ ] **Related Issues**: Link to any related issues or tickets

## Testing
- [ ] **Test cases Attached**: All relevant test cases have been
added/updated
- [ ] **Manual Testing**: Manual testing completed for the changes

## Monitoring & Debugging
- [ ] **Logging in place**: Appropriate logging has been added for
debugging user issues
- [ ] **Sentry will be able to catch errors**: Error handling ensures
Sentry can capture and report errors
- [ ] **Avoid Dev based/Prisma logging**: No development-only or
Prisma-specific logging in production code

## Configuration
- [ ] **Env variables newly added**: Any new environment variables are
documented in .env.example file or mentioned in description
---

## Additional Notes
<!-- Add any additional context, screenshots, or notes for reviewers
here -->
This commit is contained in:
Sarthak Agarwal 2025-11-14 19:47:41 -08:00 committed by GitHub
parent 994dc7dec3
commit 2b25fb51ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,6 +56,7 @@ export async function createCheckoutSession(
mode: "subscription",
success_url: options?.successUrl || `${webappUrl}/app/billing?success=true`,
cancel_url: options?.cancelUrl || `${webappUrl}/app/billing?canceled=true`,
allow_promotion_codes: true,
metadata: {
userId,
period,