📍 Bolt Help / Core Products / Embedded Checkout Setup / Select a New Payment Method for a Shopper's Account

Select a New Payment Method for a Shopper's Account

Bolt’s embedded component library includes a component that enables shoppers to update their payment method from their merchant storefront account.

The component syncs with the shopper’s Bolt account to retrieve previously saved payment methods and addresses, and it can populate a newly added payment method or address back to their Bolt account.

Before You Start

These instructions assume that you:

  • Have an active Bolt Merchant Account
  • Have reviewed Bolt’s API collection

1. Install Script

Add the following script to the page where a shopper can manage their payment methods:


    data-publishable-key="{your-bolt-publishable-key}" />

Base URL Options:

  • Production: connect.bolt.com/embed.js
  • Sandbox: connect-sandbox.bolt.com/embed.js

2. Create an Instance of Bolt

const bolt = Bolt("<<my_publishable_key>>");

3. Create Payment Selector Component

const selector = bolt.create("payment_selector");

4. Update Payment Method for User

The appropriate page configuration depends on if you use Bolt SSO.

Merchants Using Bolt SSO

Merchants Without Bolt SSO

This component returns tokenized card information. You’ll need to handle how to apply this update to the user’s account. For example, if the user has several recurring subscriptions, does this update the payment method for all subscriptions, or just one?

📖On This Page
Filter by Section
Filter by Topic