# Bolt JavaScript SDK

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

Source: https://help.boltapp.com/gaming/platforms/javascript/intro/overview

`@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.

<Note>
  This package is for games. It does not provide the browser client for [Custom Cart](/custom-cart/overview), which loads Bolt's hosted scripts instead.
</Note>

## What you need [#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](https://merchant-sandbox.boltapp.com/onboarding/get-started/gaming) to build against.

## What it does [#what-it-does]

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

| Capability | Call                                        | Use it for                                                                                                       |
| ---------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Checkout   | `BoltSDK.gaming.openCheckout(checkoutLink)` | Opening a payment link you created on your backend. Resolves with a `PaymentLinkSession`.                        |
| Reward ads | `BoltSDK.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](/gaming/guide/bolt-api/create-payment-link).

## Next steps [#next-steps]

* [JavaScript SDK quickstart](/gaming/platforms/javascript/intro/quickstart): install the package and open your first checkout link.
* [Checkout quickstart](/gaming/guide/quickstart): create the sandbox account, API keys, payment link, and webhook your client depends on.
* [bolt-frontend-sdk on GitHub](https://github.com/BoltApp/bolt-frontend-sdk): source, sample integration, and release history.
