Reputation: 51
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,
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
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.
Upvotes: 2
Views: 1858
Reputation: 3351
A big thing to clarify:
Therefore, it isn't clear why you want to create these "shared" customers on the Connect accounts, this sounds like you're approaching this the wrong way. You only need customers on Connect accounts if you're using Direct Charges.
I tried to follow this article Clone customers across accounts but I have not had any luck, unfortunately.
This approach clones "tokens" for you i.e. clone a token from the Platform account to a Connect account. You cannot clone customers on Stripe, the API doesn't support it. You can manually create 'n' customers and have to manage the state between them yourself.
After which webhook event (payment_intent.succeeded ? or checkout.session.completed ?), do I need to create the token and Clone customers across accounts?
If you're using Checkout, you use the checkout.session.completed
event.
If you're using PaymentIntents and creating payments using Stripe Elements, you use payment_intent.succeeded
Please let me know if that clarifies things.
Upvotes: 1