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.

The simple fix would be to also pass stripe_account to your create customer API call.

 

 

Sources:

https://stripe.com/docs/connect/connecting-to-accounts

http://stackoverflow.com/questions/32158598/no-such-customer-when-charging-with-stripe

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s