Skip to main content

Commerce API Reference

LauncherForge Commerce API lets a server-side store integration generate a game key after the store has confirmed a purchase.
LauncherForge does not charge the buyer. WooCommerce, PrestaShop, your custom website, or the payment gateway processes the payment. LauncherForge only generates and returns the game key.
LauncherForge Commerce API key page

How the flow works

Before you start

You need:
  • A paid LauncherForge plan with the Commerce API add-on active.
  • A complete Commerce API key.
  • A game owned by the same workspace.
  • CD-Key protection enabled for that game.
  • The numeric LauncherForge App ID.
  • A server-side integration. Never call Commerce API from public browser JavaScript.
A value such as lf_commerce_live_d122d2cc091f is only the visible key prefix. It cannot authenticate requests. The complete key is shown only once when it is generated or regenerated.

Base URL

The current stable delivery endpoint is:
Full URL:

Authentication

Send the complete Commerce API key as a Bearer token:
Never place the key in:
  • Browser JavaScript.
  • HTML.
  • Mobile apps.
  • Public repositories.
  • Screenshots.
  • Client-visible logs.

Idempotency

Every delivery request must include:
The value must identify one exact purchased unit. Retrying the same operation with the same value returns the previous delivery instead of generating another key. Recommended format:
WooCommerce example:
If quantity is three, send three delivery requests with different unit values:
When a request is repeated with the same Idempotency-Key, the response contains alreadyProcessed: true and returns the same game key.

Create a delivery

Headers

Request body

cURL example

PowerShell example

Successful response

Response fields

Common errors

INVALID_COMMERCE_API_KEY

The Bearer token is invalid, revoked, incomplete, or only contains the visible prefix.

COMMERCE_API_NOT_ENABLED

The Commerce API add-on is not active for the workspace.

EXTERNAL_GAME_NOT_AVAILABLE

One of these conditions failed:
  • The App ID does not exist.
  • The game belongs to another workspace.
  • The game is not linked correctly.
  • CD-Key protection is disabled.

IDEMPOTENCY_KEY_REQUIRED

The Idempotency-Key header is missing.

Validation error

The request body contains an invalid field, type, or value.

Who sends the email?

LauncherForge backend returns the generated key to the authenticated store integration. It does not email the buyer for external Commerce API deliveries. The external store is responsible for delivery:
  • The WooCommerce plugin inserts the key into customer order emails.
  • It also shows the key in My Account → Orders.
  • A custom store must send or display the key using its own email and order system.

Security checklist

  • Store the complete key only on the server.
  • Use HTTPS.
  • Rotate the key after accidental exposure.
  • Never log Bearer tokens.
  • Never expose the key in frontend code.
  • Use one deterministic idempotency key per purchased unit.
  • Verify that payment is complete before requesting a game key.
  • Do not generate a new idempotency key merely because a request timed out.