Learn how to use our API Sandbox to test and experiment with our solution.

Our sandbox environment allows you to test and experiment with our solution in a simulated environment, without affecting live production data. This guide will provide an overview of the sandbox, including the various user flows that your end-users could potentially experience.

Main user flow

The user experience begins with an introductory screen, which highlights the main functionality of the service and requests the end-user's consent to the Sunlight's Terms of Use before proceeding. Your logo and company name will appear on this screen to make it clear for the user that your company is using Sunlight to save their card information everywhere they choose to.

After consenting to the terms of use, the user will be presented with a list of services defined by you so they can pick the ones where they currently have accounts and save your card as their default payment method in each one of them.

List of Services Screen

List of Services Screen

When the user selects a service, they will be prompted to log in with their credentials for that service. This allows Sunlight to access their accounts and perform the action of switching their default payment method to the credit/debit card defined by you during the initialization of Sunlight’s SDK.

Credentials Screen

Credentials Screen

As part of the sandbox experience provided by Sunlight, use the credentials below to proceed:

[email protected]goodpass

The Credentials screen may vary depending on the login methods offered by each service. Some services allow users to log in using their emails, others ask for phone numbers, some allow users to “Continue with Google” for example. Sunlight will reproduce the login experience of each service, and also support multi-factor-authentication (MFA) if the service offers it as part of the login flow. An example of an MFA screen can be seen below, where the user is asked to enter a code generated by their Authenticator App.

Verification Screen

Verification Screen

As part of the sandbox experience provided by Sunlight, you will be able to test multiple MFA scenarios. In order to do so, please use the credentials below:

EmailPasswordMFA ScenarioHow to proceed
[email protected]goodpassCode sent via SMS“123456”
[email protected]goodpassSecurity question“sunlight”
[email protected]goodpassExternal actionButton click
[email protected]goodpassCode via authenticator App“123456”
[email protected]goodpassCode sent via email“123456”
[email protected]goodpassCaptcha“just example”

In order to test the fail flow for each of the MFA scenarios, simply try to proceed with an answer different than the ones listed above.

It is important to note that some services also offer the ability for users to create sub-accounts, connected to their main profile, for example, "workspaces" in Slack. These sub-accounts can also have different payment methods connected to them. To test this scenario in the sandbox, you can use the credentials below:

[email protected]goodpass

After the user has entered their login credentials and successfully completed any multi-factor authentication (MFA) challenges, Sunlight will proceed to perform the card switch within the selected service. This process is executed asynchronously, allowing Sunlight to carry out the switch action in the background while the user is free to move on to the next service.

Switch In Progress

Switch In Progress

Once the card switch is successfully completed, the updated status will be displayed on the List of Services screen to notify the user.

Success Screen


SDK Initialization

Card Identifier

A Card Identifier can be passed to the Sunlight SDK in case you would like to skip the manual entry of card details (PAN, CVV/CVC and Expiration date).

If you pass this identifier to the SDK, the identifier will make its way to the Sunlight backend and the card data will be extracted in a secure manner vs your servers.

Testing Card Identifier in Sandbox Environment

You can use predefined card identifiers to test our SDK vs the Sandbox environment. Use the following codes:

Card IdentifierHolder NamePostal CodeSwitch Result
mastercard1Already exists
visa4Sam JacksonSuccess
visa6Samantha Jackson67890Success

Manual Card Entry

The manual card entry method involves displaying a card details form to the user within the client application.

This method is useful for testing the SDK and for cases where card details need to be collected directly from the user. It provides a straightforward and user-friendly way to gather card information.

In Sandbox mode, you can use the following card information to test the SDK:

PANExpiration DateCVV/CVC
4111-1111-1111-1111any future valid date (e.g. 12/25)3 digits (e.g. 123)