# Create an invoice with Connect Create invoices for connected accounts and optionally take fees in the process. Don’t know much about *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)? Check out our [Overview](https://docs.stripe.com/connect.md) article. You can create *invoices* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice) for connected accounts that use [direct charges](https://docs.stripe.com/connect/direct-charges.md) or [destination charges](https://docs.stripe.com/connect/destination-charges.md). You can also take an application fee on these invoices. > Invoice transactions are based on [Invoicing pricing](https://stripe.com/invoicing/pricing). ## Create an invoice using direct charges To create an invoice that directly charges on a connected account, [create an invoice](https://docs.stripe.com/api.md#create_invoice) while [authenticated](https://docs.stripe.com/connect/authentication.md#stripe-account-header) as the connected account. For this to work, the customer must be defined on the connected account. #### curl ```bash curl https://api.stripe.com/v1/invoices \ -u <>: \ -d customer={{CUSTOMER_ID}} \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" ``` As with [creating a direct charge](https://docs.stripe.com/connect/direct-charges.md#collect-fees) on a connected account, you can create a customer on a connected account by using either the platform’s publishable key or the connected account’s publishable key. You can also create a token by using [shared customers](https://docs.stripe.com/connect/cloning-customers-across-accounts.md). When you use direct charges, the connected account is responsible for the cost of the Stripe fees, refunds, and chargebacks. ## Create an invoice using destination charges To create an invoice that charges on the platform and creates automatic transfers to a connected account, [create an invoice](https://docs.stripe.com/api.md#create_invoice) while providing the connected account ID as the `transfer_data[destination]` [value](https://docs.stripe.com/api/invoices/object.md#invoice_object-transfer_data). #### curl ```bash curl https://api.stripe.com/v1/invoices \ -u <>: \ -d customer={{CUSTOMER_ID}} \ -d "transfer_data[destination]"="{{CONNECTED_ACCOUNT_ID}}" ``` For this to work, the customer must be defined on the platform account, and you must create the connected account token by using the platform’s publishable key. When using automatic transfers, the platform is the business of record. ## Display Connected Account Tax IDs and Business Details on your Invoices Certain regions have regulatory requirements for businesses to show their tax IDs and other business details on customer-facing documents. In some cases, you can fulfill these requirements by displaying information about a connected account instead of information about your platform. The following steps show how to render a connected account’s tax ID and business details on invoice emails, invoice PDFs, Hosted Invoice Pages, and invoice receipts: 1. Create tax IDs for your connected account. 1. Set default tax IDs for your connected account. 1. Specify the connected account either using the [`on_behalf_of` parameter](https://docs.stripe.com/invoicing/connect.md#on-behalf-of) or as the `issuer` on existing or new invoices, subscriptions, and subscription schedules. ### Create tax IDs for your connected account The following example creates a single tax ID for the connected account. Stripe stores the tax ID on the connected account. To create additional tax IDs, call the endpoint again. ```curl curl https://api.stripe.com/v1/tax_ids \ -u "<>:" \ -H "Stripe-Account: {{CONNECTEDACCOUNT_ID}}" \ -d type=eu_vat \ -d value=DE123456789 ``` ### Set default tax IDs for your connected account Stripe automatically pulls default tax IDs from the invoice `issuer`’s account during finalization unless `account_tax_ids` is already set on the invoices. You can set the tax IDs stored on the connected account as the default tax IDs for that account. The following example sets existing tax IDs as default tax IDs: ```curl curl https://api.stripe.com/v1/accounts/{{CONNECTEDACCOUNT_ID}} \ -u "<>:" \ -d "settings[invoices][default_account_tax_ids][0]"=atxi_123 \ -d "settings[invoices][default_account_tax_ids][1]"=atxi_456 ``` ### Set issuer on existing or new invoices, subscriptions, and subscription schedules as the connected account The following example sets `issuer` on an existing subscription. During invoice finalization, subscription invoices pull in the issuer’s default tax IDs: ```curl curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \ -u "<>:" \ -d "invoice_settings[issuer][type]"=account \ -d "invoice_settings[issuer][account]"="{{CONNECTEDACCOUNT_ID}}" ``` The following example sets `issuer` during invoice creation: ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d customer="{{CUSTOMER_ID}}" \ -d "issuer[type]"=account \ -d "issuer[account]"="{{CONNECTEDACCOUNT_ID}}" \ -d "transfer_data[destination]"="{{CONNECTEDACCOUNT_ID}}" ``` Alternatively, the `on_behalf_of` parameter also prints a connected account’s details on the invoice email, invoice PDF, Hosted Invoice Page, and invoice receipt. ### Set account tax IDs on existing or new invoices, subscriptions, and subscription schedules You can specify `account_tax_ids` for invoices, subscriptions, and subscription schedules to override the default tax IDs. The following example sets `account_tax_ids` on an existing subscription: ```curl curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \ -u "<>:" \ -d "invoice_settings[issuer][type]"=account \ -d "invoice_settings[issuer][account]"="{{CONNECTEDACCOUNT_ID}}" \ -d "invoice_settings[account_tax_ids][]"=txi_123 \ -d "invoice_settings[account_tax_ids][]"=txi_456 ``` The following example sets `account_tax_ids` during invoice creation: ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d customer="{{CUSTOMER_ID}}" \ -d "issuer[type]"=account \ -d "issuer[account]"="{{CUSTOMERACCOUNT_ID}}" \ -d "transfer_data[destination]"="{{CUSTOMERACCOUNT_ID}}" \ -d "account_tax_ids[]"=txi_123 \ -d "account_tax_ids[]"=txi_456 ``` ### Create tax IDs stored on the platform for your connected account The tax ID you create is stored on the platform account instead of the connected account. The following example creates a single tax ID for the connected account without using the `Stripe-Account` header: ```curl curl https://api.stripe.com/v1/tax_ids \ -u "<>:" \ -d type=eu_vat \ -d value=DE123456789 \ -d "owner[type]"=account \ -d "owner[account]"="{{CONNECTEDACCOUNT_ID}}" ``` ## Collect application fees On the invoice, you can optionally withhold an application fee. The following example shows an [application_fee_amount](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-application_fee_percent) for an invoice with a direct charge on the connected account: #### curl ```bash curl https://api.stripe.com/v1/invoices \ -u <>: \ -d customer={{CUSTOMER_ID}} \ -d application_fee_amount="10" \ -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" ``` This example shows an `application_fee_amount` for an invoice with a destination charge: #### curl ```bash curl https://api.stripe.com/v1/invoices \ -u <>: \ -d customer={{CUSTOMER_ID}} \ -d application_fee_amount="10" \ -d "transfer_data[destination]"="{{CONNECTED_ACCOUNT_ID}}" ``` ## Configure invoice payment methods Manage the invoice [payment methods](https://docs.stripe.com/connect/payment-methods.md) your connected accounts can use. To enable a default list of payment methods: 1. Go to **Settings** > **Billing** > [Invoice](https://dashboard.stripe.com/settings/billing/invoice). 1. In the **Default payment methods** section, click the **Connected accounts payment method configuration** drop-down. 1. Select **Default** to enable Stripe to provide the default configuration of payment methods. Your connected accounts still have the ability to enable and disable individual payment methods after you enable the default configuration. You can also manage the payment methods of individual connected accounts using the [payment method configuration](https://docs.stripe.com/api/payment_method_configurations/create.md) API. If your integration uses [dynamic payment methods](https://docs.stripe.com/connect/dynamic-payment-methods.md), you can create your own payment method configuration. To learn more, see [Multiple configurations for your Connect accounts](https://docs.stripe.com/connect/multiple-payment-method-configurations.md). If you create a custom payment method configuration, it displays as an option in the **Connected accounts payment method configuration** drop-down. ## Make the connected account the settlement merchant To make the connected account the settlement merchant, charge the customer using the `on_behalf_of` parameter when you create or update the invoice. You must set `on_behalf_of` in the API before finalizing an invoice—the Dashboard doesn’t have an interface for invoices you send on behalf of connected accounts. Setting the `on_behalf_of` parameter applies the branding, contact information, and account tax ID of the connected account to the invoice email, invoice PDF, Hosted Invoice Page, and invoice receipt. However, when you use `on_behalf_of` in a *sandbox* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes), emails aren’t sent—similar to standard invoices sent using the API. While testing in a sandbox, you can verify that Stripe created an invoice by checking the [Invoices page](https://dashboard.stripe.com/test/invoices) of the Dashboard. To collect payments on behalf of the connected account, the connected account also needs to have [account capabilities](https://docs.stripe.com/connect/account-capabilities.md) enabled for the relevant payment methods. You can automatically transfer payments for invoices created on behalf of the connected account by using destination charges. For more information about the `on_behalf_of​` parameter, refer to the relevant Connect documentation: - For automatic transfers to the connected account, refer to the `on_behalf_of` parameter details in the [Create a charge](https://docs.stripe.com/connect/charges.md#on_behalf_of) guide. - For information on how to transfer payments manually, refer to [Transfer availability](https://docs.stripe.com/connect/separate-charges-and-transfers.md#transfer-availability). - For a list of account capabilities that are required to collect payments on behalf of the connected account, refer to [Payment method capabilities](https://docs.stripe.com/connect/account-capabilities.md#payment-methods). The following example shows how to use the `on_behalf_of` parameter for a new invoice by using separate charges and transfers: ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d on_behalf_of="{{CONNECTEDACCOUNT_ID}}" \ -d customer="{{CUSTOMER_ID}}" ``` As with standard destination charges, you can set an `application_fee_amount` on invoices. This example shows how to use `on_behalf_of` with a destination charge and application fee. ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d on_behalf_of="{{CONNECTEDACCOUNT_ID}}" \ -d application_fee_amount=10 \ -d "transfer_data[destination]"="{{CONNECTEDACCOUNT_ID}}" \ -d customer="{{CUSTOMER_ID}}" ``` Invoices created on behalf of a connected account don’t support bank transfers payment methods, such as ACH Credit Transfer and paper checks. ## Integrate tax calculation and collection You need to first determine which entity is liable for tax. The entity that’s liable for tax might be your connected account or the platform, depending on your business model. To learn more, see [Stripe Tax with Connect](https://docs.stripe.com/tax/connect.md). ## See also - [Create charges](https://docs.stripe.com/connect/charges.md) - [Share customers across accounts](https://docs.stripe.com/connect/cloning-customers-across-accounts.md) - [Multiple currencies](https://docs.stripe.com/connect/currencies.md)