# Tax for software platforms Learn how to enable Stripe Tax for your connected accounts, and collect tax when the connected account is liable for paying the tax. Stripe Tax enables businesses to calculate, collect, and report indirect taxes in over [50 countries](https://docs.stripe.com/tax/supported-countries.md), across hundreds of product categories. As a platform, you can use Stripe tax to offer pre-integrated tax compliance to your connected accounts. Use this guide if your connected accounts are responsible for collecting, filing, and reporting taxes. 1. [Set up your connected accounts for tax](#check-set-up) 1. (Optional) [Assign tax codes to the product catalog](#assign-product-tax-codes) 1. [Integrate tax calculation and collection](#enable-tax-collection) 1. [Access Stripe Tax Reports](#access-reports) ## Set up your connected accounts for tax As a platform, you must make sure that a connected account has their [tax settings and registrations set up](https://docs.stripe.com/tax/set-up.md) before enabling tax calculations. This can be achieved by: ### Connected account using the Stripe Dashboard This option is only available to connected accounts with access to the Stripe Dashboard (for example, [Standard](https://docs.stripe.com/connect/standard-accounts.md) accounts). Ask your connected accounts to use the [Stripe Dashboard to add their head office location, preset tax code, and tax registrations](https://docs.stripe.com/tax/set-up.md). You can also collect the head office location and the preset tax code by enabling Stripe Tax in the connected account onboarding. You can make this adjustment in the [Connect onboarding options](https://dashboard.stripe.com/settings/connect/onboarding-options/tax) in the Dashboard. ### Creating a tax interface within your platform This option allows accounts without access to the Stripe Dashboard (for example, [Custom](https://docs.stripe.com/connect/custom-accounts.md) and [Express](https://docs.stripe.com/connect/express-accounts.md) accounts) to configure Stripe Tax. Your platform must build an interface and [use the Tax Settings API](https://docs.stripe.com/tax/settings-api.md#updating-settings) to set the head office location and other default values for the connected accounts. And your platform must [use the Tax Registrations API](https://docs.stripe.com/tax/registrations-api.md#adding-registration) to add tax registrations for the locations where the connected accounts have tax obligations. ### Using Connect embedded components within your platform You can use [Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components.md) to provide Stripe tax compliance integration to your connected accounts directly on your website with minimal development. Stripe regularly updates our embedded component integrations, so your tax compliance requirements are always current. Stripe offers two components for tax: * Tax settings: Collect the details a connected account needs to calculate taxes, like the head office address and the [preset tax code](https://docs.stripe.com/tax/products-prices-tax-codes-tax-behavior.md#product-tax-code). * Tax registrations: Connected accounts can manage the locations where they have registered with the local tax authority. Adding a registration enables Stripe to calculate and collect taxes in a given location. To embed tax settings and tax registrations into your website: 1. Use the [embedded components quickstart](https://docs.stripe.com/connect/connect-embedded-components/quickstart.md) to set up your environment. 1. [Create an AccountSession](https://docs.stripe.com/connect/connect-embedded-components/quickstart.md#server-endpoint) with `tax_settings: {enabled: true}` and/or `tax_registrations: {enabled: true}`. 1. [Add the tax-settings or tax-registrations component to the DOM](https://docs.stripe.com/connect/connect-embedded-components/quickstart.md#embedded-component). After creating the account session and [initializing ConnectJS](https://docs.stripe.com/connect/get-started-connect-embedded-components.md#account-sessions), you can render each tax component in the frontend: ```jsx // Include this React component import { ConnectTaxSettings, ConnectTaxRegistrations, ConnectComponentsProvider, } from "@stripe/react-connect-js"; return (
{/* You can also use a tab layout */}

Tax Business Details

