'Stripe Connect and Firebase Functions
I'm trying to set up stripe connect with firebase functions. So far I have a connected account created when a new item gets added to the firestore DB with the following code.
exports.createConnectedAccount = functions.firestore
.document("dbitem/{dbitemId}")
.onCreate(async (snap, context) => {
const account = await stripeClient.accounts.create({ type: "express" });
return admin
.firestore()
.collection("connected_accounts")
.doc(snap.id)
.set({ account_id: account.id });
});
Now the part i'm not understanding from the documentation is the following:
const accountLink = await stripe.accountLinks.create({
account: 'acct_1032D82eZvKYlo2C',
refresh_url: 'https://example.com/reauth',
return_url: 'https://example.com/return',
type: 'account_onboarding',
});
how do I create the account links, and how to make the https request through firebase functions for the refresh and return urls.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
