Stripe : No such customer: cus_7UIHhxxxxxZMF

There are two main things happening in your code.

1) You create a customer

2) 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 run this API call under this other account. Your connected account doesn’t have access to your account’s customers. Continue reading