1. Register a User : User email, id , password, and type will be saved in application db
2. User will be redirected to login screen, and submit login
3. As he is ‘free-trail’ type, he will be asked to click Subscripe button through account page
4. Once he purchased subscription through Card Pay, Stripe will return response including tokenId
5. From the Stripe subscription’s callback function server going to update a user table. It will update “stripeId” with stripe tokenId and user type will be changed from default (‘free-trail’) to ‘paid’
6.User will be redirected to Paid-User screen from Account screen
{
"id": "tok_1Hol4fDHIfzRDTEXZkHfgon8",
"object": "token",
"card": {
"id": "card_1Hol4fDHIfzRDTEXSkyD12Ef",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "American Express",
"country": "US",
"cvc_check": "unchecked",
"dynamic_last4": null,
"exp_month": 2,
"exp_year": 2023,
"funding": "credit",
"last4": "0005",
"name": "m***25@gmail.com",
"tokenization_method": null
},
"client_ip": "210.18.179.188",
"created": 1605684449,
"email": "m***25@gmail.com",
"livemode": false,
"type": "card",
"used": false
}