コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けリソース
概要
Stripe Payments について
構築済みのシステムをアップグレード
支払いの分析
オンライン決済
概要ユースケースを見つけるUse Managed Payments
Payment Links を使用する
構築済みの決済ページを使用する
Build a custom integration with Elements
    概要
    Compare Checkout Sessions and PaymentIntents
    Quickstart guides
    高度なシステムを設計
    デザインをカスタマイズする
    決済手段を管理
    追加情報を収集する
    サブスクリプションの実装
    Dynamic updates
    割引を追加する
    支払いで税金を徴収
      納税者番号を収集する
    顧客が現地通貨で支払いできるようにする
    顧客の支払い方法を保存および取得する
    領収書と支払い済みの請求書を送信する
    サーバーで支払いを手動で承認する
    支払いのオーソリとキャプチャーを分離する
    Elements with Checkout Sessions API ベータ版の変更ログ
アプリ内実装を構築
決済手段
決済手段を追加
決済手段を管理
Link による購入の迅速化
支払いインターフェイス
Payment Links
Checkout
Web Elements
アプリ内決済
決済シナリオ
複数の通貨を扱う
カスタムの決済フロー
柔軟なアクワイアリング
オーケストレーション
店頭支払い
端末
決済にとどまらない機能
会社を設立する
仮想通貨
Financial Connections
Climate
不正利用について
Radar の不正防止
不審請求の申請の管理
本人確認
ホーム支払いBuild a custom integration with ElementsCollect taxes on your payments

注

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

Collect customer tax IDs

Learn how to collect VAT and other customer tax IDs with Elements.

Payment Intents API

With the Payment Intents API, you must build your own UI components and functionality to collect and store tax IDs.

Displaying a customer’s tax ID and legal business name on invoices is a common requirement that you can satisfy by enabling tax ID collection. This guide assumes that you’ve integrated Elements with the Checkout Sessions API. If you haven’t completed this integration, see the quickstart guide.

Disclaimer

The Checkout Sessions API is designed to collect business tax IDs, which might have formats similar to personal tax IDs in certain jurisdictions. You must make sure that only business tax IDs, as designated for this field, are provided when using this feature.

Enable tax ID collection
Server-side

New customers

To enable tax ID collection for new customers, set tax_id_collection[enabled] to true when creating a Checkout Session.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d ui_mode=custom \ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "tax_id_collection[enabled]"=true \ -d mode=payment \ --data-urlencode return_url="https://example.com/return"

Existing customers

Create a Checkout Session with an existing customer to add any tax ID information collected during checkout. The session saves the business name as the customer’s name, and adds the collected tax ID to customer.tax_ids.

When creating the Checkout Session, you must set customer_update.name to auto to prevent overriding the customer’s existing [name].

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d ui_mode=custom \ -d customer=
{{CUSTOMER_ID}}
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d mode=payment \ --data-urlencode return_url="https://example.com/return"

If you don’t have saved addresses for existing customers, you can use the billing or shipping address entered during checkout to assess their location. To use the billing address, set customer_update.address to auto. Setting this parameter to auto replaces the customer’s previously saved addresses with the address entered during checkout.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d ui_mode=custom \ -d customer=
{{CUSTOMER_ID}}
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d "customer_update[address]"=auto \ -d mode=payment \ --data-urlencode return_url="https://example.com/return"

If you’re saving shipping addresses for existing customers, you can use the shipping address entered during checkout to assess their location. To use the shipping address, set customer_update.shipping to auto. Setting this parameter to auto replaces the customer’s previously saved shipping addresses with the address entered during checkout.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d ui_mode=custom \ -d customer=
{{CUSTOMER_ID}}
\ -d "line_items[0][price]"=
{{PRICE_ID}}
\ -d "line_items[0][quantity]"=1 \ -d "tax_id_collection[enabled]"=true \ -d "customer_update[name]"=auto \ -d "customer_update[shipping]"=auto \ -d "shipping_address_collection[allowed_countries][0]"=DE \ -d mode=payment \ --data-urlencode return_url="https://example.com/return"

This example creates a session in payment mode with tax ID collection enabled. For subscriptions, make the same changes with the mode set to subscription.

