"no Such Customer" When Charging With Stripe
I was testing around with Stripe API and I couldn't get this basic 'marketplace' scenario to work. The scenario is a buyer buys from a seller, and the application has a fee. My set
Solution 1:
There are two main things happening in your code:
- You create a customer.
- You then charge that customer.
The issue is that you're creating the customer in your own account but you're creating the charge under the scope of the connected account. When you pass stripe_account
you're essentially telling Stripe to run the API call under the other, connected account. Your connected account doesn't have access to your base account's customers.
The simple fix would be to also pass stripe_account
to your create customer API call.
Post a Comment for ""no Such Customer" When Charging With Stripe"