untitled notebook

node v10.20.1
version: 1.0.0
endpointsharetweet
const account = (await require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2').accounts.retrieve('acct_1AojmwI9Pbw6jkMZ'));
const stripe = require('stripe')('sk_test_BQokikJOvBiI2HlWgH4olfQ2'); // Create a payment of $100, and automatically split funds between // your platform and the seller. const paymentIntent = await stripe.paymentIntents.create({ amount: 10000, currency: 'usd', description: 'Payment', payment_method: 'pm_card_bypassPending', off_session: true, confirm: true, transfer_data: { // Send $80 to the seller after collecting a 20% platform fee. amount: 8000, // The destination of this charge is the seller's Stripe account. destination: account.id } });
Loading…

no comments

    sign in to comment