Last active
April 5, 2019 00:18
-
-
Save JaneJeon/78f32714af6f620dac660e3e676cf230 to your computer and use it in GitHub Desktop.
Stripe authorize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { stringify } = require("querystring") | |
const REDIRECT_TO = `https://connect.stripe.com/express/oauth/authorize?${stringify({ | |
client_id: process.env.STRIPE_CLIENT_ID, // the frontend should have access to the stripe client id environment variable | |
"stripe_user[business_type]": "individual", | |
"stripe_user[email]": user.email, // get this from localStorage | |
"suggested_capabilities[]": "card_payments" | |
})}` | |
window.location = REDIRECT_TO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment