コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けリソース
概要
バージョン管理
変更ログ
API バージョンのアップグレード
SDK バージョンをアップグレードする
Essentials
SDK
API
    API v2
    API キー
    Stripe-Context ヘッダー
    レート制限
    自動化されたテスト
    メタデータ
    レスポンスの拡張
    依存関係のある応答値 v2 を含める
    ページ分割
    ドメインと IP アドレス
    検索
    各地域への適応
    エラー処理
    エラーコード
テスト
Stripe CLI
サンプルプロジェクト
ツール
ワークベンチ
開発者ダッシュボード
Stripe Shell
Visual Studio Code をご利用の場合
機能
ワークフロー
イベントの送信先
Stripe 健全性アラートファイルのアップロード
AI ソリューション
エージェントツールキット
モデルコンテキストプロトコル
セキュリティとプライバシー
セキュリティ
プライバシー
Stripe を拡張する
Stripe Appsを構築する
Stripe アプリを使用する
パートナー
Partner Ecosystem
パートナー認定
ホーム開発者向けリソースAPI

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

Include-dependent response values in API v2

Learn how to manage API responses that return null by default for certain properties.

API v2 only

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:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl -X POST https://api.stripe.com/v2/core/accounts/acct_123 \ -H "Authorization: Bearer
sk_test_BQokikJOvBiI2HlWgH4olfQ2
"
\ -H "Stripe-Version: preview" \ --json '{ "configuration": { "customer": { "capabilities": { "automatic_indirect_tax": { "requested": true } } }, "merchant": { "capabilities": { "card_payments": { "requested": true } } } } }'

The response might look like this:

{ "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:

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl -X POST https://api.stripe.com/v2/core/accounts/acct_123 \ -H "Authorization: Bearer
sk_test_BQokikJOvBiI2HlWgH4olfQ2
"
\ -H "Stripe-Version: preview" \ --json '{ "configuration": { "customer": { "capabilities": { "automatic_indirect_tax": { "requested": true } } }, "merchant": { "capabilities": { "card_payments": { "requested": true } } } }, "include": [ "configuration.customer", "identity" ] }'

The response includes details about the customer configuration and identity, but returns null for all other configurations:

{ "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 }
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 早期アクセスプログラムにご参加ください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc