Enable Bolt Account Detection

Enable functionality to check Bolt Account data for an existing Shopper account for the inputted shopper information, such as email address.

In the instructions below, the request is made directly from the front end to speed up account recognition. However, if you would prefer to enable Bolt Account detection in another way, we also offer a Detect Account API.

Set Up Account Detection

This process checks whether the shopper has an existing Bolt Account at the beginning of the checkout process.

  • Shoppers with Bolt Accounts: Account details are available to fetch.
  • Shoppers without Bolt Accounts: Displays a prompt for the shopper to log in via email or phone number. If the system does not find a matching email or phone number, no account is detected.

1. Add Email or Phone Input Field

Embedded Checkout displays upon recognizing a shopper with a Bolt account. Prompt the shopper to provide their email address or phone number so the system can check if they have a Bolt account. This can either be done at the beginning of the checkout process, or beforehand (outside of checkout).

Embedded Checkout can detect shoppers when they enter either an email address or a phone number associated with their account. At minimum, Bolt recommends that you configure an email address input field.

2. Check for a Bolt Account

Send a GET request to https://api.bolt.com/v1/account/exists to check whether a Bolt account exists for a user.

  • On Success + True: Open the Bolt Checkout modal using the embed.js script previously installed.
  • On Success + False: Send the shopper to your guest checkout experience.
  • On Failure: Send the shopper to your guest checkout experience.
async function accountExists(email) {
	const response = await fetch("https://api-sandbox.bolt.com/v1/account/exists?email=" +
	const responseAsJson = await response.json();
	return responseAsJson.has_bolt_account;

Success Response

    "has_bolt_account": true,

Error Response

	"result": { 
    	"success": false 
	"errors": [{ 
      	"code": 1005, 
      	"message": "Authentication error. Invalid merchant key." 

Next Step

After you enable Bolt Account Detection, you will implement the Authorization Modal. This is a Front End Embedded Component that enables shoppers with a Bolt account to log in via the One-Time Password modal.

📖On This Page