Render the Tax ID Element
Client-side
Public preview

Use Stripe’s Tax ID Element to collect tax IDs.

App.jsx
import {useMemo} from 'react', import {loadStripe} from '@stripe/stripe-js'; import {CheckoutProvider, TaxIdElement} from '@stripe/react-stripe-js/checkout'; const stripePromise = loadStripe(
'pk_test_TYooMQauvdEDq54NiTphI7jx'
, { betas: [ 'custom_checkout_tax_id_1', ], }); const App = () => { const fetchClientSecret = useMemo(() => { return fetch('/create-checkout-session', {method: 'POST'}) .then((res) => res.json()) .then((data) => data.clientSecret) }, []); return ( <CheckoutProvider stripe={stripePromise} options={{ fetchClientSecret: () => fetchClientSecret, }} > <TaxIdElement /> <CheckoutProvider> ); };

オプションCustom client-side implementation
Client-side

Rather than rendering the Tax ID Element, you can also implement your own custom form for full control over the UI and validation.

Create a form in your web application and use updateTaxIdInfo to collect the customer’s business name and tax ID.

App.jsx
import {useState} from 'react'; import {useCheckout} from '@stripe/react-stripe-js/checkout'; // Create a constant to list out the taxID types you'd like to support in your checkout const TAX_ID_TYPES = ['au_abn', 'eu_vat', ...] as const; const TaxIdCollectionForm = () => { const [isPurchaseAsBusiness, setIsPurchaseAsBusiness] = useState(false); const [isEditing, setIsEditing] = useState(true); const [businessName, setBusinessName] = useState(''); const [taxIdType, setTaxIdType] = useState(''); const [taxIdValue, setTaxIdValue] = useState(''); const [errorMessage, setErrorMessage] = useState(''); const checkoutState = useCheckout(); if (checkoutState.type === 'loading') { return ( <div>Loading...</div> ); } else if (checkoutState.type === 'error') { return ( <div>Error: {checkoutState.error.message}</div> ); } const {updateTaxIdInfo} = checkoutState.checkout; const validateAndUpdate = async () => { if (!businessName) { setErrorMessage('Business name is required'); return; }

Retrieve the customer tax ID details after a session

Checkout は、生成された Session (セッション) オブジェクトに提供された納税者番号を含めます。各セッションの完了後に、Checkout は checkout.session.completed イベントを送信します。これは Webhook エンドポイントでリッスンできます。納税者番号を Session オブジェクトから取得する場合は、セッションの customer_details.tax_ids 配列から取得できます。

{ "object": { "id": "cs_test_a1dJwt0TCJTBsDkbK7RcoyJ91vJxe2Y", "object": "checkout.session", ... "customer": "cus_id_of_new_customer", "customer_details": { ... "tax_ids": [ { "type": "eu_vat", "value": "FRAB123456789" } ] }, ... "tax_id_collection": { "enabled": true }, ... } }

Checkout はさらに、セッションに Customer (顧客) オブジェクトが関連付けられている場合、収集された納税者番号と企業名をこのオブジェクトに保存します。決済時に収集された納税者番号は、Customer の customer.tax_ids 配列からアクセスできます。また、owner.type パラメーターを customer に、owner.customer を Customer’s ID に指定することで、Customer に保存されたすべての納税者番号を Tax ID リソースで取得することもできます。新しい納税者番号のすべてに関連付けられている企業の正式名称が含まれ、Checkout はそれを顧客の name プロパティに保存します。このようにすることで、収集された法人名がその顧客のサブスクリプションの請求書に常に表示されることになります。

Test your integration

テスト環境では、サポートされている納税者番号タイプの正しい形式で英数字の文字列を入力できます (eu_vat の場合は DE123456789 など)。納税者番号のサンプルの一覧については、Stripe の顧客の納税者番号に関するガイドをご覧ください。また、テスト用納税者番号を使用して、さまざまな確認ステータスのフローをテストすることもできます。

Validation

