Skip to content

PaymentSheet with StripeAccountId #323

Answered by DevFreeze
DevFreeze asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I managed to make a payment to an Connected Account with the PaymentSheet.

In addition to assigning the StripeAccountId to Stripe.stripeAccountId I need to also add it when the PaymentIntent is created:

exports.stripePayment = functions.https.onRequest(async (req, res) => {

    const amount = req.body.amount;
    const currency = req.body.currency;
    const fee = req.body.fee;
    const stripeAccountId = req.body.stripeAccountId;

    const paymentIntent = await stripe.paymentIntents.create({
        amount: amount,
        application_fee_amount: fee,
        currency: currency,
    }, {
        stripeAccount: stripeAccountId,
    });

    res.json({
        paymentIntent: paymentI…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@vytautas-pranskunas-
Comment options

@vytautas-pranskunas-
Comment options

Answer selected by DevFreeze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants