This plugin will add a video field where uploaders can choose whether the video is a premium video or not. Premium videos will only be shown for paid users, other users will see a preselected default video. To become a premium user a user has to go to My account > Premium and click "Subscribe to become a premium user". He will then be redirected to Stripe and when the checkout is complete he's a premium user.
- Stripe API key.
- Stripe webhook listening for
checkout.session.completed
,invoice.paid
andinvoice.payment_failed
. - Stripe plan whom premium users will subscribe to.
- Replacement video to be shown for non-premium users.
Support for cancel subscriptions.Remove payments from DB and get from API instead.Create checkout from API instead of static URL.Support change payment method.Listen to webhook to know when subscription has ended.- Verify paymentStatus is accurate upon GET /subscriptions
Change storage to Postgres- Store all webhook data for tracing purpose.