ย ยทย FF Learner

(SOLVED) Stripe Connect Client Initialisation for Direct Charges

Resolved

Edit 2: Solved it myself ๐Ÿ˜„

For those coming here with the same issue:
What fixed it for me was adjusting the Stripe settings before calling the payment sheet. Setting the stripeAccountId (connected account id) to the Id of the Merchant who will receive the funds and then calling the applySetting method. Funds now directly go to the merchants stripe account, customers are created in same stripe account and the merchant can handle all the refunds themselves.

Hey,

Situation:
I got Stripe Connect to work with my Platform using the FF Stripe Payment Action and some backend code to route the funds upon certain checks to the connected account of my merchant.

The only problem with this way of integration is the funds are first transferred to my Platform Stripe Account, I deduct the Stripe Processing Fees and send the money to the merchants connected stripe account.


What I want to achieve
I don't take commissions so I technically don't need this extra step of being the escrow service in the middle and would rather want to use Direct Charges so Customers pay Merchants directly via my App, have the customer data on their stripe account and can handle refunds by themselves making the transactions less depended on my end.

Setup

Creating the Payment Intent with a Cloud Function
Service Side is working fine. Im calling a Cloud Function to initialize the payment intent for the connected account which returns the payment intent object for the connected account.

I can see every transactions payment intent in the connected accounts dashboard.

Initializing the Payment Sheet on the device
Technical this works but Im receiving an error stating "No such payment_intent".

Question

Is there a way for me to initialize stripe in the app with the connect ID from my Merchant instead of using the fallback to my platforms stripe account?

Edit:

I just checked, if the intent really is created in the connected account by the cloud function by adding a "on_behalf_of" to the intent resulting in the error:

Giving this error which tells me, the issue has to be on the app side rather than my cloud function.
The json returned by the function also is correct and returns the payment intent object.

4
1 reply