Connect Quickstart

    Learn how to process payments on behalf of connected accounts.

    Stripe Connect enables you to use the full Stripe API on behalf of connected accounts. In just three steps you can perform the common task of processing payments on a seller’s or service provider’s behalf:

    1. Register your platform
    2. Create a connected account
    3. Process a payment

    The rest of this quickstart goes through these steps in detail, demonstrating how to onboard new Express accounts via OAuth. You can install one of our client libraries on your server to run the example code in your preferred language.

    Step 1: Register your platform

    The first step to using Connect is to register your platform in the Dashboard.

    Step 2: Create a connected account

    With your platform registered, the second step is to create a connected account on whose behalf you can process payments and use other Stripe APIs.

    Using Express accounts is the easiest way for your platform to onboard users with Connect. When you use Express accounts, Stripe collects banking information from your users and handles identity verification, reducing the work that would otherwise be the responsibility of your platform. A live Express integration requires a unique account for each seller or service provider who operates on your platform, but you only need one Express account to test Connect.

    Express uses an OAuth flow for onboarding connected accounts. The onboarding process consists of three steps:

    1. Your application sends the user to Stripe’s website to provide the necessary details, including banking and contact information.
    2. When the user finishes providing the necessary information, Stripe sends them back to your application’s redirect_uri address and provides an authorization code.
    3. Your application sends a POST request with the authorization code to Stripe’s OAuth token endpoint to complete the connection.

    You can follow the steps below to create your first connected account.

    The Express user onboarding flow

    It’s time to try the onboarding flow for yourself. Following the prompts, you can see what your users experience when creating their own Express accounts. Stripe will redirect you back to this page when you are done.

    To avoid confusion during testing, use a different email address for the connected account than you use for the platform’s Stripe account. If you’d rather not provide an actual phone number, use 000 000 0000 as the phone number and 000-000 as the SMS code when prompted. When asked to provide banking information, use one of Stripe’s test card numbers (e.g., 4000 0566 5566 5556) instead of a real debit card.

    Click the button below to begin the Express user onboarding flow.

    Connect with Stripe

    Finalize the account connection

    When Stripe redirects the user back to your application, it appends the user’s authorization code as a query parameter in the URL. To finalize the connection, send a POST request to Stripe with the authorization code and store the returned account information for later use.

    curl \
      -d client_secret=sk_test_4eC39HqLyjWDarjtT1zdp7dc \
      -d code="{AUTHORIZATION_CODE}" \
      -d grant_type=authorization_code

    The response includes the user’s account ID, which you’ll need in Step 3. (You can also find it in the Dashboard; it’ll be something like acct_RnoLTjJd6sMRrlIL.)

    Step 3: Process a payment on the connected account's behalf

    Create a charge by providing the account’s ID in a create charge call. This example creates a destination charge although Connect supports other fund flows.

    curl \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d amount=1000 \
      -d currency=usd \
      -d source=tok_visa \
      -d transfer_data[destination]="{CONNECTED_STRIPE_ACCOUNT_ID}"
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here:
    Stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    charge = Stripe::Charge.create({
      :amount => 1000,
      :currency => "usd",
      :source => "tok_visa",
      :transfer_data => {
        :destination => "{CONNECTED_STRIPE_ACCOUNT_ID}",
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here:
    stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    charge = stripe.Charge.create(
        "destination": "{CONNECTED_STRIPE_ACCOUNT_ID}",
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here:
    $charge = \Stripe\Charge::create([
      "amount" => 1000,
      "currency" => "usd",
      "source" => "tok_visa",
      "transfer_data" => [
        "destination" => "{CONNECTED_STRIPE_ACCOUNT_ID}",
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here:
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("amount", 1000);
    params.put("currency", "usd");
    params.put("source", "tok_visa");
    Map<String, Object> destinationParams = new HashMap<String, Object>();
    transferDataParams.put("destination", "{CONNECTED_STRIPE_ACCOUNT_ID}");
    params.put("destination", destinationParams);
    Charge charge = Charge.create(params);
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here:
    var stripe = require("stripe")("sk_test_4eC39HqLyjWDarjtT1zdp7dc");
      amount: 1000,
      currency: "usd",
      source: "tok_visa",
      transfer_data: {
        destination: "{CONNECTED_STRIPE_ACCOUNT_ID}",
    }).then(function(charge) {
      // asynchronously called
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here:
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    params := &stripe.ChargeParams{
      Amount: stripe.Int64(1000),
      Currency: stripe.String(string(stripe.CurrencyUSD)),
      TransferData: &stripe.DestinationParams{
        Destination: stripe.String("{CONNECTED_STRIPE_ACCOUNT_ID}"),
    charge, err := charge.New(params)

    The example uses a test tokentok_visa—but you could tokenize a test card using Stripe.js and Elements or Stripe Checkout instead.

    Completing your integration

    You have now processed a payment on behalf of a connected account. We recommend that you learn about account balances, see how to authenticate as a connected account, configure a payout schedule, and also implement webhooks for your platform to be automatically notified of Stripe activity.

    Next steps

    You can expand on what you’ve learned here by reading these other pages:


    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


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