Configuring the Extra Card Fields
Introduction
Sunlight provides a flexible way to enhance the card switch process by allowing you to include additional information about the user. This information, known as "extra card fields," may be required by some services to successfully complete the card switch. By providing card extra fields during the Sunlight SDK initialization, you can streamline the user experience and reduce the need for manual data entry.
In this guide, we'll explore what extra card fields are, how to configure them, and how they can be used to improve the card switch process.
What are Extra Card Fields?
Extra card fields are optional pieces of information about the user that may be required by certain services during the card switch process. These fields can include details such as the user's name, address, email, phone number, and more. By providing card extra fields, you can ensure that the necessary information is available to services that require it.
Configuring Extra Card Fields in the SDK Initialization
When initializing the Sunlight SDK, you have the option to include the cardExtraFields
object as part of the configuration. This object can contain any of the following optional fields:
firstName
: The user's first name.lastName
: The user's last name.middleName
: The user's middle name.country
: The user's country.postalCode
: The user's postal code.state
: The user's state or province.city
: The user's city.address1
: The user's primary address.address2
: The user's secondary address (e.g., apartment number).email
: The user's email address.phone
: The user's phone number.governmentId
: The user's local government id (e.g. Social Security number).passport
: The user's passport number.
Here's an example of how to include the cardExtraFields
object during SDK initialization:
SunlightConnect.initialize({
// Other configuration fields...
cardExtraFields: {
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
// Additional fields as needed...
}
});
Updated about 2 months ago