I am working on stripe payments, where i require having a shared customer across different connected accounts, that are connected with the platform
I am using "Express Accounts" in stripe connect for connecting the connected accounts, that are linked with the platform account.
On the frontend (client-side) (Angular), using the "Stripe Prebuilt checkout page", for accepting payment and I am verifying the payment in webhooks(checkout.session.completed) at backend using Django Rest Framework.
I am using Destination Charges, for handling the payments and separate charges and transfers. (That i am able to achieve using stripe prebuilt checkout page by specifying payment_intent_data.application_fee_amount and payment_intent_data.transfer_data.destination)
A destination charge means the charge is processed on the platform and then the funds are immediately and automatically transferred to the connected account’s pending balance.
Now I have a requirement where I need to have shared customers and share customers across the connected accounts,
- Is it even possible to achieve shared customers using a stripe prebuilt checkout page?
- If yes, how can I achieve it?
- Or Do I need to go with "Custom payment flow" for accepting a payment?
I tried to follow this article Clone customers across accounts but I have not had any luck, unfortunately.
With Connect, you can accomplish this by following three steps:
Storing customers, with a payment method, on the platform account
Making tokens to clone the payment method when it’s time to charge
the customer on behalf of a connected accountCreating charges using the new tokens
- For step 2. when do I need to create a token?
- After which webhook event (payment_intent.succeeded ? or checkout.session.completed ?), do I need to create the token and Clone customers across accounts?
I can also attach any code for your review and show you what I have tried by now.
Please let me know in the comments if you need it.