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
| stripe.payouts.create({ | |
| amount: 1000, | |
| currency: "aud", | |
| description: "YOUR PAYOUT", | |
| destination: 'ba_1FBu9jGaKsCGStvEMMtcehsg', | |
| }, { | |
| stripe_account: accountId, | |
| }).then(function (payout) { | |
| console.log(JSON.stringify(payout, null, 2)); | |
| }); |
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
| stripe.balance.retrieve({ | |
| stripe_account: accountId | |
| }, function (err, balance) { | |
| console.log(JSON.stringify(balance, null, 2)); | |
| }); |
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
| stripe.accounts.update(accountId, { | |
| settings: { | |
| payouts: { | |
| schedule: { | |
| interval: "manual", | |
| }, | |
| statement_descriptor: "Payout descriptor", | |
| }, | |
| }, | |
| }).then(function (account) { |
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
| stripe.charges.create({ | |
| amount: 2098, | |
| currency: "aud", | |
| source: "tok_mastercard_debit_transferSuccess", | |
| description: "Charge for Tradie 2 - Fix", | |
| receipt_email: "[email protected]", | |
| on_behalf_of: accountId, | |
| }).then(function (charge) { | |
| // asynchronously called | |
| console.log(JSON.stringify(charge, null, 2)); |
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
| 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: { |
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
| stripe.customers.create({ | |
| email: '[email protected]', | |
| source: 'tok_mastercard', | |
| }).then((customer) => console.log(JSON.stringify(customer, null, 2))); |
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
| // Consider using a test number from https://stripe.com/docs/connect/testing#account-numbers | |
| stripe.accounts.createExternalAccount(accountId, | |
| { | |
| external_account: { | |
| currency: "aud", | |
| country: "au", | |
| object: "bank_account", | |
| account_holder_name: "Leo the service provider", | |
| account_holder_type: "company", // "individual" | |
| routing_number: "110000", |
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
| stripe.accounts.updatePerson(accountId, tradieOwnerId, | |
| { | |
| dob: { | |
| day: 22, | |
| month: 7, | |
| year: 1980, | |
| }, | |
| }).then((person) => { | |
| console.log(JSON.stringify(person, null, 2)); | |
| }); |
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
| stripe.accounts.createPerson(accountId, { | |
| first_name: "Leo", | |
| last_name: "Tradie 2", | |
| email: "[email protected]", | |
| relationship: { | |
| account_opener: true, | |
| director: true, | |
| owner: true, | |
| title: "Director", | |
| }, |
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
| stripe.accounts.update(accountId, { | |
| metadata: { internal_id: "Tradie-2" }, | |
| tos_acceptance: { | |
| date: Math.floor(Date.now() / 1000), | |
| ip: "61.69.124.163" // Assumes you're not using a proxy | |
| } | |
| }).then(function (account) { | |
| console.log(JSON.stringify(account, null, 2)); | |
| }); |
NewerOlder