bolt.com is getting a new home → boltapp.com. Click here to transition smoothly to boltapp.com.

Skip to content

Bolt JavaScript SDK

Open Bolt checkout links and reward ads from a web game built with React, Vue, or plain JavaScript.

View As MarkdownMCP

@boltpay/bolt-js is the browser client for Bolt Gaming. Your backend creates a payment link, and the SDK opens it for the player without sending them away from your game. It also opens reward ads.

This package is for games. It does not provide the browser client for Custom Cart, which loads Bolt's hosted scripts instead.

What you need

  • A web game or web app built with React, Vue, Angular, or plain JavaScript.
  • Your own backend server, in any language, to create payment links and receive webhooks.
  • A Bolt merchant account with gaming enabled. Create a sandbox account to build against.

What it does

Call BoltSDK.initialize({ gameId, publishableKey, environment }) once before anything else. BoltSDK is the package's only export.

CapabilityCallUse it for
CheckoutBoltSDK.gaming.openCheckout(checkoutLink)Opening a payment link you created on your backend. Resolves with a PaymentLinkSession.
Reward adsBoltSDK.gaming.openAd({ onClaim })Showing an ad and granting a reward when the player claims it. Resolves with a status of success or error.

The SDK does not create payment links. That is a server call your backend makes with your API key. See Create payment link.

Next steps

On this page