Collect physical addresses and phone numbers
Learn how to collect addresses and phone numbers during one-time payment flows.
To collect complete addresses for billing or shipping, use the Address Element. You might need to collect a full billing address to calculate taxes, for example. The Payment Element only collects the billing address details required to complete the payment, but you can configure it to collect other billing details.
Other reasons you might want to use the Address Element:
- To collect customer phone numbers
- To enable autocomplete
- To prefill billing information in the Payment Element by passing in a shipping address
Stripe combines the collected address information and the payment method to create a PaymentIntent.
Create an Address Element
When you create an Address Element, you specify either a shipping
or billing
mode . The Address Element mode determines whether the shipping or billing addressed is passed to confirm the PaymentIntent.
Address Element を作成する際は、それを配送モードと請求モードのどちらで使用するかを指定します。
その他のエレメントとともに住所 Element を使用する
You can collect both shipping and billing addresses by using multiple Address Elements, one of each mode, on your page.
If you need to collect both shipping and billing addresses and only want to use one Address Element, use the Address Element in Shipping mode and use the Payment Element to collect only the necessary billing address details.
住所 Element を他の Element とともに使用すると、PaymentIntent または SetupIntent の確定時に一部の動作を自動で実行できます。PaymentIntent または SetupIntent の確定時に住所 Element の完全性が検証され、検証エラーが発生した場合はフィールドごとにエラーが表示されます。