Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save matthewarkin/02ac9bf8d117858ea6fe to your computer and use it in GitHub Desktop.
Save matthewarkin/02ac9bf8d117858ea6fe to your computer and use it in GitHub Desktop.
Stripe.api_key = 'Application's Owner Secret Key'
@token = Stripe::Token.create(
{:customer => CUSTOMER_ID, :card => CARD_ID},
ACCESS_TOKEN # user's access token from the Stripe Connect flow
)
@charge = Stripe::Charge.create(
{
:amount => 2000,
:currency => "usd",
:card => @token.id',
:description => "Charge for Invoice",
:application_fee => 100
},
'USER ACCESS_TOKEN' # I am charging on behalf
)
#I am getting this error
#<Stripe::InvalidRequestError: (Status 400) No such customer: cus_5D0BEhEBqcQRxm>
@alexmamonchik
Copy link

how did you solve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment