I am going to use Stripe to do payment process. Based on the documentation I come up with the following thoughts and some doubts regarding the free payment option.
I decided to use the DotNet API and checkout.js in my application.
Here is my understanding,
- I can manually create a plan from Stripe dashboard
- In UI, I can make use of "checkout.stripe.com/v2/checkout.js" to fetch the card information and payment, once stripe succeeded in fetching the payment, automatically call the server with a token and EmailID
In server side,
3.1) Create the customer with stripe token (StripeCustomerService)
3.2) Create subscription with customer id & plan Id (StripeSubscriptionService) => Expecting payment will automatically handle at this stage based on the plan I already created from Stripe dashboard.
I can activate the feature from my side.
Stripe will automatically send email to the customer in each payment date and will send webhooks events based on that(How the email template will look like?)
I can listen to the webhooks to activate/deactivate feature.
I selected following events(might be I'll be missed some other events)
For to De-activate
charge.refunded
charge.failed
charge.dispute.created
customer.subscription.deleted
invoice.payment_failed
For to Activate
charge.succeeded
invoice.payment_succeeded
Please correct me if my understanding is wrong (or) I have to consider something more.
Now I am confused about providing free plans.
Regarding free plan,
1) How can I do the free plan with stripe without taking the card info for the first time?
2) Do I have to use checkout.js at this stage?
3) What events I have to take care of free plans? Saw "customer.subscription.trial_will_end" event and document say, it occurs 3 days before expire, but what event will occur on the day the trial ends?