# Pay out money with Accounts v1 Add money to your Stripe balance and pay out your sellers or service providers. Stripe supports cross-border transfers on the payments balance between the United States, Canada, United Kingdom, EEA, and Switzerland. In other scenarios, your platform and any connected account must be in the same region. Attempting to transfer funds across unsupported borders or balances returns an error. See [Cross-border payouts](https://docs.stripe.com/connect/cross-border-payouts.md) for supported funds flows between other regions. You must only use transfers in combination with the permitted use cases for [charges](https://docs.stripe.com/connect/charges.md), [tops-ups](https://docs.stripe.com/connect/top-ups.md) and [fees](https://docs.stripe.com/connect/legacy/add-and-pay-out-guide.md#collect-fees). We recommend using separate charges and transfers only when you’re responsible for negative balances of your connected accounts. # API > This is a API for when dashboard-or-api is api. View the full page at https://docs.stripe.com/connect/legacy/add-and-pay-out-guide?dashboard-or-api=api. Use this guide to learn how to add funds to your account balance and transfer the funds into your users’ bank accounts, without processing payments through Stripe. This guide uses an example of a Q&A product that pays its writers a portion of the advertising revenue that their answers generate. The platform and connected accounts are both in the US. > Only [team members](https://docs.stripe.com/get-started/account/teams.md) with administrator access to the platform Stripe account and [two-factor authentication](https://support.stripe.com/questions/how-do-i-enable-two-step-verification) enabled can add funds. For businesses using automatic payouts, funds added to the payments balance in excess of the [minimum balance](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts.md) are paid out in the next payout. You can configure your payout schedule and minimum balance settings in your [Payout settings](https://dashboard.stripe.com/settings/payouts). ## Prerequisites 1. [Register your platform](https://dashboard.stripe.com/connect). 1. Add business details to [activate your account](https://dashboard.stripe.com/account/onboarding). 1. [Complete your platform profile](https://dashboard.stripe.com/connect/settings/profile). 1. [Customize your brand settings](https://dashboard.stripe.com/settings/connect/stripe-dashboard/branding). Add a business name, icon, and brand color. ## Set up Stripe [Server-side] Install Stripe’s official libraries so you can access the API from your application: #### Ruby ```bash # Available as a gem sudo gem install stripe ``` ```ruby # If you use bundler, you can add this line to your Gemfile gem 'stripe' ``` ## Create a connected account When a user (seller or service provider) signs up on your platform, create a user [Account](https://docs.stripe.com/api/accounts.md) (referred to as a *connected account*) so you can accept payments and move funds to their bank account. Connected accounts represent your users in Stripe’s API and facilitate the collection of information requirements so Stripe can verify the user’s identity. For a Q&A product that pays for answers, the connected account represents the writer. > This guide uses connected accounts that use the Express Dashboard, which have certain [restrictions](https://docs.stripe.com/connect/express-accounts.md#prerequisites-for-using-express). You can evaluate [Custom accounts](https://docs.stripe.com/connect/custom-accounts.md) as an alternative. ### 1. Customize your signup form In your [platform settings](https://dashboard.stripe.com/settings/connect/stripe-dashboard/branding), customize your Express signup form by changing the color and logos that users see when they click your *Connect* (Connect is Stripe's solution for multi-party businesses, such as marketplace or software platforms, to route payments between sellers, customers, and other recipients) link. ![](https://b.stripecdn.com/docs-statics-srv/assets/oauth-form.4b13fc5edc56abd16004b4ccdff27fb6.png) Default Express signup form ![](https://b.stripecdn.com/docs-statics-srv/assets/branding-settings-payouts.20c99c810389a4e7f5c55238e80a9fc8.png) Branding settings ### 2. Create a connected account and prefill information Use the `/v1/accounts` API to [create](https://docs.stripe.com/api/accounts/create.md) a connected account by specifying the [connected account properties](https://docs.stripe.com/connect/migrate-to-controller-properties.md), or by specifying the account type. ```curl curl https://api.stripe.com/v1/accounts \ -u "<>:" \ -d "controller[losses][payments]=application" \ -d "controller[fees][payer]=application" \ -d "controller[stripe_dashboard][type]=express" ``` If you’ve already collected information for your connected accounts, you can prefill that information on the `Account` object. You can prefill any account information, including personal and business information, external account information, and so on. After creating the `Account`, create a [Person](https://docs.stripe.com/api/persons/create.md) to represent the person responsible for opening the account, with `relationship.representative` set to true and any account information you want to prefill (for example, their first and last name). ```curl curl https://api.stripe.com/v1/accounts/{{ACCOUNT_ID}}/persons \ -u "<>:" \ -d first_name=Jenny \ -d last_name=Rosen \ -d "relationship[representative]=true" ``` Connect Onboarding doesn’t ask for the prefilled information. However, it does ask the account holder to confirm the prefilled information before accepting the [Connect service agreement](https://docs.stripe.com/connect/service-agreement-types.md). When testing your integration, prefill account information using [test data](https://docs.stripe.com/connect/testing.md). ### Create an account link You can create an account link by calling the [Account Links v1](https://docs.stripe.com/api/account_links.md) API with the following parameters: - `account` - `refresh_url` - `return_url` - `type` = `account_onboarding` ```curl curl https://api.stripe.com/v1/account_links \ -u "<>:" \ -d "account={{CONNECTEDACCOUNT_ID}}" \ --data-urlencode "refresh_url=https://example.com/reauth" \ --data-urlencode "return_url=https://example.com/return" \ -d type=account_onboarding ``` ### Redirect your user to the account link URL The create Account Link response includes a `url` value. After authenticating the user in your application, redirect to this URL to send them into the flow. Account link URLs from the [Account Links v1](https://docs.stripe.com/api/account_links.md) API are temporary and are single-use only, because they grant access to the connected account user’s personal information. Authenticate the user in your application before redirecting them to this URL. If you want to prefill information, you must do so before generating the account link. After you create the account link, you can’t read or write information for the connected account. > Don’t email, text, or otherwise send account link URLs outside of your platform application. Instead, provide them to the authenticated account holder within your application. #### Item 1 #### Swift ```swift import UIKit import SafariServices let BackendAPIBaseURL: String = "" // Set to the URL of your backend server class ConnectOnboardViewController: UIViewController { // ... override func viewDidLoad() { super.viewDidLoad() let connectWithStripeButton = UIButton(type: .system) connectWithStripeButton.setTitle("Connect with Stripe", for: .normal) connectWithStripeButton.addTarget(self, action: #selector(didSelectConnectWithStripe), for: .touchUpInside) view.addSubview(connectWithStripeButton) // ... } @objc func didSelectConnectWithStripe() { if let url = URL(string: BackendAPIBaseURL)?.appendingPathComponent("onboard-user") { var request = URLRequest(url: url) request.httpMethod = "POST" let task = URLSession.shared.dataTask(with: request) { (data, response, error) in guard let data = data, let json = try? JSONSerialization.jsonObject(with: data, options: []) as? [String : Any], let accountURLString = json["url"] as? String, let accountURL = URL(string: accountURLString) else { // handle error } let safariViewController = SFSafariViewController(url: accountURL) safariViewController.delegate = self DispatchQueue.main.async { self.present(safariViewController, animated: true, completion: nil) } } } } // ... } extension ConnectOnboardViewController: SFSafariViewControllerDelegate { func safariViewControllerDidFinish(_ controller: SFSafariViewController) { // the user may have closed the SFSafariViewController instance before a redirect // occurred. Sync with your backend to confirm the correct state } } ``` #### Item 2 ```xml