also looking at this
feat(billing): issue the license from Stripe, not only from the thank-you page
#49
9 files
+439
-2
| @@ -1,4 +1,5 @@ | ||
| 1 | 1 | import type { SaasConfig } from '@stacksjs/types' |
| 2 | import process from 'node:process' | |
| 2 | 3 | import { PLANS, PRODUCT_NAME, SIX_MONTHS_FREE } from '../app/Billing/plans' |
| 3 | 4 | |
| 4 | 5 | /** |
| @@ -27,9 +28,12 @@ export default { | ||
| 27 | 28 | }, |
| 28 | 29 | }, |
| 29 | 30 | ], |
| 31 | // Where Stripe sends what happened. `STRIPE_WEBHOOK_SECRET` is the signing | |
| 32 | // secret Stripe shows when the endpoint is created; without it the endpoint | |
| 33 | // verifies nothing and refuses every delivery, which is the safe direction. | |
| 30 | 34 | webhook: { |
| 31 | endpoint: 'your-webhook-endpoint', | |
| 32 | secret: 'your-webhook-secret', | |
| 35 | endpoint: '/api/billing/webhook', | |
| 36 | secret: process.env.STRIPE_WEBHOOK_SECRET ?? '', | |
| 33 | 37 | }, |
| 34 | 38 | currencies: ['usd'], |
| 35 | 39 | // Six months of Monthly, free: 100% off six monthly invoices. The code is |