Debiting Express and Custom Accounts Public Beta

    With Connect, your platform can directly debit the Stripe balance of an Express or Custom account.

    At times, your platform might need to transfer funds from its connected accounts to your platform account:

    • To charge the connected account directly for products or services
    • To recover funds for a previous refund
    • To make other adjustments to connected account balances (e.g., to correct an error)

    When using Express or Custom accounts, you can debit a connected account’s Stripe balance to credit to your platform account’s Stripe balance. Stripe supports two approaches for doing so:

    Both approaches create the same flow of funds: a Transfer is created on the connected account and a Payment is created on the platform account. To ensure the transactions are reported appropriate for tax purposes, create a charge for activity that increases your revenue and create a transfer when making adjustments.

    Requirements

    This functionality is only supported for Express and Custom. Additionally:

    • The connected account and the platform must be in the same region (i.e., both must be in Europe or in the U.S.)
    • The currency value must match the default currency of the connected account
    • An account debit cannot make the connected account balance become negative unless you have reserves enabled (on by default for all new platforms created after January 31st, 2017)

    To allow for the most seamless experience, we strongly recommend verifying the connected account’s bank before using Account Debits.

    Charging a connected account

    The create a charge API call supports providing a connected account ID as the source value:

    curl https://api.stripe.com/v1/charges \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -d amount=1500 \
       -d currency=usd \
       -d source="{CONNECTED_STRIPE_ACCOUNT_ID}"
    
    charge = Stripe::Charge.create(
      :amount => 1500,
      :currency => "usd",
      :source => "{CONNECTED_STRIPE_ACCOUNT_ID}"
    )
    
    charge = stripe.Charge.create(
      amount=1500,
      currency="usd",
      source="{CONNECTED_STRIPE_ACCOUNT_ID}"
    )
    
    $charge = \Stripe\Charge::create(array(
      "amount"   => 1500,
      "currency" => "usd",
      "source" => "{CONNECTED_STRIPE_ACCOUNT_ID}"
      ));
    
    Map<String, Object> otherChargeParams = new HashMap<String, Object>();
    otherChargeParams.put("amount", 1500);
    otherChargeParams.put("currency", "usd");
    otherChargeParams.put("source", "{CONNECTED_STRIPE_ACCOUNT_ID}");
    
    Charge.create(otherChargeParams);
    
    
    stripe.charges.create({
      amount: 1500,
      currency: "usd",
      source: "{CONNECTED_STRIPE_ACCOUNT_ID}"
    });
    
    chargeParams := &stripe.ChargeParams{
      Amount: stripe.Int64(1500),
      Currency: stripe.String(string(stripe.CurrencyUSD)),
    }
    chargeParams.SetSource("{CONNECTED_STRIPE_ACCOUNT_ID}")
    
    ch, err := charge.New(chargeParams)
    
    var chargeOptions = new StripeChargeCreateOptions() {
      Amount = 1500,
      Currency = "usd",
      SourceTokenOrExistingSourceId = "{CONNECTED_STRIPE_ACCOUNT_ID}",
    };
    var chargeService = new StripeChargeService();
    StripeCharge charge = chargeService.Create(chargeOptions);
    

    The API call returns the Payment created on the platform account (note: it does not return a Charge).

    This approach is appropriate for platforms that charge their connected accounts for goods and services (i.e., for using the platform). For example, a platform can charge its connected accounts for additional fees or services through their Stripe balance, minimizing any need to collect an additional payment method and allowing for nearly instant availability of the funds.

    To help keep track of this additional revenue source, Stripe makes sure this revenue is appropriately added to the right tax forms (e.g., 1099).

    Transferring from a connected account

    The second method for debiting a connected account is to make a transfer from the connected account to your platform account. Use the Stripe-Account header to authenticate as the connected account and provide your platform’s Stripe account ID as the destination:

    curl https://api.stripe.com/v1/transfers \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
       -H "Stripe-Account: {CONNECTED_STRIPE_ACCOUNT_ID}" \
       -d amount=1500 \
       -d currency=usd \
       -d destination="{PLATFORM_STRIPE_ACCOUNT_ID}"
    
    Stripe::Transfer.create(
      {
        :amount => 1000,
        :currency => "usd",
        :destination => "{PLATFORM_STRIPE_ACCOUNT_ID}"
      },
      {:stripe_account => "{CONNECTED_STRIPE_ACCOUNT_ID}"}
    )
    
    stripe.Transfer.create(
      amount=1000,
      currency="usd",
      destination="{PLATFORM_STRIPE_ACCOUNT_ID}",
      stripe_account="{CONNECTED_STRIPE_ACCOUNT_ID}"
    )
    
    \Stripe\Transfer::create(
      array(
        "amount" => 1000,
        "currency" => "usd",
        "destination" => "{PLATFORM_STRIPE_ACCOUNT_ID}"
      ),
      array("stripe_account" => "{CONNECTED_STRIPE_ACCOUNT_ID}")
    );
    
    RequestOptions requestOptions = RequestOptions.builder().setStripeAccount("{CONNECTED_STRIPE_ACCOUNT_ID}").build();
    
    Map<String, Object> transferParams = new HashMap<String, Object>();
    transferParams.put("amount", 1000);
    transferParams.put("currency", "usd");
    transferParams.put("destination", "{PLATFORM_STRIPE_ACCOUNT_ID}");
    
    Transfer.create(transferParams, requestOptions);
    
    stripe.transfers.create(
      {
        amount: 1000,
        currency: "usd",
        destination: "{PLATFORM_STRIPE_ACCOUNT_ID}"
      },
      {stripe_account: "{CONNECTED_STRIPE_ACCOUNT_ID}"}
    );
    
    params := &stripe.TransferParams{
        Amount: stripe.Int64(1000),
        Currency: stripe.String(string(stripe.CurrencyUSD)),
        Destination: stripe.String("{PLATFORM_STRIPE_ACCOUNT_ID}"),
    }
    params.SetStripeAccount("{CONNECTED_STRIPE_ACCOUNT_ID}")
    
    t, err := transfer.New(params)
    
    var transferOptions = new StripeTransferCreateOptions() {
      Amount = 1000,
      Currency = "usd",
      Destination = "{PLATFORM_STRIPE_ACCOUNT_ID}",
    };
    
    var transferService = new StripeTransferService();
    var requestOptions = new StripeRequestOptions() {
      StripeConnectAccountId = "{CONNECTED_STRIPE_ACCOUNT_ID}",
    };
    StripeTransfer transfer = transferService.Create(transferOptions, requestOptions);
    

    This API call returns the Transfer created on the connected account.

    This approach is best for making adjustments within a platform (e.g., correcting a mis-payment or recovering any fees you paid to Stripe). Account Debits created as transfers are not reported as revenue (i.e., do not appear on a 1099 tax form).

    Note that you do need your platform’s Stripe account ID to perform this request. If you don’t know that value already, perform a retrieve account API call using your platform’s API key:

    curl https://api.stripe.com/v1/account \
       -u sk_test_4eC39HqLyjWDarjtT1zdp7dc:
    
    account = Stripe::Account.retrieve()
    
    account = stripe.Account.retrieve()
    
    $account = \Stripe\Account::retrieve();
    
    Account account = Account.retrieve();
    
    stripe.accounts.retrieve().then(function(acct) {
      // asynchronously called
    });
    
    acct, err := account.Get()
    
    var accountService = new StripeAccountService();
    StripeAccount account = accountService.Get();
    

    This API call returns the Account object that represents your platform account.

    Further reading

    Discover what other Connect functionality is available!

    Questions?

    We're always happy to help with code or other questions you might have! Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode.

    Was this page helpful? Yes No

    Send

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.