When developing the Platform, there are two functions that you are usually interested in: payment and payments from users. Stripe divides these functions into two separate types of objects.
Accounts
An Account - , , . External Account ( , , ). , .
, :
Standard ( Standalone), Stripe. Standard Stripe , OAuth.Custom ( Managed),
, : API , .Express , - . Stripe Express Lite.
https://stripe.com/docs/connect/connecting-to-accounts
A Customer - , , , - .., / . https://stripe.com/docs/api#customers
Stripe Customer, . , , Checkout/Stripe.js/mobile sdk .
, https://stripe.com/docs/charges
, .
:
source - tok_xxxyyyyzzz, Stripe.js/Checkout/mobile SDK, . Customer , customer: cus_xxxyyyzzz , source Customer.
https://stripe.com/docs/connect/payments-fees#charging-through-the-platform
destination - Account, , . destination . destination. , , .
:
Charge (token or customer on Platform) -> Platform Balance -> Custom Account Balance (destination) -> Custom Account Bank Account
(), . https://stripe.com/docs/connect/bank-transfers#payout-information
Custom Accounts Standard Accounts OAuth, : https://dashboard.stripe.com/applications/users
, Stripe ( , acct_xxxyyyyzzzz)
https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header
https://stripe.com/docs/api#balance_history
, , , Stripe-Account, {stripe_account: CONNECTED_STRIPE_ACCOUNT_ID}, --- Connected Account . , .
. https://stripe.com/docs/connect/special-case-transfers#transferring-to-another-stripe-account
" ", Platform -> Connected Account ( → ).
ripe = require('stripe')(PLATFORM_SECRET_KEY);
stripe.transfers.create(
{
amount: 1000,
currency: 'usd',
destination: {CONNECTED_STRIPE_ACCOUNT_ID},
source_transaction: {CHARGE_ID}
}
);
Connect, , , . Stripe, , https://support.stripe.com/email