> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokensupply.io/llms.txt
> Use this file to discover all available pages before exploring further.

# G2G

> Connect G2G's Seller OpenAPI, create offers for gift cards and top-ups, declare stock, and deliver codes when an order is confirmed.

G2G is a marketplace for gift cards, top-ups, and game services. You connect it with an API key and secret, create offers against G2G products, map them to your TokenSupply products, and declare how much stock G2G may sell. When a buyer's order is confirmed, TokenSupply delivers the code and hands it to G2G for the buyer.

## Before you start

G2G connects with an API key pair from your G2G seller account, plus a webhook secret so G2G can send your orders to TokenSupply.

* A G2G seller account with API access.
* Your **API key** and **API secret**, generated in your G2G seller account's API management settings.
* Your **G2G user ID**: the account ID on your G2G profile page.
* A **Webhook secret token**, generated in G2G's dashboard under **Account**, **API Integration**, **Webhooks**, then **Generate random secret token**.

<Note>
  G2G orders reach TokenSupply only through G2G's webhooks, so set up the webhook secret token and the callback URL below, not just the API key.
</Note>

## Connect G2G

<Steps>
  <Step title="Open G2G from Integrations">
    Go to **Integrations** and choose G2G.
  </Step>

  <Step title="Enter your API credentials">
    Paste your **API key** and **API secret**, and enter your **G2G user ID**. Use the account ID from your G2G profile page, not the shorter example ID in G2G's own documentation. The secret is stored encrypted and never reaches your browser.
  </Step>

  <Step title="Choose the environment">
    Pick **Sandbox** for testing or **Production** to sell for real. The environment decides which G2G host your credentials are checked against.
  </Step>

  <Step title="Add the webhook secret and currency">
    Paste your **Webhook secret token**, and in **Default currency** enter the currency you list in on G2G (for example, `USD`). The default currency is used when you create an offer and to show prices on the G2G page. Click **Save credentials**.
  </Step>

  <Step title="Paste the callback URL into G2G">
    Copy the **Callback URL** from the **Webhook callback URL** card and paste it into G2G's dashboard for both the **Order** and **Offer** webhook categories. Paste it exactly as shown: a trailing slash or a different host makes every webhook fail.
  </Step>

  <Step title="Test and activate">
    Use **Test connection** to sign a request against G2G's Seller API for your chosen environment, then set the channel active.
  </Step>
</Steps>

## Create offers

On the G2G page under **Sales channel**, click **New Offer** to put a listing live on G2G.

<Steps>
  <Step title="Choose the G2G product">
    In **G2G Product**, search the G2G catalogue. If you cannot find the product, paste its G2G ID.
  </Step>

  <Step title="Pick G2G's options">
    Many G2G products ask you to choose options under **G2G options**. Keep choosing until there is nothing left to pick, because G2G lists against the deepest option. If G2G asks for a **Delivery Method**, choose one. Gift cards do not need one.
  </Step>

  <Step title="Set the title and price">
    **Offer Title** is optional. Some categories need one, while gift cards and top-ups ignore it. Enter the **Retail Price** in your default currency.
  </Step>

  <Step title="Link your product and declare stock">
    In **Internal Product**, choose the TokenSupply product that supplies the codes. You can also do this later. Once a product is chosen, enter how many G2G may sell in **Declare stock**, then click **Create Offer**.
  </Step>
</Steps>

Gaming accounts cannot be offered from TokenSupply. G2G handles those on its own site.

## Map products and declare stock

To map an existing listing, click **Assign product** on its row and choose the TokenSupply product to sell against it. You can filter the table by **Mapping** and **Stock** to find the rows that still need attention.

A new G2G offer sells nothing until you declare stock for it. Choose **Declare stock** from the row's menu to set how many G2G may sell. The dialog shows what is **Declared now**, your **Keys on hand**, and what is **Left to declare**. A listing needs a mapped product and an offer on G2G before you can declare stock against it.

To change a listing's price, click the price, or choose **Update pricing** from the row's menu. G2G has no way to pause an offer, so to stop a listing selling, choose **Delete offer**.

Turn on **Auto-sync** on the G2G integration screen to keep your stock in step on a schedule, and choose the interval.

## How orders arrive

When G2G confirms that a buyer has paid, the order appears in your Orders. Each sale becomes one order in TokenSupply.

Whether a code goes out on its own is set per product. Open the product, go to its **Sales Channels** tab, choose **Edit listing** on its G2G row, and turn on **Auto deliver**. With it on, TokenSupply takes a code from that product's stock as soon as the paid order arrives. With it off, the order waits on its order page until you choose **Release Key**.

Once G2G is ready to receive it, TokenSupply sends the code to G2G, and G2G shows it to the buyer.

A few orders are not imported:

* Orders placed before you connected G2G.
* Orders for a product you have not mapped. An order is held back until every product in it is mapped.

### Top-ups and disputes

Some G2G orders are direct top-ups: the buyer gives their game account details at checkout instead of receiving a code. There is nothing for TokenSupply to deliver, so it sends you a **Top-up needed** notification, and someone has to credit the buyer's account on the game's own platform.

If a buyer opens a dispute on a G2G order, TokenSupply sends you a **Buyer dispute** notification. G2G has no API for disputes, so you respond in G2G's resolution centre.

## Next

<CardGroup cols={2}>
  <Card title="How fulfilment works" icon="truck" href="/guides/selling-fulfilment/how-fulfilment-works">
    What happens after an order is placed, and how keys reach the buyer.
  </Card>

  <Card title="Connect a sales channel" icon="plug" href="/guides/sales-channels/connect-a-sales-channel">
    The overview of connecting, mapping, and syncing every channel.
  </Card>
</CardGroup>
