Create Payment Link

Method: POSTPath: /v1/gaming/payment_links Environments

Header Parameters

ParameterTypeRequiredDescriptionX-API-KEYstring✅Your secret API key. Used to authenticate server-to-server requests.X-PUBLISHABLE-KEYstring✅Your publishable API key. Identifies your merchant account in client-facing and server requests.

Body Parameters

ParameterTypeRequiredDescriptiongame_idstring❌Identifier for the game.user_idstring❌Your platform’s user ID.redirect_urlstring❌URL or deep link to redirect the shopper after checkout.**item (object)**✅Product shown on the hosted checkout.item.namestring✅Item name (e.g., “Gems Pack”).item.priceinteger✅Price in minor units (e.g., 699 = $6.99).item.currencystring✅ISO 4217 currency code (e.g., USD).item.image_urlstring✅Public URL of the item image.**metadata (object)**object | JSON❌Arbitrary key/value pairs to store with the payment link. Must be valid JSON.

Example Request

cURL
curl --location 'https://api-sandbox.bolt.com/v1/gaming/payment_links' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'X-PUBLISHABLE-KEY: YOUR_PUBLISHABLE_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "game_id": "YOUR_GAME_ID",
    "user_id": "USER_ID",
    "redirect_url": "bubble-merge://bolt-webcheckout/success",
    "item": {
        "price": 699,
        "name": "Gems Pack",
        "image_url": "https://yourcdn.com/image.png",
        "currency": "USD"
    },
    "metadata": {
        "beamable_id": "9876543210",
        "greeting": "Hello World!"
    }
}'

Example Response

JSON
{
	"id": "CyzZV9Zh45t2rLE3ubG75x",
	"link": "https://abcdefake.c-sandbox.bolt.com/o?order_token=ee1e2917aacf9e2f5059ae00ea7acbae6e2ea2a8226df4b146dd94e44ca8bc5c&payment_link_id=CyzZV9Zh45t2rLE3ubG75x&publishable_key=THF7DjHcgSO8.P4WwM-oR233w.f3a8f6a469e053bebdbee21f59e13100748822ad89ba5f8808ff3fd3959d026b"
}