Created
March 20, 2018 22:55
-
-
Save karldanninger/22b4986e1a2534c4db48df0997d6bb77 to your computer and use it in GitHub Desktop.
Destination Charge vs Direct Charge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(token); | |
const result = await stripe.charges.create( | |
{ | |
amount: payment.amount, | |
currency: 'cad', | |
description: 'some description', | |
source: token.tokenId, | |
metadata: { paymentId }, | |
statement_descriptor: 'some statement', // TODO: --> `${locationName}` | |
// stripe connect fields | |
// application_fee: fee, | |
destination: { | |
amount: payment.amount - fee, | |
account: partnerStripeAccount, | |
}, | |
}, | |
// { | |
// stripe_account: partnerStripeAccount, | |
// }, | |
); | |
// SERVER RESPONSE FROM CONSOLE.LOG ON LINE 1 | |
// { livemode: false, | |
// card: | |
// { addressLine1: '123 Maple Street', | |
// country: 'US', | |
// name: 'Test User', | |
// addressCountry: 'CA', | |
// addressZip: 'N1G2E5', | |
// addressCity: 'Maple City', | |
// cardId: 'card_1C7tJCDQENpMtOauqE8c73dW', | |
// brand: 'Visa', | |
// isApplePayCard: false, | |
// addressState: 'Ontario', | |
// last4: '4242', | |
// addressLine2: 'Apt. 5', | |
// funding: 'credit', | |
// expYear: 2024, | |
// expMonth: 4 }, | |
// created: 1521586318, | |
// tokenId: 'tok_1C7tJCDQENpMtOau56gBXGOj' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment