#koidestroyer

1 messages ยท Page 1 of 1 (latest)

karmic ibexBOT
lucid sigil
#

๐Ÿ‘‹ happy to help

floral folio
#

That's what we currently do

#

We want to build a web elements based payment page that would go through the connect transfer data flow

#

is this possible?

lucid sigil
floral folio
#

so instead of invoicing the charge is made instantly and a portion of it is then transferred to the connected account

lucid sigil
#

yes it's possible

#

the backend code doesn't change that much

#

you just need to expand on payment_intent and send the client_secret to the Payment Element

floral folio
#

what secret?

#

or, in other words, could you expand on your last phrase? ๐Ÿ™‚

lucid sigil
#

the client_secret

#

sorry that was a typo

#

yeah so basically if you look at the guide I shared with you it explains how to build an integration with subscriptions

#

and to collect the Payment Method from the client

#

it uses the latest_invoice.payment_intent.client_secret

#

when using one-off invoices you have directly access to the client_secret via the payment_intent

floral folio
#

and will that generate instantly an invoice - so I would have to capture the name of the payer like if it was an invoice?

#

Because ideally we would like it to be a regular sales transaction without invoice or subscription

#

if possible

lucid sigil
#

the only thing necessary from the guide I gave you is the front-end part

#

other than you don't change a thing with what you're currently doing in the invoice creation

#

you can also create a PaymentIntent without having to use Invoices

#

but I thought you wanted to keep that

floral folio
#

Not for this use case, the thing I want to keep is the "Connect" part where some part of the money is directly sent to the connected account

#

without passing through our account

#

if we need invoices to make that work, then we'll keep them but if we can skip that and directly send money somehow that's best for our use case.

To be clearer. We are currently invoicing companies, so that's fine. We want to start charging directly consumers where they enter their CC info and get some money to us and the rest directly to the connected account

lucid sigil
#

describes how you can do a PaymentIntent without an invoice

floral folio
#

cool, and the question there is, can I do that with a transfer_data[] option? We'd like to preserve that option

lucid sigil
#

yes

#

please check the doc I sent you

#

it explains how to do it in the backend part

floral folio
#

that part?

lucid sigil
#

yes

#

I guess this the most complete version

floral folio
#

cool, thanks - I'll likely come back later with further questions as I move along ๐Ÿ˜„

#

So the paymentintent has the "connect" information

#

and thus it can work with the frontend code (with the matching backend code) as well

lucid sigil
#

e.g.

const paymentIntent = await stripe.paymentIntents.create({
  amount: 1000,
  currency: 'eur',
  // In the latest version of the API, specifying the `automatic_payment_methods` parameter is optional because Stripe enables its functionality by default.
  automatic_payment_methods: {enabled: true},
  application_fee_amount: ,
  transfer_data: {
    destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
  },
});```
floral folio
#

great - thank you

lucid sigil
#

please read in depth the different guides I gave you

#

dependning on whether you want Invoices or not

#

some of the guides will be more targeted to your quest

floral folio
#

yeah - I will try several combinations and will likely come back with more questions ๐Ÿ™‚ I already know the drill

#

I know this thread will be closed and my next questions will likely be addressed by others, too

lucid sigil
#

depends on how long you will be gone

floral folio
#

yeah, it will be long enough, I have to go do different things at them moment. Thank you again ๐Ÿ™‚