Tax Registrations

); ``` ```js // Include this element in your HTML const container = document.getElementById("container"); const taxSettings = instance.create("tax_settings"); container.appendChild(taxSettings); const taxRegistrations = stripeConnectInstance.create('tax-registrations'); container.appendChild(taxRegistrations); ``` #### Tax settings component preview The tax settings component allows connected accounts to set their head office address and a [preset tax code](https://docs.stripe.com/tax/products-prices-tax-codes-tax-behavior.md#product-tax-code). Both attributes are required to calculate taxes for the connected account. #### Tax registrations component The tax registrations component allows a connected account to manage its tax registrations. If a connected account doesn’t add a tax registration, but calculates tax for that jurisdiction, Stripe Tax returns a tax amount of `0.00` and sets the [taxability reason to `not_collecting`](https://docs.stripe.com/tax/zero-tax.md#not-registered). Your platform must then check whether connected accounts have configured Stripe Tax to enable tax calculations. On the Dashboard, you can [filter the accounts that are ready to use Stripe Tax](https://dashboard.stripe.com/connect/accounts/overview?connected_merchant%5Btax_settings_status%5D=active). You can also export the accounts from the [connected account overview page](https://dashboard.stripe.com/connect/accounts/overview) with the following Stripe Tax-related columns: * **Tax Settings Status**: the value `active` indicates that the account is ready to use Stripe Tax. The value `pending` indicates that some required fields are [missing](https://docs.stripe.com/api/tax/settings/object.md#tax_settings_object-status_details-pending-missing_fields). * **Tax Threshold Status**: the value `exceeded` indicates that the account’s calculated sales or transactions are over the location’s threshold, and the business likely needs to register for tax. For more information, see [Monitor your obligations](https://docs.stripe.com/tax/monitoring.md). * **Tax Registration Status**: the value `active` indicates that the account has at least one active [tax registration](https://docs.stripe.com/tax/registering.md). You can also check whether an account has configured Stripe Tax by [using the Tax Settings API](https://docs.stripe.com/tax/settings-api.md#checking-settings). ## Assign tax codes to the product catalog To calculate taxes, Stripe Tax requires classifying products into their tax codes. One way to do this is to [supply a preset tax code for each connected account](https://docs.stripe.com/tax/settings-api.md#updating-settings), which is probably sufficient if your connected accounts typically sell a single category of items. However, you might offer your users more control by allowing them to map Tax Codes to each product. You can retrieve a list of [supported product tax codes](https://docs.stripe.com/tax/tax-codes.md) from the Stripe [Tax Code API](https://docs.stripe.com/api/tax_codes.md). You can also allow a subset of this list if your connected accounts only sell specific types of products. ## Integrate tax calculation and collection You need to integrate with Stripe Tax to calculate taxes as part of your checkout flow. ### Payment Links ### Payment Links for one-time payments Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Payment Links](https://docs.stripe.com/tax/payment-links.md): For the Payment Links API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(2)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{Enabled: stripe.Bool(true)}, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax(PaymentLinkCreateParams.AutomaticTax.builder().setEnabled(true).build()) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={"enabled": True}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => ['enabled' => true], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: {enabled: true}, }) ``` For the Payment Links API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [transfer_data[destination]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-transfer_data) with the value of the connected account ID. * (Optional) If you’re [automatically sending invoices](https://docs.stripe.com/payment-links/post-payment.md#automatically-send-paid-invoices), include [invoice_creation[invoice_data][issuer]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-invoice_creation-invoice_data-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [on_behalf_of](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true, Liability = new PaymentLinkAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, TransferData = new PaymentLinkTransferDataOptions { Destination = "<>" }, InvoiceCreation = new PaymentLinkInvoiceCreationOptions { Enabled = true, InvoiceData = new PaymentLinkInvoiceCreationInvoiceDataOptions { Issuer = new PaymentLinkInvoiceCreationInvoiceDataIssuerOptions { Type = "account", Account = "<>", }, }, }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(2)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.PaymentLinkAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.PaymentLinkAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, TransferData: &stripe.PaymentLinkTransferDataParams{ Destination: stripe.String("<>"), }, InvoiceCreation: &stripe.PaymentLinkInvoiceCreationParams{ Enabled: stripe.Bool(true), InvoiceData: &stripe.PaymentLinkInvoiceCreationInvoiceDataParams{ Issuer: &stripe.PaymentLinkInvoiceCreationInvoiceDataIssuerParams{ Type: stripe.String(string(stripe.PaymentLinkInvoiceCreationInvoiceDataIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax( PaymentLinkCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( PaymentLinkCreateParams.AutomaticTax.Liability.builder() .setType(PaymentLinkCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setTransferData( PaymentLinkCreateParams.TransferData.builder().setDestination("<>").build() ) .setInvoiceCreation( PaymentLinkCreateParams.InvoiceCreation.builder() .setEnabled(true) .setInvoiceData( PaymentLinkCreateParams.InvoiceCreation.InvoiceData.builder() .setIssuer( PaymentLinkCreateParams.InvoiceCreation.InvoiceData.Issuer.builder() .setType(PaymentLinkCreateParams.InvoiceCreation.InvoiceData.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: { destination: '<>', }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, transfer_data={"destination": "<>"}, invoice_creation={ "enabled": True, "invoice_data": {"issuer": {"type": "account", "account": "<>"}}, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'transfer_data' => ['destination' => '<>'], 'invoice_creation' => [ 'enabled' => true, 'invoice_data' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: {destination: '<>'}, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, }) ``` For the Payment Links API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * (Optional) If you’re [automatically sending invoices](https://docs.stripe.com/payment-links/post-payment.md#automatically-send-paid-invoices), include [invoice_creation[invoice_data][issuer]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-invoice_creation-invoice_data-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant), include [on_behalf_of](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true, Liability = new PaymentLinkAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, InvoiceCreation = new PaymentLinkInvoiceCreationOptions { Enabled = true, InvoiceData = new PaymentLinkInvoiceCreationInvoiceDataOptions { Issuer = new PaymentLinkInvoiceCreationInvoiceDataIssuerOptions { Type = "account", Account = "<>", }, }, }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(2)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.PaymentLinkAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.PaymentLinkAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, InvoiceCreation: &stripe.PaymentLinkInvoiceCreationParams{ Enabled: stripe.Bool(true), InvoiceData: &stripe.PaymentLinkInvoiceCreationInvoiceDataParams{ Issuer: &stripe.PaymentLinkInvoiceCreationInvoiceDataIssuerParams{ Type: stripe.String(string(stripe.PaymentLinkInvoiceCreationInvoiceDataIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax( PaymentLinkCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( PaymentLinkCreateParams.AutomaticTax.Liability.builder() .setType(PaymentLinkCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setInvoiceCreation( PaymentLinkCreateParams.InvoiceCreation.builder() .setEnabled(true) .setInvoiceData( PaymentLinkCreateParams.InvoiceCreation.InvoiceData.builder() .setIssuer( PaymentLinkCreateParams.InvoiceCreation.InvoiceData.Issuer.builder() .setType(PaymentLinkCreateParams.InvoiceCreation.InvoiceData.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, invoice_creation={ "enabled": True, "invoice_data": {"issuer": {"type": "account", "account": "<>"}}, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'invoice_creation' => [ 'enabled' => true, 'invoice_data' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the payment intent created by the payment link. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Payment Links for subscriptions Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Payment Links](https://docs.stripe.com/tax/payment-links.md): For the Payment Links API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{Enabled: stripe.Bool(true)}, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax(PaymentLinkCreateParams.AutomaticTax.builder().setEnabled(true).build()) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={"enabled": True}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => ['enabled' => true], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: {enabled: true}, }) ``` For the Payment Links API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [transfer_data[destination]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-transfer_data) with the value of the connected account ID. * Include [subscription_data[invoice_settings][issuer]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-subscription_data-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [subscription_data[on_behalf_of]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true, Liability = new PaymentLinkAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, TransferData = new PaymentLinkTransferDataOptions { Destination = "<>" }, SubscriptionData = new PaymentLinkSubscriptionDataOptions { InvoiceSettings = new PaymentLinkSubscriptionDataInvoiceSettingsOptions { Issuer = new PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.PaymentLinkAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.PaymentLinkAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, TransferData: &stripe.PaymentLinkTransferDataParams{ Destination: stripe.String("<>"), }, SubscriptionData: &stripe.PaymentLinkSubscriptionDataParams{ InvoiceSettings: &stripe.PaymentLinkSubscriptionDataInvoiceSettingsParams{ Issuer: &stripe.PaymentLinkSubscriptionDataInvoiceSettingsIssuerParams{ Type: stripe.String(string(stripe.PaymentLinkSubscriptionDataInvoiceSettingsIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax( PaymentLinkCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( PaymentLinkCreateParams.AutomaticTax.Liability.builder() .setType(PaymentLinkCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setTransferData( PaymentLinkCreateParams.TransferData.builder().setDestination("<>").build() ) .setSubscriptionData( PaymentLinkCreateParams.SubscriptionData.builder() .setInvoiceSettings( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.builder() .setIssuer( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.Issuer.builder() .setType( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.Issuer.Type.ACCOUNT ) .setAccount("<>") .build() ) .build() ) .build() ) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: { destination: '<>', }, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, transfer_data={"destination": "<>"}, subscription_data={ "invoice_settings": {"issuer": {"type": "account", "account": "<>"}}, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'transfer_data' => ['destination' => '<>'], 'subscription_data' => [ 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: {destination: '<>'}, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, }) ``` For the Payment Links API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [subscription_data[invoice_settings][issuer]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-subscription_data-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant), include [subscription_data[on_behalf_of]](https://docs.stripe.com/api/payment_links/payment_links/create.md#create_payment_link-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentLinkCreateOptions { LineItems = new List { new PaymentLinkLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new PaymentLinkAutomaticTaxOptions { Enabled = true, Liability = new PaymentLinkAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, SubscriptionData = new PaymentLinkSubscriptionDataOptions { InvoiceSettings = new PaymentLinkSubscriptionDataInvoiceSettingsOptions { Issuer = new PaymentLinkSubscriptionDataInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, }, }; var service = new PaymentLinkService(); PaymentLink paymentLink = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentLinkParams{ LineItems: []*stripe.PaymentLinkLineItemParams{ &stripe.PaymentLinkLineItemParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, AutomaticTax: &stripe.PaymentLinkAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.PaymentLinkAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.PaymentLinkAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, SubscriptionData: &stripe.PaymentLinkSubscriptionDataParams{ InvoiceSettings: &stripe.PaymentLinkSubscriptionDataInvoiceSettingsParams{ Issuer: &stripe.PaymentLinkSubscriptionDataInvoiceSettingsIssuerParams{ Type: stripe.String(string(stripe.PaymentLinkSubscriptionDataInvoiceSettingsIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, }; result, err := paymentlink.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentLinkCreateParams params = PaymentLinkCreateParams.builder() .addLineItem( PaymentLinkCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax( PaymentLinkCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( PaymentLinkCreateParams.AutomaticTax.Liability.builder() .setType(PaymentLinkCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setSubscriptionData( PaymentLinkCreateParams.SubscriptionData.builder() .setInvoiceSettings( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.builder() .setIssuer( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.Issuer.builder() .setType( PaymentLinkCreateParams.SubscriptionData.InvoiceSettings.Issuer.Type.ACCOUNT ) .setAccount("<>") .build() ) .build() ) .build() ) .build(); PaymentLink paymentLink = PaymentLink.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentLink = await stripe.paymentLinks.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, }); ``` ```python import stripe stripe.api_key = "<>" payment_link = stripe.PaymentLink.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, subscription_data={ "invoice_settings": {"issuer": {"type": "account", "account": "<>"}}, }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentLink = $stripe->paymentLinks->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'subscription_data' => [ 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], ]); ``` ```ruby Stripe.api_key = '<>' payment_link = Stripe::PaymentLink.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the payment intent created by the payment link. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Checkout ### Checkout Sessions for one-time payments Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Checkout](https://docs.stripe.com/tax/checkout.md): For the Checkout Sessions API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true }, Mode = "payment", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(2), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{Enabled: stripe.Bool(true)}, Mode: stripe.String(string(stripe.CheckoutSessionModePayment)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax(SessionCreateParams.AutomaticTax.builder().setEnabled(true).build()) .setMode(SessionCreateParams.Mode.PAYMENT) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, }, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={"enabled": True}, mode="payment", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => ['enabled' => true], 'mode' => 'payment', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: {enabled: true}, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Checkout Sessions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [payment_intent_data[transfer_data][destination]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-payment_intent_data-transfer_data-destination) with the value of the connected account ID. * (Optional) If you’re [automatically sending invoices](https://docs.stripe.com/payments/checkout/receipts.md?payment-ui=stripe-hosted#automatically-send-receipts), include [invoice_creation[invoice_data][issuer]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-invoice_creation-invoice_data-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [payment_intent_data[on_behalf_of]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-payment_intent_data-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true, Liability = new Stripe.Checkout.SessionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, PaymentIntentData = new Stripe.Checkout.SessionPaymentIntentDataOptions { TransferData = new Stripe.Checkout.SessionPaymentIntentDataTransferDataOptions { Destination = "<>", }, }, InvoiceCreation = new Stripe.Checkout.SessionInvoiceCreationOptions { Enabled = true, InvoiceData = new Stripe.Checkout.SessionInvoiceCreationInvoiceDataOptions { Issuer = new Stripe.Checkout.SessionInvoiceCreationInvoiceDataIssuerOptions { Type = "account", Account = "<>", }, }, }, Mode = "payment", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(2), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.CheckoutSessionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.CheckoutSessionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, PaymentIntentData: &stripe.CheckoutSessionPaymentIntentDataParams{ TransferData: &stripe.CheckoutSessionPaymentIntentDataTransferDataParams{ Destination: stripe.String("<>"), }, }, InvoiceCreation: &stripe.CheckoutSessionInvoiceCreationParams{ Enabled: stripe.Bool(true), InvoiceData: &stripe.CheckoutSessionInvoiceCreationInvoiceDataParams{ Issuer: &stripe.CheckoutSessionInvoiceCreationInvoiceDataIssuerParams{ Type: stripe.String(string(stripe.CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, Mode: stripe.String(string(stripe.CheckoutSessionModePayment)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax( SessionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SessionCreateParams.AutomaticTax.Liability.builder() .setType(SessionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setPaymentIntentData( SessionCreateParams.PaymentIntentData.builder() .setTransferData( SessionCreateParams.PaymentIntentData.TransferData.builder() .setDestination("<>") .build() ) .build() ) .setInvoiceCreation( SessionCreateParams.InvoiceCreation.builder() .setEnabled(true) .setInvoiceData( SessionCreateParams.InvoiceCreation.InvoiceData.builder() .setIssuer( SessionCreateParams.InvoiceCreation.InvoiceData.Issuer.builder() .setType(SessionCreateParams.InvoiceCreation.InvoiceData.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .setMode(SessionCreateParams.Mode.PAYMENT) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, payment_intent_data: { transfer_data: { destination: '<>', }, }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, payment_intent_data={"transfer_data": {"destination": "<>"}}, invoice_creation={ "enabled": True, "invoice_data": {"issuer": {"type": "account", "account": "<>"}}, }, mode="payment", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'payment_intent_data' => ['transfer_data' => ['destination' => '<>']], 'invoice_creation' => [ 'enabled' => true, 'invoice_data' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], 'mode' => 'payment', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, payment_intent_data: {transfer_data: {destination: '<>'}}, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Checkout Sessions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * (Optional) If you’re [automatically sending invoices](https://docs.stripe.com/payments/checkout/receipts.md?payment-ui=stripe-hosted#automatically-send-receipts), include [invoice_creation[invoice_data][issuer]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-invoice_creation-invoice_data-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant), include [payment_intent_data[on_behalf_of]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-payment_intent_data-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 2 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true, Liability = new Stripe.Checkout.SessionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, InvoiceCreation = new Stripe.Checkout.SessionInvoiceCreationOptions { Enabled = true, InvoiceData = new Stripe.Checkout.SessionInvoiceCreationInvoiceDataOptions { Issuer = new Stripe.Checkout.SessionInvoiceCreationInvoiceDataIssuerOptions { Type = "account", Account = "<>", }, }, }, Mode = "payment", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(2), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.CheckoutSessionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.CheckoutSessionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, InvoiceCreation: &stripe.CheckoutSessionInvoiceCreationParams{ Enabled: stripe.Bool(true), InvoiceData: &stripe.CheckoutSessionInvoiceCreationInvoiceDataParams{ Issuer: &stripe.CheckoutSessionInvoiceCreationInvoiceDataIssuerParams{ Type: stripe.String(string(stripe.CheckoutSessionInvoiceCreationInvoiceDataIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }, Mode: stripe.String(string(stripe.CheckoutSessionModePayment)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(2L).build() ) .setAutomaticTax( SessionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SessionCreateParams.AutomaticTax.Liability.builder() .setType(SessionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setInvoiceCreation( SessionCreateParams.InvoiceCreation.builder() .setEnabled(true) .setInvoiceData( SessionCreateParams.InvoiceCreation.InvoiceData.builder() .setIssuer( SessionCreateParams.InvoiceCreation.InvoiceData.Issuer.builder() .setType(SessionCreateParams.InvoiceCreation.InvoiceData.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .setMode(SessionCreateParams.Mode.PAYMENT) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 2}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, invoice_creation={ "enabled": True, "invoice_data": {"issuer": {"type": "account", "account": "<>"}}, }, mode="payment", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 2, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'invoice_creation' => [ 'enabled' => true, 'invoice_data' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], 'mode' => 'payment', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 2, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_creation: { enabled: true, invoice_data: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'payment', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the Payment Intent created by the Checkout Session. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Checkout Sessions for subscriptions Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Checkout](https://docs.stripe.com/tax/checkout.md): For the Checkout Sessions API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true }, Mode = "subscription", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(1), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{Enabled: stripe.Bool(true)}, Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax(SessionCreateParams.AutomaticTax.builder().setEnabled(true).build()) .setMode(SessionCreateParams.Mode.SUBSCRIPTION) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, }, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={"enabled": True}, mode="subscription", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => ['enabled' => true], 'mode' => 'subscription', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: {enabled: true}, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Checkout Sessions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [subscription_data[transfer_data][destination]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-transfer_data-destination) with the value of the connected account ID. * Include [subscription_data[invoice_settings][issuer]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [subscription_data[on_behalf_of]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true, Liability = new Stripe.Checkout.SessionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, SubscriptionData = new Stripe.Checkout.SessionSubscriptionDataOptions { TransferData = new Stripe.Checkout.SessionSubscriptionDataTransferDataOptions { Destination = "<>", }, InvoiceSettings = new Stripe.Checkout.SessionSubscriptionDataInvoiceSettingsOptions { Issuer = new Stripe.Checkout.SessionSubscriptionDataInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, }, Mode = "subscription", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(1), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.CheckoutSessionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.CheckoutSessionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, SubscriptionData: &stripe.CheckoutSessionSubscriptionDataParams{ TransferData: &stripe.CheckoutSessionSubscriptionDataTransferDataParams{ Destination: stripe.String("<>"), }, InvoiceSettings: &stripe.CheckoutSessionSubscriptionDataInvoiceSettingsParams{ Issuer: &stripe.CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams{ Type: stripe.String("account"), Account: stripe.String("<>"), }, }, }, Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax( SessionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SessionCreateParams.AutomaticTax.Liability.builder() .setType(SessionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setSubscriptionData( SessionCreateParams.SubscriptionData.builder() .setTransferData( SessionCreateParams.SubscriptionData.TransferData.builder() .setDestination("<>") .build() ) .setInvoiceSettings( SessionCreateParams.SubscriptionData.InvoiceSettings.builder() .setIssuer( SessionCreateParams.SubscriptionData.InvoiceSettings.Issuer.builder() .setType(SessionCreateParams.SubscriptionData.InvoiceSettings.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .setMode(SessionCreateParams.Mode.SUBSCRIPTION) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { transfer_data: { destination: '<>', }, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, subscription_data={ "transfer_data": {"destination": "<>"}, "invoice_settings": {"issuer": {"type": "account", "account": "<>"}}, }, mode="subscription", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'subscription_data' => [ 'transfer_data' => ['destination' => '<>'], 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], 'mode' => 'subscription', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { transfer_data: {destination: '<>'}, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Checkout Sessions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [subscription_data[invoice_settings][issuer]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant), include [subscription_data[on_behalf_of]](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session-subscription_data-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Checkout.SessionCreateOptions { LineItems = new List { new Stripe.Checkout.SessionLineItemOptions { Price = "<>", Quantity = 1 }, }, AutomaticTax = new Stripe.Checkout.SessionAutomaticTaxOptions { Enabled = true, Liability = new Stripe.Checkout.SessionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, SubscriptionData = new Stripe.Checkout.SessionSubscriptionDataOptions { InvoiceSettings = new Stripe.Checkout.SessionSubscriptionDataInvoiceSettingsOptions { Issuer = new Stripe.Checkout.SessionSubscriptionDataInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, }, Mode = "subscription", SuccessUrl = "https://example.com/success", CancelUrl = "https://example.com/cancel", }; var service = new Stripe.Checkout.SessionService(); Stripe.Checkout.Session session = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.CheckoutSessionParams{ LineItems: []*stripe.CheckoutSessionLineItemParams{ &stripe.CheckoutSessionLineItemParams{ Price: stripe.String("<>"), Quantity: stripe.Int64(1), }, }, AutomaticTax: &stripe.CheckoutSessionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.CheckoutSessionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.CheckoutSessionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, SubscriptionData: &stripe.CheckoutSessionSubscriptionDataParams{ InvoiceSettings: &stripe.CheckoutSessionSubscriptionDataInvoiceSettingsParams{ Issuer: &stripe.CheckoutSessionSubscriptionDataInvoiceSettingsIssuerParams{ Type: stripe.String("account"), Account: stripe.String("<>"), }, }, }, Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)), SuccessURL: stripe.String("https://example.com/success"), CancelURL: stripe.String("https://example.com/cancel"), }; result, err := session.New(params); ``` ```java Stripe.apiKey = "<>"; SessionCreateParams params = SessionCreateParams.builder() .addLineItem( SessionCreateParams.LineItem.builder().setPrice("<>").setQuantity(1L).build() ) .setAutomaticTax( SessionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SessionCreateParams.AutomaticTax.Liability.builder() .setType(SessionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setSubscriptionData( SessionCreateParams.SubscriptionData.builder() .setInvoiceSettings( SessionCreateParams.SubscriptionData.InvoiceSettings.builder() .setIssuer( SessionCreateParams.SubscriptionData.InvoiceSettings.Issuer.builder() .setType(SessionCreateParams.SubscriptionData.InvoiceSettings.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build() ) .setMode(SessionCreateParams.Mode.SUBSCRIPTION) .setSuccessUrl("https://example.com/success") .setCancelUrl("https://example.com/cancel") .build(); Session session = Session.create(params); ``` ```node const stripe = require('stripe')('<>'); const session = await stripe.checkout.sessions.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }); ``` ```python import stripe stripe.api_key = "<>" session = stripe.checkout.Session.create( line_items=[{"price": "<>", "quantity": 1}], automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, subscription_data={ "invoice_settings": {"issuer": {"type": "account", "account": "<>"}}, }, mode="subscription", success_url="https://example.com/success", cancel_url="https://example.com/cancel", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $session = $stripe->checkout->sessions->create([ 'line_items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'subscription_data' => [ 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ], 'mode' => 'subscription', 'success_url' => 'https://example.com/success', 'cancel_url' => 'https://example.com/cancel', ]); ``` ```ruby Stripe.api_key = '<>' session = Stripe::Checkout::Session.create({ line_items: [ { price: '<>', quantity: 1, }, ], automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, subscription_data: { invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }, mode: 'subscription', success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the Payment Intent created by the Checkout Session. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Billing ### Subscriptions Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Subscriptions](https://docs.stripe.com/tax/subscriptions.md): For the Subscriptions API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new SubscriptionCreateOptions { Items = new List { new SubscriptionItemOptions { Price = "<>", Quantity = 1 }, }, Customer = "<>", AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = true }, }; var service = new SubscriptionService(); Subscription subscription = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.SubscriptionParams{ Items: []*stripe.SubscriptionItemsParams{ &stripe.SubscriptionItemsParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, Customer: stripe.String("<>"), AutomaticTax: &stripe.SubscriptionAutomaticTaxParams{Enabled: stripe.Bool(true)}, }; result, err := subscription.New(params); ``` ```java Stripe.apiKey = "<>"; SubscriptionCreateParams params = SubscriptionCreateParams.builder() .addItem(SubscriptionCreateParams.Item.builder().setPrice("<>").setQuantity(1L).build()) .setCustomer("<>") .setAutomaticTax(SubscriptionCreateParams.AutomaticTax.builder().setEnabled(true).build()) .build(); Subscription subscription = Subscription.create(params); ``` ```node const stripe = require('stripe')('<>'); const subscription = await stripe.subscriptions.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: { enabled: true, }, }); ``` ```python import stripe stripe.api_key = "<>" subscription = stripe.Subscription.create( items=[{"price": "<>", "quantity": 1}], customer="<>", automatic_tax={"enabled": True}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $subscription = $stripe->subscriptions->create([ 'items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'customer' => '<>', 'automatic_tax' => ['enabled' => true], ]); ``` ```ruby Stripe.api_key = '<>' subscription = Stripe::Subscription.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: {enabled: true}, }) ``` For the Subscriptions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [transfer_data[destination]](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-transfer_data-destination) with the value of the connected account ID. * Include [invoice_settings[issuer]](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. In some jurisdictions, like the European Union, invoice PDFs are used as the tax instrument and the invoice issuer must match the entity *liable for tax* at all times. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [on_behalf_of](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new SubscriptionCreateOptions { Items = new List { new SubscriptionItemOptions { Price = "<>", Quantity = 1 }, }, Customer = "<>", AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = true, Liability = new SubscriptionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, TransferData = new SubscriptionTransferDataOptions { Destination = "<>" }, InvoiceSettings = new SubscriptionInvoiceSettingsOptions { Issuer = new SubscriptionInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, }; var service = new SubscriptionService(); Subscription subscription = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.SubscriptionParams{ Items: []*stripe.SubscriptionItemsParams{ &stripe.SubscriptionItemsParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, Customer: stripe.String("<>"), AutomaticTax: &stripe.SubscriptionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.SubscriptionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.SubscriptionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, TransferData: &stripe.SubscriptionTransferDataParams{ Destination: stripe.String("<>"), }, InvoiceSettings: &stripe.SubscriptionInvoiceSettingsParams{ Issuer: &stripe.SubscriptionInvoiceSettingsIssuerParams{ Type: stripe.String(string(stripe.SubscriptionInvoiceSettingsIssuerTypeAccount)), Account: stripe.String("<>"), }, }, }; result, err := subscription.New(params); ``` ```java Stripe.apiKey = "<>"; SubscriptionCreateParams params = SubscriptionCreateParams.builder() .addItem(SubscriptionCreateParams.Item.builder().setPrice("<>").setQuantity(1L).build()) .setCustomer("<>") .setAutomaticTax( SubscriptionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SubscriptionCreateParams.AutomaticTax.Liability.builder() .setType(SubscriptionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setTransferData( SubscriptionCreateParams.TransferData.builder().setDestination("<>").build() ) .setInvoiceSettings( SubscriptionCreateParams.InvoiceSettings.builder() .setIssuer( SubscriptionCreateParams.InvoiceSettings.Issuer.builder() .setType(SubscriptionCreateParams.InvoiceSettings.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .build(); Subscription subscription = Subscription.create(params); ``` ```node const stripe = require('stripe')('<>'); const subscription = await stripe.subscriptions.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: { destination: '<>', }, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }); ``` ```python import stripe stripe.api_key = "<>" subscription = stripe.Subscription.create( items=[{"price": "<>", "quantity": 1}], customer="<>", automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, transfer_data={"destination": "<>"}, invoice_settings={"issuer": {"type": "account", "account": "<>"}}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $subscription = $stripe->subscriptions->create([ 'items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'customer' => '<>', 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'transfer_data' => ['destination' => '<>'], 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], ]); ``` ```ruby Stripe.api_key = '<>' subscription = Stripe::Subscription.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: {destination: '<>'}, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, }) ``` For the Subscriptions API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [invoice_settings[issuer]](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-invoice_settings-issuer) with `type=account` and `account` with the value of the connected account ID. In some jurisdictions, like the European Union, invoice PDFs are used as the tax instrument and the invoice issuer must match the entity *liable for tax* at all times. * Include [on_behalf_of](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new SubscriptionCreateOptions { Items = new List { new SubscriptionItemOptions { Price = "<>", Quantity = 1 }, }, Customer = "<>", AutomaticTax = new SubscriptionAutomaticTaxOptions { Enabled = true, Liability = new SubscriptionAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, InvoiceSettings = new SubscriptionInvoiceSettingsOptions { Issuer = new SubscriptionInvoiceSettingsIssuerOptions { Type = "account", Account = "<>", }, }, OnBehalfOf = "<>", }; var service = new SubscriptionService(); Subscription subscription = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.SubscriptionParams{ Items: []*stripe.SubscriptionItemsParams{ &stripe.SubscriptionItemsParams{Price: stripe.String("<>"), Quantity: stripe.Int64(1)}, }, Customer: stripe.String("<>"), AutomaticTax: &stripe.SubscriptionAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.SubscriptionAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.SubscriptionAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, InvoiceSettings: &stripe.SubscriptionInvoiceSettingsParams{ Issuer: &stripe.SubscriptionInvoiceSettingsIssuerParams{ Type: stripe.String(string(stripe.SubscriptionInvoiceSettingsIssuerTypeAccount)), Account: stripe.String("<>"), }, }, OnBehalfOf: stripe.String("<>"), }; result, err := subscription.New(params); ``` ```java Stripe.apiKey = "<>"; SubscriptionCreateParams params = SubscriptionCreateParams.builder() .addItem(SubscriptionCreateParams.Item.builder().setPrice("<>").setQuantity(1L).build()) .setCustomer("<>") .setAutomaticTax( SubscriptionCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( SubscriptionCreateParams.AutomaticTax.Liability.builder() .setType(SubscriptionCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setInvoiceSettings( SubscriptionCreateParams.InvoiceSettings.builder() .setIssuer( SubscriptionCreateParams.InvoiceSettings.Issuer.builder() .setType(SubscriptionCreateParams.InvoiceSettings.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setOnBehalfOf("<>") .build(); Subscription subscription = Subscription.create(params); ``` ```node const stripe = require('stripe')('<>'); const subscription = await stripe.subscriptions.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, on_behalf_of: '<>', }); ``` ```python import stripe stripe.api_key = "<>" subscription = stripe.Subscription.create( items=[{"price": "<>", "quantity": 1}], customer="<>", automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, invoice_settings={"issuer": {"type": "account", "account": "<>"}}, on_behalf_of="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $subscription = $stripe->subscriptions->create([ 'items' => [ [ 'price' => '<>', 'quantity' => 1, ], ], 'customer' => '<>', 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'invoice_settings' => [ 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ], 'on_behalf_of' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' subscription = Stripe::Subscription.create({ items: [ { price: '<>', quantity: 1, }, ], customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, invoice_settings: { issuer: { type: 'account', account: '<>', }, }, on_behalf_of: '<>', }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the payment intent created by the subscription invoice. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Invoicing Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Invoicing](https://docs.stripe.com/tax/invoicing.md): For the Invoices API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new InvoiceCreateOptions { Customer = "<>", AutomaticTax = new InvoiceAutomaticTaxOptions { Enabled = true }, }; var service = new InvoiceService(); Invoice invoice = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.InvoiceParams{ Customer: stripe.String("<>"), AutomaticTax: &stripe.InvoiceAutomaticTaxParams{Enabled: stripe.Bool(true)}, }; result, err := invoice.New(params); ``` ```java Stripe.apiKey = "<>"; InvoiceCreateParams params = InvoiceCreateParams.builder() .setCustomer("<>") .setAutomaticTax(InvoiceCreateParams.AutomaticTax.builder().setEnabled(true).build()) .build(); Invoice invoice = Invoice.create(params); ``` ```node const stripe = require('stripe')('<>'); const invoice = await stripe.invoices.create({ customer: '<>', automatic_tax: { enabled: true, }, }); ``` ```python import stripe stripe.api_key = "<>" invoice = stripe.Invoice.create( customer="<>", automatic_tax={"enabled": True}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $invoice = $stripe->invoices->create([ 'customer' => '<>', 'automatic_tax' => ['enabled' => true], ]); ``` ```ruby Stripe.api_key = '<>' invoice = Stripe::Invoice.create({ customer: '<>', automatic_tax: {enabled: true}, }) ``` For the Invoices API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/invoices/create.md#create_invoice-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [transfer_data[destination]](https://docs.stripe.com/api/invoices/create.md#create_invoice-transfer_data-destination) with the value of the connected account ID. * Include [issuer](https://docs.stripe.com/api/invoices/create.md#create_invoice-issuer) with `type=account` and `account` with the value of the connected account ID. In some jurisdictions, like the European Union, invoice PDFs are used as the tax instrument and the invoice issuer must match the entity *liable for tax* at all times. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant), include [on_behalf_of](https://docs.stripe.com/api/invoices/create.md#create_invoice-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new InvoiceCreateOptions { Customer = "<>", AutomaticTax = new InvoiceAutomaticTaxOptions { Enabled = true, Liability = new InvoiceAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, TransferData = new InvoiceTransferDataOptions { Destination = "<>" }, Issuer = new InvoiceIssuerOptions { Type = "account", Account = "<>" }, }; var service = new InvoiceService(); Invoice invoice = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.InvoiceParams{ Customer: stripe.String("<>"), AutomaticTax: &stripe.InvoiceAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.InvoiceAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.InvoiceAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, TransferData: &stripe.InvoiceTransferDataParams{ Destination: stripe.String("<>"), }, Issuer: &stripe.InvoiceIssuerParams{ Type: stripe.String(string(stripe.InvoiceIssuerTypeAccount)), Account: stripe.String("<>"), }, }; result, err := invoice.New(params); ``` ```java Stripe.apiKey = "<>"; InvoiceCreateParams params = InvoiceCreateParams.builder() .setCustomer("<>") .setAutomaticTax( InvoiceCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( InvoiceCreateParams.AutomaticTax.Liability.builder() .setType(InvoiceCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setTransferData( InvoiceCreateParams.TransferData.builder().setDestination("<>").build() ) .setIssuer( InvoiceCreateParams.Issuer.builder() .setType(InvoiceCreateParams.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build(); Invoice invoice = Invoice.create(params); ``` ```node const stripe = require('stripe')('<>'); const invoice = await stripe.invoices.create({ customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: { destination: '<>', }, issuer: { type: 'account', account: '<>', }, }); ``` ```python import stripe stripe.api_key = "<>" invoice = stripe.Invoice.create( customer="<>", automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, transfer_data={"destination": "<>"}, issuer={"type": "account", "account": "<>"}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $invoice = $stripe->invoices->create([ 'customer' => '<>', 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'transfer_data' => ['destination' => '<>'], 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ]); ``` ```ruby Stripe.api_key = '<>' invoice = Stripe::Invoice.create({ customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, transfer_data: {destination: '<>'}, issuer: { type: 'account', account: '<>', }, }) ``` For the Invoices API calls: * Include [automatic_tax[liability]](https://docs.stripe.com/api/invoices/create.md#create_invoice-automatic_tax-liability) with `type=account` and `account` with the value of the connected account ID. * Include [issuer](https://docs.stripe.com/api/invoices/create.md#create_invoice-issuer) with `type=account` and `account` with the value of the connected account ID. In some jurisdictions, like the European Union, invoice PDFs are used as the tax instrument and the invoice issuer must match the entity *liable for tax* at all times. * (Optional) If the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant), include [on_behalf_of](https://docs.stripe.com/api/invoices/create.md#create_invoice-on_behalf_of) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new InvoiceCreateOptions { Customer = "<>", AutomaticTax = new InvoiceAutomaticTaxOptions { Enabled = true, Liability = new InvoiceAutomaticTaxLiabilityOptions { Type = "account", Account = "<>", }, }, Issuer = new InvoiceIssuerOptions { Type = "account", Account = "<>" }, }; var service = new InvoiceService(); Invoice invoice = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.InvoiceParams{ Customer: stripe.String("<>"), AutomaticTax: &stripe.InvoiceAutomaticTaxParams{ Enabled: stripe.Bool(true), Liability: &stripe.InvoiceAutomaticTaxLiabilityParams{ Type: stripe.String(string(stripe.InvoiceAutomaticTaxLiabilityTypeAccount)), Account: stripe.String("<>"), }, }, Issuer: &stripe.InvoiceIssuerParams{ Type: stripe.String(string(stripe.InvoiceIssuerTypeAccount)), Account: stripe.String("<>"), }, }; result, err := invoice.New(params); ``` ```java Stripe.apiKey = "<>"; InvoiceCreateParams params = InvoiceCreateParams.builder() .setCustomer("<>") .setAutomaticTax( InvoiceCreateParams.AutomaticTax.builder() .setEnabled(true) .setLiability( InvoiceCreateParams.AutomaticTax.Liability.builder() .setType(InvoiceCreateParams.AutomaticTax.Liability.Type.ACCOUNT) .setAccount("<>") .build() ) .build() ) .setIssuer( InvoiceCreateParams.Issuer.builder() .setType(InvoiceCreateParams.Issuer.Type.ACCOUNT) .setAccount("<>") .build() ) .build(); Invoice invoice = Invoice.create(params); ``` ```node const stripe = require('stripe')('<>'); const invoice = await stripe.invoices.create({ customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, issuer: { type: 'account', account: '<>', }, }); ``` ```python import stripe stripe.api_key = "<>" invoice = stripe.Invoice.create( customer="<>", automatic_tax={ "enabled": True, "liability": {"type": "account", "account": "<>"}, }, issuer={"type": "account", "account": "<>"}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $invoice = $stripe->invoices->create([ 'customer' => '<>', 'automatic_tax' => [ 'enabled' => true, 'liability' => [ 'type' => 'account', 'account' => '<>', ], ], 'issuer' => [ 'type' => 'account', 'account' => '<>', ], ]); ``` ```ruby Stripe.api_key = '<>' invoice = Stripe::Invoice.create({ customer: '<>', automatic_tax: { enabled: true, liability: { type: 'account', account: '<>', }, }, issuer: { type: 'account', account: '<>', }, }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the payment intent created by the subscription invoice. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` ### Custom flows using the Stripe Tax API ### Payment Intents Pick one of the currently supported [charge types](https://docs.stripe.com/connect/charges.md#types) that allow the connected account to be *liable for tax* with [Stripe Tax API](https://docs.stripe.com/tax/custom.md): For the Tax Calculation API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Tax.CalculationCreateOptions { Currency = "usd", LineItems = new List { new Stripe.Tax.CalculationLineItemOptions { Amount = 1000, Reference = "L1" }, }, Customer = "<>", }; var service = new Stripe.Tax.CalculationService(); Stripe.Tax.Calculation calculation = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TaxCalculationParams{ Currency: stripe.String(string(stripe.CurrencyUSD)), LineItems: []*stripe.TaxCalculationLineItemParams{ &stripe.TaxCalculationLineItemParams{ Amount: stripe.Int64(1000), Reference: stripe.String("L1"), }, }, Customer: stripe.String("<>"), }; result, err := calculation.New(params); ``` ```java Stripe.apiKey = "<>"; CalculationCreateParams params = CalculationCreateParams.builder() .setCurrency("usd") .addLineItem( CalculationCreateParams.LineItem.builder().setAmount(1000L).setReference("L1").build() ) .setCustomer("<>") .build(); Calculation calculation = Calculation.create(params); ``` ```node const stripe = require('stripe')('<>'); const calculation = await stripe.tax.calculations.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }); ``` ```python import stripe stripe.api_key = "<>" calculation = stripe.tax.Calculation.create( currency="usd", line_items=[{"amount": 1000, "reference": "L1"}], customer="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $calculation = $stripe->tax->calculations->create([ 'currency' => 'usd', 'line_items' => [ [ 'amount' => 1000, 'reference' => 'L1', ], ], 'customer' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' calculation = Stripe::Tax::Calculation.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }) ``` For the Payment Intents API calls: * Include the `Stripe-Account` header with the value of the connected account ID. * Include [amount](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-amount) with the `amount_total` returned by the tax calculation. * Include [metadata[tax_calculation]](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-metadata) with the `id` returned by the tax calculation. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentIntentCreateOptions { Amount = 1000, Currency = "usd", Customer = "<>", Metadata = new Dictionary { { "tax_calculation", "<>" } }, }; var service = new PaymentIntentService(); PaymentIntent paymentIntent = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String("<>"), }; params.AddMetadata("tax_calculation", "<>") result, err := paymentintent.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setCustomer("<>") .putMetadata("tax_calculation", "<>") .build(); PaymentIntent paymentIntent = PaymentIntent.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentIntent = await stripe.paymentIntents.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: { tax_calculation: '<>', }, }); ``` ```python import stripe stripe.api_key = "<>" payment_intent = stripe.PaymentIntent.create( amount=1000, currency="usd", customer="<>", metadata={"tax_calculation": "<>"}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentIntent = $stripe->paymentIntents->create([ 'amount' => 1000, 'currency' => 'usd', 'customer' => '<>', 'metadata' => ['tax_calculation' => '<>'], ]); ``` ```ruby Stripe.api_key = '<>' payment_intent = Stripe::PaymentIntent.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: {tax_calculation: '<>'}, }) ``` For the Tax Calculation API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Tax.CalculationCreateOptions { Currency = "usd", LineItems = new List { new Stripe.Tax.CalculationLineItemOptions { Amount = 1000, Reference = "L1" }, }, Customer = "<>", }; var service = new Stripe.Tax.CalculationService(); Stripe.Tax.Calculation calculation = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TaxCalculationParams{ Currency: stripe.String(string(stripe.CurrencyUSD)), LineItems: []*stripe.TaxCalculationLineItemParams{ &stripe.TaxCalculationLineItemParams{ Amount: stripe.Int64(1000), Reference: stripe.String("L1"), }, }, Customer: stripe.String("<>"), }; result, err := calculation.New(params); ``` ```java Stripe.apiKey = "<>"; CalculationCreateParams params = CalculationCreateParams.builder() .setCurrency("usd") .addLineItem( CalculationCreateParams.LineItem.builder().setAmount(1000L).setReference("L1").build() ) .setCustomer("<>") .build(); Calculation calculation = Calculation.create(params); ``` ```node const stripe = require('stripe')('<>'); const calculation = await stripe.tax.calculations.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }); ``` ```python import stripe stripe.api_key = "<>" calculation = stripe.tax.Calculation.create( currency="usd", line_items=[{"amount": 1000, "reference": "L1"}], customer="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $calculation = $stripe->tax->calculations->create([ 'currency' => 'usd', 'line_items' => [ [ 'amount' => 1000, 'reference' => 'L1', ], ], 'customer' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' calculation = Stripe::Tax::Calculation.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }) ``` For the Payment Intents API calls: * Include [amount](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-amount) with the `amount_total` returned by the tax calculation. * Include [metadata[tax_calculation]](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-metadata) with the `id` returned by the tax calculation. * Include [transfer_data[destination]](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-transfer_data-destination) with the value of the connected account ID. * You can use this regardless of the [settlement merchant](https://docs.stripe.com/connect/destination-charges.md#settlement-merchant) as specified by the [on_behalf_of](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-on_behalf_of) parameter. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentIntentCreateOptions { Amount = 1000, Currency = "usd", Customer = "<>", Metadata = new Dictionary { { "tax_calculation", "<>" } }, TransferData = new PaymentIntentTransferDataOptions { Destination = "<>" }, }; var service = new PaymentIntentService(); PaymentIntent paymentIntent = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String("<>"), TransferData: &stripe.PaymentIntentTransferDataParams{ Destination: stripe.String("<>"), }, }; params.AddMetadata("tax_calculation", "<>") result, err := paymentintent.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setCustomer("<>") .putMetadata("tax_calculation", "<>") .setTransferData( PaymentIntentCreateParams.TransferData.builder() .setDestination("<>") .build() ) .build(); PaymentIntent paymentIntent = PaymentIntent.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentIntent = await stripe.paymentIntents.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: { tax_calculation: '<>', }, transfer_data: { destination: '<>', }, }); ``` ```python import stripe stripe.api_key = "<>" payment_intent = stripe.PaymentIntent.create( amount=1000, currency="usd", customer="<>", metadata={"tax_calculation": "<>"}, transfer_data={"destination": "<>"}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentIntent = $stripe->paymentIntents->create([ 'amount' => 1000, 'currency' => 'usd', 'customer' => '<>', 'metadata' => ['tax_calculation' => '<>'], 'transfer_data' => ['destination' => '<>'], ]); ``` ```ruby Stripe.api_key = '<>' payment_intent = Stripe::PaymentIntent.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: {tax_calculation: '<>'}, transfer_data: {destination: '<>'}, }) ``` In this scenario, the connected account is liable for tax on the transaction, even though the platform owns the `PaymentIntent`. Think of the platform as facilitating a transaction between the connected account and the account’s customer. When you call the tax calculation API, calculate tax for the connected account by including the `Stripe-Account` header with the connected account ID. Calculating tax for the connected account also simplifies tax reporting and filing by keeping the tax on connected account transactions separate from tax on transactions made directly with the platform. For the Tax Calculation API calls: * Include the `Stripe-Account` header with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Tax.CalculationCreateOptions { Currency = "usd", LineItems = new List { new Stripe.Tax.CalculationLineItemOptions { Amount = 1000, Reference = "L1" }, }, Customer = "<>", }; var service = new Stripe.Tax.CalculationService(); Stripe.Tax.Calculation calculation = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TaxCalculationParams{ Currency: stripe.String(string(stripe.CurrencyUSD)), LineItems: []*stripe.TaxCalculationLineItemParams{ &stripe.TaxCalculationLineItemParams{ Amount: stripe.Int64(1000), Reference: stripe.String("L1"), }, }, Customer: stripe.String("<>"), }; result, err := calculation.New(params); ``` ```java Stripe.apiKey = "<>"; CalculationCreateParams params = CalculationCreateParams.builder() .setCurrency("usd") .addLineItem( CalculationCreateParams.LineItem.builder().setAmount(1000L).setReference("L1").build() ) .setCustomer("<>") .build(); Calculation calculation = Calculation.create(params); ``` ```node const stripe = require('stripe')('<>'); const calculation = await stripe.tax.calculations.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }); ``` ```python import stripe stripe.api_key = "<>" calculation = stripe.tax.Calculation.create( currency="usd", line_items=[{"amount": 1000, "reference": "L1"}], customer="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $calculation = $stripe->tax->calculations->create([ 'currency' => 'usd', 'line_items' => [ [ 'amount' => 1000, 'reference' => 'L1', ], ], 'customer' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' calculation = Stripe::Tax::Calculation.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }) ``` For the Payment Intents API calls: * Include [amount](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-amount) with the `amount_total` returned by the tax calculation. * Include [metadata[tax_calculation]](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-metadata) with the `id` returned by the tax calculation. * _Remember to include [on_behalf_of](https://docs.stripe.com/api/payment_intents/create.md#create_payment_intent-on_behalf_of) with the value of the connected account ID if the connected account is the [settlement merchant](https://docs.stripe.com/connect/separate-charges-and-transfers.md#settlement-merchant)_. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new PaymentIntentCreateOptions { Amount = 1000, Currency = "usd", Customer = "<>", Metadata = new Dictionary { { "tax_calculation", "<>" } }, }; var service = new PaymentIntentService(); PaymentIntent paymentIntent = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String("<>"), }; params.AddMetadata("tax_calculation", "<>") result, err := paymentintent.New(params); ``` ```java Stripe.apiKey = "<>"; PaymentIntentCreateParams params = PaymentIntentCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setCustomer("<>") .putMetadata("tax_calculation", "<>") .build(); PaymentIntent paymentIntent = PaymentIntent.create(params); ``` ```node const stripe = require('stripe')('<>'); const paymentIntent = await stripe.paymentIntents.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: { tax_calculation: '<>', }, }); ``` ```python import stripe stripe.api_key = "<>" payment_intent = stripe.PaymentIntent.create( amount=1000, currency="usd", customer="<>", metadata={"tax_calculation": "<>"}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $paymentIntent = $stripe->paymentIntents->create([ 'amount' => 1000, 'currency' => 'usd', 'customer' => '<>', 'metadata' => ['tax_calculation' => '<>'], ]); ``` ```ruby Stripe.api_key = '<>' payment_intent = Stripe::PaymentIntent.create({ amount: 1000, currency: 'usd', customer: '<>', metadata: {tax_calculation: '<>'}, }) ``` For the Transfers API calls: * Include [source_transaction](https://docs.stripe.com/api/transfers/create.md#create_transfer-source_transaction) to tie the transfer to the Payment Intent. * Include [destination](https://docs.stripe.com/api/transfers/create.md#create_transfer-destination) with the value of the connected account ID. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new TransferCreateOptions { Amount = 1000, Currency = "usd", SourceTransaction = "<>", Destination = "<>", }; var service = new TransferService(); Transfer transfer = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TransferParams{ Amount: stripe.Int64(1000), Currency: stripe.String(string(stripe.CurrencyUSD)), SourceTransaction: stripe.String("<>"), Destination: stripe.String("<>"), }; result, err := transfer.New(params); ``` ```java Stripe.apiKey = "<>"; TransferCreateParams params = TransferCreateParams.builder() .setAmount(1000L) .setCurrency("usd") .setSourceTransaction("<>") .setDestination("<>") .build(); Transfer transfer = Transfer.create(params); ``` ```node const stripe = require('stripe')('<>'); const transfer = await stripe.transfers.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }); ``` ```python import stripe stripe.api_key = "<>" transfer = stripe.Transfer.create( amount=1000, currency="usd", source_transaction="<>", destination="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $transfer = $stripe->transfers->create([ 'amount' => 1000, 'currency' => 'usd', 'source_transaction' => '<>', 'destination' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' transfer = Stripe::Transfer.create({ amount: 1000, currency: 'usd', source_transaction: '<>', destination: '<>', }) ``` In this scenario, the connected account is liable for tax on the transaction, even though the platform owns the `PaymentIntent`. Think of the platform as facilitating a transaction between the connected account and the account’s customer. When you call the tax calculation API, calculate tax for the connected account by including the `Stripe-Account` header with the connected account ID. Calculating tax for the connected account also simplifies tax reporting and filing by keeping the tax on connected account transactions separate from tax on transactions made directly with the platform. You must also [create tax transactions](https://docs.stripe.com/tax/custom.md#tax-transaction) to record the tax you collect from customers and [account for refunds](https://docs.stripe.com/tax/custom.md#reversals). ### Off-Stripe payments Check how to integrate using [Stripe Tax API](https://docs.stripe.com/tax/custom.md) and to allow the connected account to be *liable for tax*, include the `Stripe-Account` header with the value of the connected account ID in the Tax Calculation API calls: ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Tax.CalculationCreateOptions { Currency = "usd", LineItems = new List { new Stripe.Tax.CalculationLineItemOptions { Amount = 1000, Reference = "L1" }, }, Customer = "<>", }; var service = new Stripe.Tax.CalculationService(); Stripe.Tax.Calculation calculation = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.TaxCalculationParams{ Currency: stripe.String(string(stripe.CurrencyUSD)), LineItems: []*stripe.TaxCalculationLineItemParams{ &stripe.TaxCalculationLineItemParams{ Amount: stripe.Int64(1000), Reference: stripe.String("L1"), }, }, Customer: stripe.String("<>"), }; result, err := calculation.New(params); ``` ```java Stripe.apiKey = "<>"; CalculationCreateParams params = CalculationCreateParams.builder() .setCurrency("usd") .addLineItem( CalculationCreateParams.LineItem.builder().setAmount(1000L).setReference("L1").build() ) .setCustomer("<>") .build(); Calculation calculation = Calculation.create(params); ``` ```node const stripe = require('stripe')('<>'); const calculation = await stripe.tax.calculations.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }); ``` ```python import stripe stripe.api_key = "<>" calculation = stripe.tax.Calculation.create( currency="usd", line_items=[{"amount": 1000, "reference": "L1"}], customer="<>", ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $calculation = $stripe->tax->calculations->create([ 'currency' => 'usd', 'line_items' => [ [ 'amount' => 1000, 'reference' => 'L1', ], ], 'customer' => '<>', ]); ``` ```ruby Stripe.api_key = '<>' calculation = Stripe::Tax::Calculation.create({ currency: 'usd', line_items: [ { amount: 1000, reference: 'L1', }, ], customer: '<>', }) ``` You must also [create tax transactions](https://docs.stripe.com/tax/custom.md#tax-transaction) to record the tax you collect from customers and [account for refunds](https://docs.stripe.com/tax/custom.md#reversals). After you implement it, Stripe automatically starts collecting tax in jurisdictions where the user has an active registration. Independent of the integration, your connected account receives a credit for the collected tax amount by default. ## Access Stripe Tax Reports Your connected accounts can use [Stripe Tax reports](https://docs.stripe.com/tax/reports.md) to help them correctly file and remit tax. ### Connected account use the Stripe Dashboard This option is only available to accounts with access to the Stripe Dashboard (for example, Standard accounts). The connected accounts can access their Stripe Tax reports using the [Tax Reporting](https://docs.stripe.com/tax/reports.md#how-to-access-data-using-exports-and-reports) functionality in the Stripe Dashboard. ### Use the Stripe API Use this option for accounts without access to the Stripe Dashboard (for example, Custom and Express accounts). Platforms can download [itemized tax transactions](https://docs.stripe.com/tax/reports.md#itemized-exports) for their connected accounts using the [Report API](https://docs.stripe.com/reports/api.md) with the [connected_account_tax.transactions.itemized.2](https://docs.stripe.com/reports/report-types/connect.md) report type. When a platform runs the following command, they download all 2022 transactions from all connected accounts: ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Reporting.ReportRunCreateOptions { ReportType = "connected_account_tax.transactions.itemized.2", Parameters = new Stripe.Reporting.ReportRunParametersOptions { IntervalStart = DateTimeOffset.FromUnixTimeSeconds(1641013200).UtcDateTime, IntervalEnd = DateTimeOffset.FromUnixTimeSeconds(1672549200).UtcDateTime, }, }; var service = new Stripe.Reporting.ReportRunService(); Stripe.Reporting.ReportRun reportRun = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.ReportingReportRunParams{ ReportType: stripe.String("connected_account_tax.transactions.itemized.2"), Parameters: &stripe.ReportingReportRunParametersParams{ IntervalStart: stripe.Int64(1641013200), IntervalEnd: stripe.Int64(1672549200), }, }; result, err := reportrun.New(params); ``` ```java Stripe.apiKey = "<>"; ReportRunCreateParams params = ReportRunCreateParams.builder() .setReportType("connected_account_tax.transactions.itemized.2") .setParameters( ReportRunCreateParams.Parameters.builder() .setIntervalStart(1641013200L) .setIntervalEnd(1672549200L) .build() ) .build(); ReportRun reportRun = ReportRun.create(params); ``` ```node const stripe = require('stripe')('<>'); const reportRun = await stripe.reporting.reportRuns.create({ report_type: 'connected_account_tax.transactions.itemized.2', parameters: { interval_start: 1641013200, interval_end: 1672549200, }, }); ``` ```python import stripe stripe.api_key = "<>" report_run = stripe.reporting.ReportRun.create( report_type="connected_account_tax.transactions.itemized.2", parameters={"interval_start": 1641013200, "interval_end": 1672549200}, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $reportRun = $stripe->reporting->reportRuns->create([ 'report_type' => 'connected_account_tax.transactions.itemized.2', 'parameters' => [ 'interval_start' => 1641013200, 'interval_end' => 1672549200, ], ]); ``` ```ruby Stripe.api_key = '<>' report_run = Stripe::Reporting::ReportRun.create({ report_type: 'connected_account_tax.transactions.itemized.2', parameters: { interval_start: 1641013200, interval_end: 1672549200, }, }) ``` When a platform runs the following command, they download all 2022 transactions from a single connected account: To generate reports for connected accounts, use the `connected_account` parameter instead of the `Stripe-Account` header. ```dotnet StripeConfiguration.ApiKey = "<>"; var options = new Stripe.Reporting.ReportRunCreateOptions { ReportType = "connected_account_tax.transactions.itemized.2", Parameters = new Stripe.Reporting.ReportRunParametersOptions { IntervalStart = DateTimeOffset.FromUnixTimeSeconds(1641013200).UtcDateTime, IntervalEnd = DateTimeOffset.FromUnixTimeSeconds(1672549200).UtcDateTime, ConnectedAccount = "{{CONNECTED_ACCOUNT_ID}}", }, }; var service = new Stripe.Reporting.ReportRunService(); Stripe.Reporting.ReportRun reportRun = service.Create(options); ``` ```go stripe.Key = "<>" params := &stripe.ReportingReportRunParams{ ReportType: stripe.String("connected_account_tax.transactions.itemized.2"), Parameters: &stripe.ReportingReportRunParametersParams{ IntervalStart: stripe.Int64(1641013200), IntervalEnd: stripe.Int64(1672549200), ConnectedAccount: stripe.String("{{CONNECTED_ACCOUNT_ID}}"), }, }; result, err := reportrun.New(params); ``` ```java Stripe.apiKey = "<>"; ReportRunCreateParams params = ReportRunCreateParams.builder() .setReportType("connected_account_tax.transactions.itemized.2") .setParameters( ReportRunCreateParams.Parameters.builder() .setIntervalStart(1641013200L) .setIntervalEnd(1672549200L) .setConnectedAccount("{{CONNECTED_ACCOUNT_ID}}") .build() ) .build(); ReportRun reportRun = ReportRun.create(params); ``` ```node const stripe = require('stripe')('<>'); const reportRun = await stripe.reporting.reportRuns.create({ report_type: 'connected_account_tax.transactions.itemized.2', parameters: { interval_start: 1641013200, interval_end: 1672549200, connected_account: '{{CONNECTED_ACCOUNT_ID}}', }, }); ``` ```python import stripe stripe.api_key = "<>" report_run = stripe.reporting.ReportRun.create( report_type="connected_account_tax.transactions.itemized.2", parameters={ "interval_start": 1641013200, "interval_end": 1672549200, "connected_account": "{{CONNECTED_ACCOUNT_ID}}", }, ) ``` ```php $stripe = new \Stripe\StripeClient('<>'); $reportRun = $stripe->reporting->reportRuns->create([ 'report_type' => 'connected_account_tax.transactions.itemized.2', 'parameters' => [ 'interval_start' => 1641013200, 'interval_end' => 1672549200, 'connected_account' => '{{CONNECTED_ACCOUNT_ID}}', ], ]); ``` ```ruby Stripe.api_key = '<>' report_run = Stripe::Reporting::ReportRun.create({ report_type: 'connected_account_tax.transactions.itemized.2', parameters: { interval_start: 1641013200, interval_end: 1672549200, connected_account: '{{CONNECTED_ACCOUNT_ID}}', }, }) ``` ### Use the Export Tax Transactions Embedded Component To learn more about this component and integrate it, see [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions.md). ## See Also * [Calculate tax in your custom checkout flow](https://docs.stripe.com/tax/custom.md)