# Include-dependent response values in API v2 Learn how to manage API responses that return null by default for certain properties. The `include` parameter is a feature of API v2. Requests in API v1 don’t use it. Some API v2 responses contain null values for certain properties by default, regardless of their actual values. That reduces the size of response payloads while maintaining the basic response structure. To retrieve the actual values for those properties, specify them in the `include` array request parameter. To determine whether you need to use the `include` parameter in a given request, look at the request description. The `include` parameter’s enum values represent the response properties that depend on the `include` parameter. > #### Endpoint dependency > > Whether a response property defaults to null depends on the request endpoint, not the object that the endpoint references. If multiple endpoints return data from the same object, a particular property can depend on `include` in one endpoint and return its actual value by default for a different endpoint. A hash property can depend on a single `include` value, or on multiple `include` values associated with its child properties. For example, when updating an Account, to return actual values for the entire `identity` hash, specify `identity` in the `include` parameter. Otherwise, the `identity` hash is null in the response. However, to return actual values for the `configuration` hash, you must specify individual configurations in the request. If you specify at least one configuration, but not all of them, specified configurations return actual values and unspecified configurations return null. If you don’t specify any configurations, the `configuration` hash is null in the response. The following example updates an `Account` to add the `customer` and `merchant` configurations, but doesn’t specify any properties in the `include` parameter: ```curl curl -X POST https://api.stripe.com/v2/core/accounts/acct_123 \ -H "Authorization: Bearer <>" \ -H "Stripe-Version: preview" \ --json '{ "configuration": { "customer": { "capabilities": { "automatic_indirect_tax": { "requested": true } } }, "merchant": { "capabilities": { "card_payments": { "requested": true } } } } }' ``` ```cli stripe v2 core accounts update acct_123 \ --configuration.customer.capabilities.automatic-indirect-tax.requested=true \ --configuration.merchant.capabilities.card-payments.requested=true ``` ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("<>") account = client.v2.core.accounts.update( 'acct_123', { configuration: { customer: {capabilities: {automatic_indirect_tax: {requested: true}}}, merchant: {capabilities: {card_payments: {requested: true}}}, }, }, ) ``` ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("<>") account = client.v2.core.accounts.update( "acct_123", { "configuration": { "customer": {"capabilities": {"automatic_indirect_tax": {"requested": True}}}, "merchant": {"capabilities": {"card_payments": {"requested": True}}}, }, }, ) ``` ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('<>'); $account = $stripe->v2->core->accounts->update( 'acct_123', [ 'configuration' => [ 'customer' => [ 'capabilities' => ['automatic_indirect_tax' => ['requested' => true]], ], 'merchant' => ['capabilities' => ['card_payments' => ['requested' => true]]], ], ] ); ``` ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("<>"); AccountUpdateParams params = AccountUpdateParams.builder() .setConfiguration( AccountUpdateParams.Configuration.builder() .setCustomer( AccountUpdateParams.Configuration.Customer.builder() .setCapabilities( AccountUpdateParams.Configuration.Customer.Capabilities.builder() .setAutomaticIndirectTax( AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax.builder() .setRequested(true) .build() ) .build() ) .build() ) .setMerchant( AccountUpdateParams.Configuration.Merchant.builder() .setCapabilities( AccountUpdateParams.Configuration.Merchant.Capabilities.builder() .setCardPayments( AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments.builder() .setRequested(true) .build() ) .build() ) .build() ) .build() ) .build(); Account account = client.v2().core().accounts().update("acct_123", params); ``` ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('<>'); const account = await stripe.v2.core.accounts.update( 'acct_123', { configuration: { customer: { capabilities: { automatic_indirect_tax: { requested: true, }, }, }, merchant: { capabilities: { card_payments: { requested: true, }, }, }, }, } ); ``` ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("<>") params := &stripe.V2CoreAccountUpdateParams{ Configuration: &stripe.V2CoreAccountUpdateConfigurationParams{ Customer: &stripe.V2CoreAccountUpdateConfigurationCustomerParams{ Capabilities: &stripe.V2CoreAccountUpdateConfigurationCustomerCapabilitiesParams{ AutomaticIndirectTax: &stripe.V2CoreAccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams{ Requested: stripe.Bool(true), }, }, }, Merchant: &stripe.V2CoreAccountUpdateConfigurationMerchantParams{ Capabilities: &stripe.V2CoreAccountUpdateConfigurationMerchantCapabilitiesParams{ CardPayments: &stripe.V2CoreAccountUpdateConfigurationMerchantCapabilitiesCardPaymentsParams{ Requested: stripe.Bool(true), }, }, }, }, } result, err := sc.V2CoreAccounts.Update(context.TODO(), "acct_123", params) ``` ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new Stripe.V2.Core.AccountUpdateOptions { Configuration = new Stripe.V2.Core.AccountUpdateConfigurationOptions { Customer = new Stripe.V2.Core.AccountUpdateConfigurationCustomerOptions { Capabilities = new Stripe.V2.Core.AccountUpdateConfigurationCustomerCapabilitiesOptions { AutomaticIndirectTax = new Stripe.V2.Core.AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions { Requested = true, }, }, }, Merchant = new Stripe.V2.Core.AccountUpdateConfigurationMerchantOptions { Capabilities = new Stripe.V2.Core.AccountUpdateConfigurationMerchantCapabilitiesOptions { CardPayments = new Stripe.V2.Core.AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions { Requested = true, }, }, }, }, }; var client = new StripeClient("<>"); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Update("acct_123", options); ``` The response might look like this: ```json { "id": "acct_123", "object": "v2.core.account", "applied_configurations": [ "customer", "merchant" ], "configuration": null, "contact_email": "furever@example.com", "created": "2025-06-09T21:16:03.000Z", "dashboard": "full", "defaults": null, "display_name": "Furever", "identity": null, "livemode": true, "metadata": {}, "requirements": null } ``` This example makes the same request, but specifies `configuration.customer` and `identity` in the `include` parameter: ```curl curl -X POST https://api.stripe.com/v2/core/accounts/acct_123 \ -H "Authorization: Bearer <>" \ -H "Stripe-Version: preview" \ --json '{ "configuration": { "customer": { "capabilities": { "automatic_indirect_tax": { "requested": true } } }, "merchant": { "capabilities": { "card_payments": { "requested": true } } } }, "include": [ "configuration.customer", "identity" ] }' ``` ```cli stripe v2 core accounts update acct_123 \ --configuration.customer.capabilities.automatic-indirect-tax.requested=true \ --configuration.merchant.capabilities.card-payments.requested=true \ --include="configuration.customer" \ --include=identity ``` ```ruby # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = Stripe::StripeClient.new("<>") account = client.v2.core.accounts.update( 'acct_123', { configuration: { customer: {capabilities: {automatic_indirect_tax: {requested: true}}}, merchant: {capabilities: {card_payments: {requested: true}}}, }, include: ['configuration.customer', 'identity'], }, ) ``` ```python # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys client = StripeClient("<>") account = client.v2.core.accounts.update( "acct_123", { "configuration": { "customer": {"capabilities": {"automatic_indirect_tax": {"requested": True}}}, "merchant": {"capabilities": {"card_payments": {"requested": True}}}, }, "include": ["configuration.customer", "identity"], }, ) ``` ```php // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys $stripe = new \Stripe\StripeClient('<>'); $account = $stripe->v2->core->accounts->update( 'acct_123', [ 'configuration' => [ 'customer' => [ 'capabilities' => ['automatic_indirect_tax' => ['requested' => true]], ], 'merchant' => ['capabilities' => ['card_payments' => ['requested' => true]]], ], 'include' => ['configuration.customer', 'identity'], ] ); ``` ```java // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys StripeClient client = new StripeClient("<>"); AccountUpdateParams params = AccountUpdateParams.builder() .setConfiguration( AccountUpdateParams.Configuration.builder() .setCustomer( AccountUpdateParams.Configuration.Customer.builder() .setCapabilities( AccountUpdateParams.Configuration.Customer.Capabilities.builder() .setAutomaticIndirectTax( AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax.builder() .setRequested(true) .build() ) .build() ) .build() ) .setMerchant( AccountUpdateParams.Configuration.Merchant.builder() .setCapabilities( AccountUpdateParams.Configuration.Merchant.Capabilities.builder() .setCardPayments( AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments.builder() .setRequested(true) .build() ) .build() ) .build() ) .build() ) .addInclude(AccountUpdateParams.Include.CONFIGURATION__CUSTOMER) .addInclude(AccountUpdateParams.Include.IDENTITY) .build(); Account account = client.v2().core().accounts().update("acct_123", params); ``` ```node // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys const stripe = require('stripe')('<>'); const account = await stripe.v2.core.accounts.update( 'acct_123', { configuration: { customer: { capabilities: { automatic_indirect_tax: { requested: true, }, }, }, merchant: { capabilities: { card_payments: { requested: true, }, }, }, }, include: ['configuration.customer', 'identity'], } ); ``` ```go // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys sc := stripe.NewClient("<>") params := &stripe.V2CoreAccountUpdateParams{ Configuration: &stripe.V2CoreAccountUpdateConfigurationParams{ Customer: &stripe.V2CoreAccountUpdateConfigurationCustomerParams{ Capabilities: &stripe.V2CoreAccountUpdateConfigurationCustomerCapabilitiesParams{ AutomaticIndirectTax: &stripe.V2CoreAccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxParams{ Requested: stripe.Bool(true), }, }, }, Merchant: &stripe.V2CoreAccountUpdateConfigurationMerchantParams{ Capabilities: &stripe.V2CoreAccountUpdateConfigurationMerchantCapabilitiesParams{ CardPayments: &stripe.V2CoreAccountUpdateConfigurationMerchantCapabilitiesCardPaymentsParams{ Requested: stripe.Bool(true), }, }, }, }, Include: []*string{stripe.String("configuration.customer"), stripe.String("identity")}, } result, err := sc.V2CoreAccounts.Update(context.TODO(), "acct_123", params) ``` ```dotnet // Set your secret key. Remember to switch to your live secret key in production. // See your keys here: https://dashboard.stripe.com/apikeys var options = new Stripe.V2.Core.AccountUpdateOptions { Configuration = new Stripe.V2.Core.AccountUpdateConfigurationOptions { Customer = new Stripe.V2.Core.AccountUpdateConfigurationCustomerOptions { Capabilities = new Stripe.V2.Core.AccountUpdateConfigurationCustomerCapabilitiesOptions { AutomaticIndirectTax = new Stripe.V2.Core.AccountUpdateConfigurationCustomerCapabilitiesAutomaticIndirectTaxOptions { Requested = true, }, }, }, Merchant = new Stripe.V2.Core.AccountUpdateConfigurationMerchantOptions { Capabilities = new Stripe.V2.Core.AccountUpdateConfigurationMerchantCapabilitiesOptions { CardPayments = new Stripe.V2.Core.AccountUpdateConfigurationMerchantCapabilitiesCardPaymentsOptions { Requested = true, }, }, }, }, Include = new List { "configuration.customer", "identity" }, }; var client = new StripeClient("<>"); var service = client.V2.Core.Accounts; Stripe.V2.Core.Account account = service.Update("acct_123", options); ``` The response includes details about the `customer` configuration and `identity`, but returns null for all other configurations: ```json { "id": "acct_123", "object": "v2.core.account", "applied_configurations": [ "customer", "merchant" ], "configuration": { "customer": { "automatic_indirect_tax": { ... }, "billing": { ... }, "capabilities": { ... }, ... }, "merchant": null, "recipient": null }, "contact_email": "furever@example.com", "created": "2025-06-09T21:16:03.000Z", "dashboard": "full", "defaults": null, "display_name": "Furever", "identity": { "business_details": { "doing_business_as": "FurEver", "id_numbers": [ { "type": "us_ein" } ], "product_description": "Saas pet grooming platform at furever.dev using Connect embedded components", "structure": "sole_proprietorship", "url": "http://accessible.stripe.com" }, "country": "US" }, "livemode": true, "metadata": {}, "requirements": null } ```