Stripe Connect: What's the difference between clients and accounts in React Native?

Currently, it seems that Connect is Accountsdoing everything Customers, for example. You can add a bank card directly to your account Accounts. So just creating Accountsfor the user seems enough, but could there ever be a case where I would need to create an object Customers?

For example, in the tutorial ( https://stripe.com/docs/connect/payments-fees) for TOKEN, you can simply provide a Accountspublicly accessible key:

stripe.charges.create({
  amount: 1000,
  currency: 'usd',
  source: {TOKEN},
  destination: {CONNECTED_STRIPE_ACCOUNT_ID}
});

To clarify, sourcewhere the funds will be withdrawn, but destination- where will the funds be allocated? And will the funds be credited destinationto the bank account by default?

In addition, when Accountscreated through the API, is it possible to view a connected account only through the platform toolbar? And also be able to view transactions and balance?

Finally, when transferring funds without identifying the source, does this mean that the funds will be withdrawn from the balance on the platform?

var stripe = require('stripe')(PLATFORM_SECRET_KEY);
stripe.transfers.create(
  {
    amount: 1000,
    currency: "usd",
    destination: "default_for_currency"
  },
  {stripe_account: CONNECTED_STRIPE_ACCOUNT_ID}
);

Will accept / raise the response. Thank you in advance.

+4
source share
1 answer

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

+11

Source: https://habr.com/ru/post/1658747/


All Articles