GuidesWalkthroughs

Sell on the G2A marketplace

Connect your G2A seller account so cards you sell on G2A are fulfilled automatically from your Octopus balance

You can list Octopus Cards for sale on the G2A marketplace and have every sale fulfilled automatically. When a buyer purchases one of your G2A listings, G2A calls Octopus Cards, which issues a fresh card code, charges your wallet, and hands the code back to G2A for delivery — no manual work per sale.

This is a channel integration, not a public API you call. You generate a set of channel credentials in your Octopus Cards account, paste them into your G2A seller dashboard, map your listings to Octopus Cards, and switch the channel on. After that it runs itself.

One-time setup

Steps 1, 4 and 5 are self-service in the Client Portal. Step 2 happens on the G2A side. Step 3 is done with your Octopus Cards account manager.

What happens on every sale

Once the channel is live, each purchase is fulfilled end to end without any action from you:

Step 1 — Generate your channel credentials

In the Client Portal go to Settings → Integrations → G2A Marketplace and click Generate credentials. You'll get:

FieldWhat it is
Client IDPublic identifier for your channel
Client SecretSecret used to obtain access tokens — shown once
Token URLThe endpoint G2A calls to get an access token

The secret is shown only once

Copy the Client Secret immediately and store it somewhere safe. Octopus Cards never shows it again. If you lose it, use Rotate credentials to issue a new one — but note that rotating invalidates the old secret, so you must update G2A with the new value.

Step 2 — Configure your G2A dashboard

On G2A's API Integration → Import API Credentials screen, fill in the fields exactly as follows:

G2A fieldValue
Client IDthe Client ID from Step 1
Client Secretthe Client Secret from Step 1
API URLhttps://api.octopuscards.io/g2a
Token URLhttps://api.octopuscards.io/g2a/oauth/token

The API URL must end in /g2a

G2A appends paths like /healthcheck and /order to the API URL you enter. If you leave it as https://api.octopuscards.io (without /g2a), those calls will 404 and G2A will not be able to reach your account. Make sure both URLs include the /g2a segment.

To validate against a test environment first, use the sandbox host instead:

  • API URLhttps://sandbox-api.octopuscards.io/g2a
  • Token URLhttps://sandbox-api.octopuscards.io/g2a/oauth/token

(Sandbox credentials are generated the same way, from the Client Portal.)

Step 3 — Map your listings to Octopus Cards

For each product you list on G2A, your Octopus Cards account manager maps G2A's product identifier to an Octopus Card and its denomination (face value). This tells Octopus Cards which card and what value to issue when that listing sells.

Denomination is required

A listing without a denomination cannot be fulfilled — orders for it are rejected. Confirm every listing you plan to sell has been mapped with a face value before you go live.

Send your account manager the list of G2A product identifiers you intend to sell and the Octopus Card denomination each should map to.

Step 4 — Fund your wallet

Every sale is charged to your wallet at the time the order is confirmed. Keep enough balance to cover expected sales — if the wallet can't cover a sale, that order fails and G2A retries it later, so it will complete once you top up. See Monitoring wallets to set up low-balance alerts.

Step 5 — Enable the channel

Back in Settings → Integrations → G2A Marketplace, switch Channel enabled on. While the channel is disabled, G2A can't obtain a token or sell your cards — so flip this on only when Steps 1–4 are done.

To verify the connection, you (or G2A) can run a health check. Using the credentials from Step 1:

BASE=https://api.octopuscards.io/g2a
CID=<your client id>
SECRET=<your client secret>

# 1) Get an access token
TOKEN=$(curl -s "$BASE/oauth/token?grant_type=client_credentials&client_id=$CID&client_secret=$SECRET" | jq -r .access_token)

# 2) Health check — a 204 means you're connected
curl -i "$BASE/healthcheck" -H "Authorization: Bearer $TOKEN"

A 204 No Content confirms G2A can reach your account. Once enabled, G2A's own health check goes green and your listings become sellable.

What to expect once live

  • Fulfilment is automatic and immediate. Most sales deliver a code to the buyer within seconds. Occasionally a code isn't ready the instant G2A asks; G2A automatically retries a moment later and the buyer still gets it — no action needed from you.
  • No duplicate charges. If G2A retries a confirmed order, you're charged and issue a code only once. The same order always returns the same code.
  • Each sale is a normal order. Delivered codes appear in your order history and count toward your usage and reporting like any other Octopus Card order.
  • Refunds are reconciled, not clawed back. If a buyer is refunded on G2A after a code was delivered, the code stays valid — a delivered card can't be un-issued. Handle these as cost reconciliation with your account manager.

Turning it off

Switch Channel enabled off at any time to stop new sales. G2A can no longer obtain a token, and your listings deactivate shortly after. Turn it back on whenever you're ready to resume.

Troubleshooting

Symptom on G2ALikely causeFix
Every call fails to authenticateWrong Client ID/Secret, or the channel is disabledRe-check the values from Step 1; make sure Channel enabled is on. Rotate the secret if unsure and update G2A.
Health check / calls return "not found"API URL is missing the /g2a segmentSet it to https://api.octopuscards.io/g2a
A listing won't sell / orders rejectedThe listing isn't mapped, or has no denominationAsk your account manager to map it with a face value
An order didn't completeInsufficient wallet balanceTop up your wallet; G2A retries automatically
Listings disappeared from G2AG2A's health check is failingConfirm the channel is enabled and credentials are current; listings re-activate once the health check passes

On this page