Checkout セッションの際に、Stripe は入力された納税者番号が正しい形式であること (有効かどうかではなく) を確認します。決済時に収集された顧客情報の有効性を確保する責任はお客様にあります。そのサポートとして、Stripe ではヨーロッパの付加価値税 (EU VAT) およびイギリスの付加価値税 (GB VAT) 番号を、政府データベースと照らし合わせる非同期の検証を自動的に行います。Stripe が実行する検証の詳細、およびそれらの検証のステータスを使用する方法をご確認ください。

お客様が Stripe Tax を使用していて、顧客が納税者番号を入力した場合、納税者番号が有効かどうかにかかわらず、納税者番号が必要な数値形式に準拠している限り、Stripe Tax は適用法に従ってリバースチャージまたはゼロレートを適用します。

Supported tax ID types

The Checkout Session collects the following tax ID types in the given regions:

国列挙値説明例
税金計算への影響
アイスランドis_vatアイスランドの VAT123456可
アイルランドeu_vatEuropean VAT numberIE1234567AB可
アゼルバイジャンaz_tinアゼルバイジャンの納税者番号0123456789可
アラブ首長国連邦ae_trnアラブ首長国連邦の TRN123456789012345可
アルバaw_tinアルバの納税者番号12345678可
アルバニアal_tinアルバニアの納税者番号J12345678N可
アルメニアam_tinアルメニアの納税者番号02538904可
アンゴラao_tinアンゴラの納税者番号5123456789不可
イギリスeu_vatNorthern Ireland VAT numberXI123456789可
イギリスgb_vatイギリスの VAT 番号GB123456789可
イタリアeu_vatEuropean VAT numberIT12345678912可
インドin_gstインドの GST 番号12ABCDE3456FGZH可
ウガンダug_tinウガンダの納税者番号1014751879可
ウクライナua_vatウクライナの VAT123456789可
ウズベキスタンuz_tinウズベキスタンの TIN 番号123456789不可
ウズベキスタンuz_vatウズベキスタンの VAT 番号123456789012可
ウルグアイuy_rucウルグアイの RUC 番号123456789012可
エクアドルec_rucエクアドルの RUC 番号1234567890001不可
エジプトeg_tinエジプトの納税者番号123456789可
エストニアeu_vatEuropean VAT numberEE123456789可
エチオピアet_tinエチオピアの納税者番号1234567890可
オーストラリアau_abnオーストラリア事業者登録番号 (AU ABN)12345678912可
オーストリアeu_vatEuropean VAT numberATU12345678可
オマーンom_vatオマーンの VAT 番号OM1234567890可
オランダeu_vatEuropean VAT numberNL123456789B12可
カーボベルデcv_nifカーボベルデの納税者番号 (Número de Identificação Fiscal)213456789不可
カザフスタンkz_binカザフスタンの企業識別番号123456789012可
カナダca_bnカナダの BN123456789不可
カナダca_gst_hstカナダの GST/HST 番号123456789RT0002可
カナダca_pst_bcカナダの PST 番号 (ブリティッシュコロンビア)PST-1234-5678不可
カナダca_pst_mbカナダの PST 番号 (マニトバ)123456-7不可
カナダca_pst_skカナダの PST 番号 (サスカチュワン)1234567不可
カナダca_qstカナダの QST 番号 (ケベック)1234567890TQ1234可
カメルーンcm_niuカメルーンの納税者番号 (Numéro d'Identifiant fiscal Unique)M123456789000L不可
カンボジアkh_tinカンボジアの納税者番号1001-123456789可
ギニアgn_nifギニアの納税者番号 (Número de Identificação Fiscal)123456789可
キプロスeu_vatEuropean VAT numberCY12345678Z可
ギリシャeu_vatEuropean VAT numberEL123456789可
キルギスkg_tinキルギスの納税者番号12345678901234不可
クロアチアeu_vatEuropean VAT numberHR12345678912可
ケニアke_pinケニア税務当局の個人識別番号P000111111A不可
コスタリカcr_tinコスタリカの納税者番号1-234-567890不可
コンゴ民主共和国(キンシャサ)cd_nifコンゴ民主共和国の納税者番号 (Número de Identificação Fiscal)A0123456M不可
サウジアラビアsa_vatサウジアラビアの VAT123456789012345可
ザンビアzm_tinザンビアの納税者番号1004751879不可
ジョージアge_vatジョージアの VAT123456789可
シンガポールsg_gstシンガポールの GSTM12345678X可
ジンバブエzw_tinジンバブエの納税者番号1234567890不可
スイスch_vatスイスの VAT 番号CHE-123.456.789 MWST可
スウェーデンeu_vatEuropean VAT numberSE123456789123可
スペインes_cifスペインの NIF 番号 (以前のスペインの CIF 番号)A12345678不可
スペインeu_vatEuropean VAT numberESA1234567Z可
スリナムsr_finスリナムの FIN 番号1234567890可
スロバキアeu_vatEuropean VAT numberSK1234567891可
スロベニアeu_vatEuropean VAT numberSI12345678可
セネガルsn_nineaセネガルの NINEA 番号12345672A2不可
セルビアrs_pibセルビアの PIB 番号123456789不可
タイth_vatタイの VAT1234567891234可
タジキスタンtj_tinタジキスタンの納税者番号123456789可
タンザニアtz_vatタンザニアの VAT 番号12345678A可
チェコ共和国eu_vatEuropean VAT numberCZ1234567890可
チリcl_tinチリの TIN12.345.678-K可
デンマークeu_vatEuropean VAT numberDK12345678可
ドイツeu_vatEuropean VAT numberDE123456789可
トルコtr_tinトルコの納税者番号0123456789可
ナイジェリアng_tinナイジェリアの納税者番号12345678-0001不可
ニュージーランドnz_gstニュージーランドの GST 番号123456789可
ネパールnp_panネパールの PAN 番号123456789可
ノルウェーno_vatノルウェーの VAT 番号123456789MVA可
バーレーンbh_vatバーレーンの VAT 番号123456789012345可
バハマbs_tinバハマの納税者番号123.456.789不可
バルバドスbb_tinバルバドスの納税者番号1123456789012不可
ハンガリーeu_vatEuropean VAT numberHU12345678可
バングラデシュbd_binバングラデシュの企業識別番号123456789-0123可
フィリピンph_tinフィリピンの納税者番号123456789012可
フィンランドeu_vatEuropean VAT numberFI12345678可
フランスeu_vatEuropean VAT numberFRAB123456789可
ブルガリアeu_vatEuropean VAT numberBG0123456789可
ブルキナファソbf_ifuブルキナファソの納税者番号 (Numéro d'Identifiant Fiscal Unique)12345678A可
ベナンbj_ifuベナンの納税者番号 (Identifiant Fiscal Unique)1234567890123可
ベラルーシby_tinベラルーシの TIN 番号123456789可
ペルーpe_rucペルーの RUC 番号12345678901可
ベルギーeu_vatEuropean VAT numberBE0123456789可
ポーランドeu_vatEuropean VAT numberPL1234567890可
ボスニア・ヘルツェゴビナba_tinボスニア・ヘルツェゴビナの納税者番号123456789012可
ポルトガルeu_vatEuropean VAT numberPT123456789可
マルタeu_vatEuropean VAT numberMT12345678可
メキシコmx_rfcメキシコの RFC 番号ABC010203AB9不可
モーリタニアmr_nifモーリタニアの納税者番号 (Número de Identificação Fiscal)12345678不可
モルドバmd_vatモルドバの VAT 番号1234567可
モロッコma_vatモロッコの VAT 番号12345678可
モンテネグロme_pibモンテネグロの PIB 番号12345678不可
ラオスla_tinラオスの納税者番号123456789-000不可
ラトビアeu_vatEuropean VAT numberLV12345678912可
リトアニアeu_vatEuropean VAT numberLT123456789123可
リヒテンシュタインli_vatリヒテンシュタインの VAT 番号12345可
ルーマニアeu_vatEuropean VAT numberRO1234567891可
ルクセンブルグeu_vatEuropean VAT numberLU12345678可
ロシアru_innロシアの INN1234567891可
ロシアru_kppロシアの KPP123456789可
北マケドニアmk_vat北マケドニアの VAT 番号MK1234567890123可
南アフリカza_vat南アフリカの VAT 番号4123456789可
台湾tw_vat台湾の VAT12345678可
韓国kr_brn韓国の BRN123-45-67890可
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 早期アクセスプログラムにご参加ください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc