#Austin_Rowe-saved-pm

1 messages ยท Page 1 of 1 (latest)

opaque summit
#

Hello again ๐Ÿ‘‹
Are you creating direct charges?

halcyon hazel
#

Basically doing the below
const paymentIntent = await stripe.paymentIntents.create({ amount: (amount + shippingAmount), currency: 'usd', customer: customer_id, payment_method: paymentMethod_id, off_session: true, confirm: true, application_fee_amount: Math.round((amount * 0.03) + shippingAmount), }, { stripeAccount: cartToCreateOrderFrom.SupplierID.StripeAccountInfo.id, });

opaque summit
#

Yup direct charges

#

If the payment method exists on platform then yes, you'd need to clone it to the connected account

halcyon hazel
#

What happens when the on platform customer updates their payment methods? Will the cloned customer be updated as well?

#

Also can you direct me to the documentation for cloning the customer to the connected account?

opaque summit
#

No, you'd need to update it (possibly using webhooks)

#

sure just a sec

halcyon hazel
#

Seems that it'd be simpler to just clone the customer again whenever making a transaction... is this an acceptable method? Perhaps I could have a cleanup function that removes the customer from the connected account whenever the payment has gone through

halcyon hazel
#

I would rather not have to keep all the cloned customers synced as there could potentially be hundreds depending on the amount of transactions with different sellers that the customer does

opaque summit
#

there's isn't a super easy way to handle this unfortunately.
You could likely utilize metadata on the customer object to keep them in sync

halcyon hazel
#

What about the above method I mentioned of deleting the cloned customer after the transaction is successful and whenever I intend to make a transaction just cloning the customer temporarily?

opaque summit
#

deleting a customer isn't a great idea IMO

#

it could affect invoices, subscriptions data etc

halcyon hazel
#

Is there a simple way to add a payment method to the cloned customer whenever the original customer adds a payment method?

#

Also when I clone the customer will the attached payment methods maintain their id?

opaque summit
halcyon hazel
#

I'll check it out! Thanks for all your help @opaque summit

opaque summit
#

NP! ๐Ÿ™‚ Good luck

halcyon hazel
#

Just in the first 5 minutes where he gives a high-level overview I think this will be exactly what we need! So thanks for that @opaque summit

I do have another unrelated question. Should I ask here?

opaque summit
#

Sure

halcyon hazel
#

If I have an off platform buyer and I want a seller to be able to collect payment from them is there some way to create a payment intent and then send the offline buyer some sort of link (perhaps to Stripe's checkout flow) that would allow them to enter payment details and have the payment flow as usual through the platform?

opaque summit
halcyon hazel
#

Would this work with stripe connect so that we can still take our fees?

opaque summit
halcyon hazel
#

I notice that they always depict attaching a customer to that invoice though, is it possible to forego the customer and to just get a hosted invoice link from this method?
const invoice = await stripe.invoices.create({ customer: '{{CUSTOMER_ID}}', application_fee_amount: 10, }, { stripeAccount: '{{CONNECTED_ACCOUNT_ID}}', });

#

So instead of the above do the following and then a hosted invoice link is generated?
const invoice = await stripe.invoices.create({ application_fee_amount: 10, }, { stripeAccount: '{{CONNECTED_ACCOUNT_ID}}', });

opaque summit
#

yeah I think customer ID is optional

halcyon hazel
#

Ok, perfect! If I run into more questions I'll be back around. You're a gem @opaque summit