Templates Plugins Courses

Stripe Marketplace Express - Issues when trying to charge a connect account

Hey!

I’m building a marketplace for online tutoring and I am facing some issues when trying to set up the payment system with Stripe Marketplace Express.

I have it set up so that when the customer wants to book a lesson with a tutor, he has to add his credit card and create a payment method via Stripe SCA.

This is how the add a payment method workflow works:

Screen Shot 2021-09-10 at 2.06.30 PM

So far so good, the user is able to register the payment method.

Then, after the payment method is created, I have a “pay now” button that creates a payment intent, changes the required user data attributes, creates a lesson, confirms the payment intent and redirects the user to the next part of the booking process. This is how that looks:

Screen Shot 2021-09-10 at 2.09.56 PM

The problem is that whenever I try to pay I get the following error:

No such PaymentMethod: 'pm_1JY7MNGiMhaVbj9JLJ39n0vc'; OAuth key or Stripe-Account header was used but API request was provided with a platform-owned payment method ID. Please ensure that the provided payment method matches the specified account.

From what I understand, this means that this payment is intended for the platform, not for the connected account. How is that true when I have set the payment intent’s (header) Stripe-Account to the seller’s Stripe Account ID?

Would really appreciate any help!

Thank you!

Hello, @theo
Thanks for your request.

Please allow me to advise you to add this action before the “Create a payment intent” action:

Also, we suppose that there is no necessary to use confirmation steps:

Please check it and let me know about the result.
Best regards,

@Ecaterina Thank you so much, it works now!

Only thing is, if I don’t have the confirm payment step, then the payment doesn’t go through. The stripe dashboard says it isn’t completed since the customer hasn’t confirmed it. Is it a mistake I’ve done on my part or something else?

1 Like

I have another question… So when I try to pass the (header) stripe-account id dynamically in the payment intent input, I get this error:

Stripe marketplace error: this header value for Stripe-Account is not correct

Screen Shot 2021-09-10 at 4.38.25 PM

When I pass the data manually and not dynamically, the payment goes through no problem.

Here’s how the database field looks, it contains the user’s stripe account id in that field but when i pass it down to the payment intent, it just doesn’t work correctly.

Screen Shot 2021-09-10 at 4.39.02 PM

I’d greatly appreciate any help!

Thanks!!

@theo
Happy to hear that is working now!

Adding this step is not a mistake, but just not obligatory. In case it works on your side correctly, you can use it.

As for the second question, please allow us to check your comments and revert to a solution. Please note that it can take some time due to the weekends.

Thanks for the understanding.
Best regards,

Hello, @theo
Thanks for the patience.

We have analyzed your screenshots and defined the possible reason for the error.

Based on this error, I suppose it appears because of previous issue with seller ID. You have to make sure that you save the seller ID as mentioned above, and when you actually perform a charge, you have to indicate the value of that seller ID for the (header) Stripe-Account filed value:
image

Please check how exactly you are trying to receive the user’s ID and verify each step in the Debugger mode.

Looking to hear from you soon.
Best regards,