#koidestroyer
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
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?
then you can replace the subscription part with that part from this guide https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
so instead of invoicing the charge is made instantly and a portion of it is then transferred to the connected account
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
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
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
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
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
describes how you can do a PaymentIntent without an invoice
cool, and the question there is, can I do that with a transfer_data[] option? We'd like to preserve that option
that part?
yes
and for the front-end part you can take a look at this guide https://stripe.com/docs/connect/creating-a-payments-page?platform=web&ui=elements
I guess this the most complete version
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
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}}',
},
});```
great - thank you
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
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
depends on how long you will be gone
yeah, it will be long enough, I have to go do different things at them moment. Thank you again ๐