Skip to content

Instantly share code, notes, and snippets.

@leonkyr
Created August 28, 2019 01:57
Show Gist options
  • Save leonkyr/d188fad53bd2ba91f4200774ceab41ff to your computer and use it in GitHub Desktop.
Save leonkyr/d188fad53bd2ba91f4200774ceab41ff to your computer and use it in GitHub Desktop.
stripe-connect-customer-charge
stripe.charges.create({
amount: 3201,
application_fee_amount: 299,
currency: "aud",
customer: customerId,
// source: customerTokenId, // "tok_mastercard_debit_transferSuccess",
description: "Charge for Tradie 2 - 1232",
receipt_email: "[email protected]",
transfer_group: invoiceId,
transfer_data: {
destination: accountId,
},
}).then(function (charge) {
// asynchronously called
console.log(JSON.stringify(charge, null, 2));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment