Create Payment Link
Create a hosted checkout link for an in-game item.
Method: POST
Path: /v1/gaming/payment_links
Environments
- Sandbox: https://api-sandbox.boltapp.com
- Production: https://api.boltapp.com
Header Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
X-API-KEY | string | ✅ | Your secret API key. Used to authenticate server-to-server requests. |
X-PUBLISHABLE-KEY | string | ✅ | Your publishable API key. Identifies your merchant account in client-facing and server requests. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
game_id | string | ❌ | Identifier for the game. |
user_id | string | ❌ | Your platform’s user ID. |
redirect_url | string | ❌ | URL or deep link to redirect the shopper after checkout. |
| item (object) | ✅ | Product shown on the hosted checkout. | |
item.name | string | ✅ | Item name (e.g., “Gems Pack”). |
item.price | integer | ✅ | Price in minor units (e.g., 699 = $6.99). |
item.currency | string | ✅ | ISO 4217 currency code (e.g., USD). |
item.image_url | string | ✅ | Public URL of the item image. |
| metadata (object) | object or JSON | ❌ | Arbitrary key/value pairs to store with the payment link. Must be valid JSON. |
curl --location 'https://api-sandbox.boltapp.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!"
}
}'{
"id": "CyzZV9Zh45t2rLE3ubG75x",
"link": "https://abcdefake.c-sandbox.boltapp.com/o?order_token=ee1e2917aacf9e2f5059ae00ea7acbae6e2ea2a8226df4b146dd94e44ca8bc5c&payment_link_id=CyzZV9Zh45t2rLE3ubG75x&publishable_key=THF7DjHcgSO8.P4WwM-oR233w.f3a8f6a469e053bebdbee21f59e13100748822ad89ba5f8808ff3fd3959d026b"
}