{"id":1956,"date":"2020-11-19T15:27:47","date_gmt":"2020-11-19T09:57:47","guid":{"rendered":"http:\/\/uitutorials.in\/wp\/?p=1956"},"modified":"2020-11-19T15:30:44","modified_gmt":"2020-11-19T10:00:44","slug":"stripe-part-i","status":"publish","type":"post","link":"https:\/\/uitutorials.in\/wp\/stripe-part-i\/","title":{"rendered":"Stripe &#8211; Part I"},"content":{"rendered":"<p>1. Register a User  : User email, id , password, and type will be saved in application db<br \/>\n2. User will be redirected to login screen, and submit login<br \/>\n3. As he is &#8216;free-trail&#8217; type, he will be asked to click Subscripe button through account page<br \/>\n4. Once he purchased subscription through Card Pay, Stripe will return response including tokenId<br \/>\n5. From the Stripe subscription&#8217;s callback function server going to update a user table. It will update &#8220;stripeId&#8221; with  stripe tokenId and user type will be changed from default (&#8216;free-trail&#8217;) to &#8216;paid&#8217;<br \/>\n6.User will be redirected to Paid-User screen from Account screen<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId.png\" alt=\"\" width=\"1897\" height=\"919\" class=\"alignnone size-full wp-image-1960\" srcset=\"https:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId.png 1897w, https:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId-300x145.png 300w, https:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId-768x372.png 768w, https:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId-1024x496.png 1024w, https:\/\/uitutorials.in\/wp\/wp-content\/uploads\/2020\/11\/Stripe_01_PlanId-1170x567.png 1170w\" sizes=\"auto, (max-width: 1897px) 100vw, 1897px\" \/><\/p>\n<pre class=\"line-numbers\"><code class=\"language-javascript\">\r\n{\r\n  \"id\": \"tok_1Hol4fDHIfzRDTEXZkHfgon8\",\r\n  \"object\": \"token\",\r\n  \"card\": {\r\n    \"id\": \"card_1Hol4fDHIfzRDTEXSkyD12Ef\",\r\n    \"object\": \"card\",\r\n    \"address_city\": null,\r\n    \"address_country\": null,\r\n    \"address_line1\": null,\r\n    \"address_line1_check\": null,\r\n    \"address_line2\": null,\r\n    \"address_state\": null,\r\n    \"address_zip\": null,\r\n    \"address_zip_check\": null,\r\n    \"brand\": \"American Express\",\r\n    \"country\": \"US\",\r\n    \"cvc_check\": \"unchecked\",\r\n    \"dynamic_last4\": null,\r\n    \"exp_month\": 2,\r\n    \"exp_year\": 2023,\r\n    \"funding\": \"credit\",\r\n    \"last4\": \"0005\",\r\n    \"name\": \"m***25@gmail.com\",\r\n    \"tokenization_method\": null\r\n  },\r\n  \"client_ip\": \"210.18.179.188\",\r\n  \"created\": 1605684449,\r\n  \"email\": \"m***25@gmail.com\",\r\n  \"livemode\": false,\r\n  \"type\": \"card\",\r\n  \"used\": false\r\n}\r\n<\/code><\/pre>\n<h3>Reference URL  : <\/h3>\n<p><a href=\"https:\/\/dashboard.stripe.com\/login\" rel=\"noopener\" target=\"_blank\">Stripe Login<\/a><br \/>\n<a href=\"https:\/\/stripe.com\/docs\/api\/products\/create\" rel=\"noopener\" target=\"_blank\">Create Product<\/a><br \/>\n<a href=\"https:\/\/stripe.com\/docs\/billing\/subscriptions\/overview\" rel=\"noopener\" target=\"_blank\">Subscription<\/a><br \/>\n<a href=\"https:\/\/stripe.com\/docs\/testing#cards\" rel=\"noopener\" target=\"_blank\">Test Card<\/a><br \/>\n<a href=\"https:\/\/stripe.com\/docs\/api\/subscriptions\" rel=\"noopener\" target=\"_blank\">API Docs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8216;free-trail&#8217; type, he will be asked to click Subscripe button through account page 4. Once he purchased<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[127],"class_list":["post-1956","post","type-post","status-publish","format-standard","hentry","category-nodejs","tag-stripe","ct-col-2"],"_links":{"self":[{"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/posts\/1956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/comments?post=1956"}],"version-history":[{"count":4,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/posts\/1956\/revisions"}],"predecessor-version":[{"id":1958,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/posts\/1956\/revisions\/1958"}],"wp:attachment":[{"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/media?parent=1956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/categories?post=1956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uitutorials.in\/wp\/wp-json\/wp\/v2\/tags?post=1956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}