Address fields
Add address fields to your payment form in order to use address verification
You can add address fields such as "Address" and "Country" to your payment form. This is available as part of the full payment form and also available as its own individual component. You may choose to display either the full address form or only the postal code field.
Information entered into these form elements will be used for address verification during processing.
Full Form details
Available fields are:
- Address 1 (Mandatory)
- Address 2 (Optional)
- City (Optional)
- State (Optional)
- Country (Optional)
- Postal Code (Mandatory)
Let's start with a full form sample:
Following on from the instructions at Building Your Form, when adding the card element you can specify options to determine which address elements will be added.
No Address fields
components.addCard('cardElement');
Full Address fields
components.addCard('cardElement', {
billingAddress: {
type: "full"
}
});
Partial Form details
Available fields are:
- Postal Code (Mandatory)
If you wish to only display a postal code field, you can make the following call instead :
Partial Address fields
components.addCard('cardElement', {
billingAddress: {
type: "partial"
}
});
Updated over 1 year ago