April 2020
Intermediate to advanced
716 pages
18h 55m
English
Once the Stripe account has been connected, to complete the OAuth process, we need to make a POST API call to Stripe OAuth from our server. We need to send the previously retrieved auth code to Stripe OAuth with the POST API call and receive the credentials to be stored in the seller's user account for processing charges. We will achieve this Stripe auth update by implementing an update API in the backend. This Stripe auth update API will receive a PUT request at /api/stripe_auth/:userId and initiate the POST API call to retrieve the credentials from Stripe.
The route for this Stripe auth update API will be declared on the server in user routes, as follows.
mern-marketplace/server/routes/user.routes.js:
router.route('/api/stripe_auth/:userId') ...Read now
Unlock full access