Skip to content

Instantly share code, notes, and snippets.

@JaneJeon
Last active April 5, 2019 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JaneJeon/78f32714af6f620dac660e3e676cf230 to your computer and use it in GitHub Desktop.
Save JaneJeon/78f32714af6f620dac660e3e676cf230 to your computer and use it in GitHub Desktop.
Stripe authorize
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