#hermenherman_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1250328398820016148
đ Have more to share? Add details, code, screenshots, videos, etc. below.
If i create a Payment Intent and pass a customer id from the platform, it fails giving a "customer not found" error.
I'm wondering if i create a Payment Method and save it to the platform Customer, and then the user selects that method, and the PaymentIntent is created on the Connect Account, but without a customer id, maybe that could work? But it's a bunch of dev to get to a proof of concept
Are you using direct charges or destination charges?
direct.
Ok, then you should save the payment method on platform, and clone a payment method to the connected account when you want to create a charge on that account,
do you need to have a different Customer for every Connect Account they work with?
No necessary, unless you want to save the cloned payment method on a connected account.
is the idea that the cloned method would be single use?
a payment method can be reused only if it's attached to a customer.
So is the idea:
- Create a platform Customer
- User enters payment information
- Create a Payment Method from that element
- Attach method to platform Customer
- Create a Payment Intent (with Connect Account headers)
- Clone the Payment Method with the (Connect Account Headers)
- Send the NEW payment method back to the frontend with Payment Intent secret
- Confirm Payment
?
Or does it mean:
- Create platform customer
- Every time they want to order from a different vendor, create another customer (with Connect headers) and clone all of their payment methods in
You can just confirm the payment from the backend.
The whole point of this change is to deal with 3DS
You still need to handle 3DS
I just don't understand the cloning idea
does customer: '{{CUSTOMER_ID}}', refer to a customer created with the Connect headers? or can it be the platform customer
which pieces of the flow i wrote out up there is wrong? Im sure a bunch is.
Sending it to the frontend for confirmation is the least of my concerns at this point
customer: '{{CUSTOMER_ID}}',
payment_method: '{{PAYMENT_METHOD_ID}}',
}, {
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
});```
You mean the CUSTOMER_ID here ?
yes
That's the platform's customer ID.
ok
1 sec looking something up
is there a downside to cloning the payment method every time a purchase is made?
what kind of downside do you refer to?
it seems weird to duplicate the same Payment method into the stripe account for every payment.
like this? âď¸
Looks good to me. One nitpick in last step, you can confirm PaymentIntent from backend with the cloned payment method, you only need to confirm from frontend when 3DS is requested.
if 3ds is sometimes required, why not just always confirm on the frontend?
You can reduce some friction (i.e., doesn't require customer's interaction).
But it's entirely up to you.
k
Since there's an annoying workaround, it sure would be nice if the customer could be a platform customer in the first place
that's where we end up in the end, just with a bunch of steps in between
not your problem i know.
thanks for your help @warped oar i'll give it a try
Strong recommendation to update those docs to say:
customer: '{{PLATFORM_CUSTOMER_ID}}',
payment_method: '{{PAYMENT_METHOD_ID}}',
}, {
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
});```
"PLATFORM_CUSTOMER_ID"
That's a good callout! let me ask the doc team to fix it.
i read that page about 10x before i came here
while i have you...
is it possible to attach a payment method to a customer in Stripe Js somewhere?
Not possible. you can only attach a payment method to customer from a backend API call.
got it.