Last active
June 17, 2020 17:51
-
-
Save cjavilla-stripe/96f7b98170b2ad8685dfa67bc56d22b8 to your computer and use it in GitHub Desktop.
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 f = async () => { | |
try { | |
const res = await stripe.billingPortal.sessions.create({ | |
customer: cus, | |
return_url: 'https://pay.cjavilla.com' | |
}) | |
return { | |
statusCode: 200, | |
body: JSON.stringify(res), | |
}; | |
} catch(e) { | |
return { | |
statusCode: 422, | |
body: JSON.stringify(e), | |
}; | |
} | |
}; | |
f(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment