Flesh out payment stuff
This commit is contained in:
parent
b0dcdd6438
commit
acfed861ab
27 changed files with 938 additions and 173 deletions
|
|
@ -230,12 +230,16 @@ STRIPE_PRICE_ID_YEARLY=price_... # Yearly subscription price ID
|
|||
3. **Configure Webhook**:
|
||||
- Go to [Developers > Webhooks](https://dashboard.stripe.com/webhooks)
|
||||
- Add endpoint: `https://your-domain.com/api/payments/webhook`
|
||||
- Select events:
|
||||
- `checkout.session.completed`
|
||||
- `customer.subscription.updated`
|
||||
- `customer.subscription.deleted`
|
||||
- `invoice.paid`
|
||||
- `invoice.payment_failed`
|
||||
- Select events:
|
||||
- `checkout.session.completed`
|
||||
- `customer.subscription.updated`
|
||||
- `customer.subscription.deleted`
|
||||
- `invoice.paid`
|
||||
- `invoice.payment_failed`
|
||||
- `refund.created`
|
||||
- `refund.updated`
|
||||
- `refund.failed`
|
||||
- `charge.refunded`
|
||||
- Copy the Signing Secret (starts with `whsec_`)
|
||||
|
||||
4. **Test with Stripe CLI** (optional, for local development):
|
||||
|
|
@ -243,6 +247,11 @@ STRIPE_PRICE_ID_YEARLY=price_... # Yearly subscription price ID
|
|||
stripe listen --forward-to localhost:3001/api/payments/webhook
|
||||
```
|
||||
|
||||
#### Refund Policy Notes
|
||||
|
||||
- Stripe does not enforce refund timing. The “7-day money-back guarantee” is a product policy.
|
||||
- Use the refund events above to keep payment records in sync when refunds happen.
|
||||
|
||||
## Docker Compose Files
|
||||
|
||||
The project includes pre-configured compose files:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue