| [ Web Proxy ] |
| Viewing: https://docs.stripe.com/connect/invoices | [Back] [Original] |
Dont know much about Connect? Check out our Overview article.
You can create invoices for connected accounts that use direct charges or destination charges. You can also take an application fee on these invoices.
Invoice transactions are based on Invoicing pricing.
To create an invoice that directly charges on a connected account, create an invoice while authenticated as the connected account. For this to work, the customer must be defined on the connected account.
As with creating a direct charge on a connected account, you can create a customer on a connected account by using either the platforms publishable key or the connected accounts publishable key. You can also create a token by using shared customers. When you use direct charges, the connected account is responsible for the cost of the Stripe fees, refunds, and chargebacks.
To create an invoice that charges on the platform and creates automatic transfers to a connected account, create an invoice while providing the connected account ID as the transfer_data[destination] value.
For this to work, the customer must be defined on the platform account, and you must create the connected account token by using the platforms publishable key. When using automatic transfers, the platform is the business of record.
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 accounts tax ID and business details on invoice emails, invoice PDFs, Hosted Invoice Pages, and invoice receipts:
on_behalf_of parameter or as the issuer on existing or new invoices, subscriptions, and subscription schedules.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 https://api.stripe.com/v1/tax_ids \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -H "Stripe-Account:" \ -d type=eu_vat \ -d value=DE123456789{{CONNECTED_ACCOUNT_ID}}
Stripe automatically pulls default tax IDs from the invoice issuers 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 https://api.stripe.com/v1/accounts/\ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "settings[invoices][default_account_tax_ids][0]=atxi_123" \ -d "settings[invoices][default_account_tax_ids][1]=atxi_456"{{CONNECTED_ACCOUNT_ID}}
The following example sets issuer on an existing subscription. During invoice finalization, subscription invoices pull in the issuers default tax IDs:
curl https://api.stripe.com/v1/subscriptions/\ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "invoice_settings[issuer][type]=account" \ -d "invoice_settings[issuer][account]={{SUBSCRIPTION_ID}}"{{CONNECTED_ACCOUNT_ID}}
The following example sets issuer during invoice creation:
curl https://api.stripe.com/v1/invoices \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "customer=" \ -d "issuer[type]=account" \ -d "issuer[account]={{CUSTOMER_ID}}" \ -d "transfer_data[destination]={{CONNECTED_ACCOUNT_ID}}"{{CONNECTED_ACCOUNT_ID}}
Alternatively, the on_behalf_of parameter also prints a connected accounts details on the invoice email, invoice PDF, Hosted Invoice Page, and invoice receipt.
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 https://api.stripe.com/v1/subscriptions/\ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "invoice_settings[issuer][type]=account" \ -d "invoice_settings[issuer][account]={{SUBSCRIPTION_ID}}" \ -d "invoice_settings[account_tax_ids][]=txi_123" \ -d "invoice_settings[account_tax_ids][]=txi_456"{{CONNECTED_ACCOUNT_ID}}
The following example sets account_tax_ids during invoice creation:
curl https://api.stripe.com/v1/invoices \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "customer=" \ -d "issuer[type]=account" \ -d "issuer[account]={{CUSTOMER_ID}}" \ -d "transfer_data[destination]={{CUSTOMER_ACCOUNT_ID}}" \ -d "account_tax_ids[]=txi_123" \ -d "account_tax_ids[]=txi_456"{{CUSTOMER_ACCOUNT_ID}}
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 https://api.stripe.com/v1/tax_ids \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d type=eu_vat \ -d value=DE123456789 \ -d "owner[type]=account" \ -d "owner[account]="{{CONNECTED_ACCOUNT_ID}}
On the invoice, you can optionally withhold an application fee. The following example shows an application_fee_amount for an invoice with a direct charge on the connected account:
This example shows an application_fee_amount for an invoice with a destination charge:
Manage the invoice payment methods your connected accounts can use. To enable a default list 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 API.
If your integration uses dynamic payment methods, you can create your own payment method configuration. To learn more, see Multiple configurations for your Connect accounts. If you create a custom payment method configuration, it displays as an option in the Connected accounts payment method configuration drop-down.
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 invoicethe Dashboard doesnt 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, emails arent sentsimilar 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 of the Dashboard.
To collect payments on behalf of the connected account, the connected account also needs to have account capabilities 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:
on_behalf_of parameter details in the Create a charge guide.The following example shows how to use the on_behalf_of parameter for a new invoice by using separate charges and transfers:
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 https://api.stripe.com/v1/invoices \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d "on_behalf_of=" \ -d application_fee_amount=10 \ -d "transfer_data[destination]={{CONNECTED_ACCOUNT_ID}}" \ -d "customer={{CONNECTED_ACCOUNT_ID}}"{{CUSTOMER_ID}}
Invoices created on behalf of a connected account dont support bank transfers payment methods, such as ACH Credit Transfer and paper checks.
You need to first determine which entity is liable for tax. The entity thats liable for tax might be your connected account or the platform, depending on your business model. To learn more, see Stripe Tax with Connect.
| Web Proxy Viewer | New URL | Original Page |