Subscriptions
A subscription is a standing agreement, created by your server, under which Invo bills one of your players a fixed USD price on a fixed interval and grants them your game’s currency each period. You keep the entitlement (what the member gets in your game). Invo keeps the clock, the charges, the retries, the notifications and the revenue split. This section walks the whole thing, on both rails, with the exact call at every step in curl, Node and Python.
The pages in this section
The card road, end to end
Capture a card without touching card data, create the subscription, handle every first_charge outcome including the authentication step, trials, wallet-only, consent evidence and attribution.
The Steam road, end to end
Init, the overlay or web-session authorisation, finalize, what a period is worth in each country, what Steam cannot do, and the traps.
Reading and changing a subscription
Get, list, the full subscription object, cancel (now or at period end), change the price, change the card.
Renewals, funding and dunning
The billing clock, the wallet-first funding order with worked examples on both rails, the 2 / 3 / 2 retry ladder, grace, expiry, card authentication and the deferrals you are not told about.
Webhooks
Every event with a card example and a Steam example, the envelope, the exact signature scheme, retries, dedupe, and which event to trust for what.
Refunds
Refund a billed period, full or partial, what goes back to the card and what goes back to the wallet, the receipt and the event.
Sandbox recipe
The four clock tools and their second credential, then a step-by-step recipe on each rail that takes a subscription from creation through renewals, dunning, expiry, cancel and refund in minutes.
Error reference
Every code every subscription route can return, grouped by route, with the remedy.
Launch checklist and traps
What must be true before you go live, and the sixteen card traps and sixteen Steam traps that account for nearly every support question.
Reporting and attribution
Three read-only endpoints that tell you what each nominated recipient is owed for a window, net of reversals. A report, not a remittance.
What happens each billing period
- Invo works out what the period is worth in coins. On the card rail that is the price times the platform peg of 10 coins per USD: a
9.99USD period is worth99.90coins. On the Steam rail it is what that price buys through Steam for the member’s country, floored to whole coins (for example69coins for9.99USD in the US). - Invo spends the member’s existing wallet balance first.
- If the wallet is short, Invo tops it up from the rail behind the subscription (the saved card, or the member’s Steam agreement) for the shortfall only, mints the coins, and then spends the full period amount from the wallet.
- The coins spent are split between Invo’s platform fee and your revenue. The fee percentage is your game’s platform fee (10 percent by default; the remainder, 90 percent, is yours). On the card rail a fixed component of
0.30USD is added to the fee on the card-funded portion of a renewal only; the wallet-funded portion carries the percentage alone. The exact figures are reported on every renewal event in thesplitblock. - Invo settles your revenue to you through your normal partner payout. Invo never pays anyone else on your behalf (see
revenue_share, which is attribution only).
The member’s ledger always reads “coins in, coins out”. The wallet is the unit of account; the rail is only ever used for the shortfall. A member who already holds enough balance renews without any card or Steam call at all.
The two clocks
Two different dates live on every subscription and must not be confused.
| Field | Meaning | Exists when |
|---|---|---|
current_period_start / current_period_end | The billing window Invo is currently billing or about to bill. A projection. | From the instant the subscription is created, before any money has moved. |
paid_through | The entitlement boundary: the furthest date the member has actually paid for. | Only after a period has been charged successfully. null before that. |
Grant access from paid_through, never from current_period_end
A subscription created a minute ago has a current_period_end a month out and a paid_through of null until its first charge lands. Code that reads the window as entitlement hands out a month of access for nothing.
Statuses
status | Live? | Meaning |
|---|---|---|
trialing | yes | In a free trial. Nothing charged yet. The first charge runs when the trial ends. |
active | yes | Billing normally. The most recent charge succeeded. |
past_due | yes | A charge failed and Invo is retrying on the dunning schedule. Access is retained through the grace window. |
awaiting_authentication | yes | A card charge needs the cardholder to authenticate. Nothing has been charged. Not a failure. |
pending_steam_authorization | no | Steam only. Created, waiting for the member to authorise the agreement in Steam. Not billable, and does not occupy the one-live-per-item slot. |
canceled | no | Ended by you, by the member through Steam, or retired at period end after an at-period-end cancel. Terminal. |
expired | no | Ended by Invo after the retry budget ran out (or, on Steam, after the member never authorised). Terminal. |
“Live” means the subscription occupies the member’s one-live-subscription-per-item slot and will be touched by the renewal engine.
State transitions
| From | Event | To |
|---|---|---|
| (create, no trial) | first charge succeeds inline | active |
| (create, no trial) | first card charge needs authentication | awaiting_authentication |
| (create, no trial) | first charge fails | past_due |
| (create, trial) | trialing | |
trialing | trial ends, first paid period charges | active (or past_due / awaiting_authentication on failure) |
active | renewal succeeds | active (period advanced) |
active | renewal fails | past_due |
active | card needs authentication | awaiting_authentication |
past_due | retry succeeds | active |
past_due | retry budget exhausted | expired |
awaiting_authentication | member completes the challenge | active |
awaiting_authentication | challenge lapses | back to ordinary retries (past_due on the next failure) |
| any live | POST /cancel with at_period_end: false, or nothing paid yet | canceled immediately |
| any live | POST /cancel with at_period_end: true and a paid period | stays live with cancel_at_period_end: true, then canceled at paid_through |
| Steam, any live | member cancels the agreement from their Steam account | canceled (event carries canceled_by: "steam") |
pending_steam_authorization | POST /steam/finalize after the member authorises | active |
pending_steam_authorization | not authorised within 24 hours | expired |
A paid renewal always lands in active, whatever the subscription was before.
Which rail
funding_rail | How the shortfall is funded | Created by | Page |
|---|---|---|---|
card | The member’s saved card on file with Invo. | POST /api/subscriptions/subscribe | Card road |
steam | The member’s Steam wallet, through a recurring agreement they authorise once. | POST /api/subscriptions/steam/init then POST /api/subscriptions/steam/finalize | Steam road |
A subscription’s rail is fixed at creation. A card cannot be attached to a Steam subscription and a Steam agreement cannot be attached to a card subscription.
One item_id per membership, shared across both rails
The one-live-subscription rule is per game, per player, per item_id, and it does not care which rail the subscription is on. So the recurring membership’s item_id must be the same value whether the member subscribes by card or through Steam, and it must be different from the id of any one-off pack you sell (a one-off purchase of “guild-42-membership” and a subscription to it are not the same product).
The guard is 409 ACTIVE_SUBSCRIPTION_EXISTS: a Steam init for an item the member already subscribes to by card (or the reverse) is refused with the live subscription_id in the body. Cancel the old one first, or treat the 409 as “already a member”.
| Capability | Card | Steam |
|---|---|---|
| Trials | yes | no |
| Intervals | month or year, interval_count 1 to 36 | month or year, interval_count 1 only |
| Price increases | staged for the next period (with limits) | refused; start a new subscription |
| Price decreases | staged | staged |
| Wallet-only mode | yes | no |
| Change the payment method | yes | no |
| Refunds | yes | not yet for Steam-charged periods |
| Coins per period | price times 10 | depends on the member’s country, fixed at init |
| Member can cancel from outside your game | no | yes, from their Steam account |
Prerequisites
Your game must be live
Creating a subscription (/subscribe and /steam/init) requires the game to be in live status. A game in testing status is refused with 403 GAME_NOT_LIVE. A testing game may still read, list, cancel, reprice and change the card on existing subscriptions. Make the game live from the developer console before you create your first subscription, in sandbox as well as in production.
Keys, and which to use where
Every request carries your server-side secret in the X-Game-Secret-Key header. Two kinds of key are accepted in that header:
| Key | What it is | Use it for |
|---|---|---|
Primary game key (ivsdk_...) | The key issued with the game. Names no storefront. | Everything in this section. |
| Channel key | A per-storefront key you create for the game (steam, ios, android, web, console). | Everything on the card rail. On the Steam rail only the steam channel key (or the primary key) may start a Steam subscription; a key for any other channel is refused 409 STEAM_CHANNEL_REQUIRED. |
Both kinds carry a 7-day rotation grace: after you rotate, the previous key keeps working for 7 days. Keys are server-side credentials. Never ship them in a game client, a browser or a mobile app.
| HTTP | Body | Meaning |
|---|---|---|
| 401 | {"message": "X-Game-Secret-Key header is required"} | Header missing. |
| 401 | {"message": "Invalid game secret key"} | Unknown, disabled or out-of-grace key. |
| 403 | {"message": "Game '<name>' is not active"} | The game is suspended or otherwise not live or testing. |
Base URLs
| Environment | API base | Console |
|---|---|---|
| Sandbox | https://sandbox.invo.network/sandbox | https://dev.console.invo.network |
| Production | https://invo.network | https://console.invo.network |
Production BASE = https://invo.network Sandbox BASE = https://sandbox.invo.network/sandbox # every path in this section is written against BASE: POST $BASE/api/subscriptions/subscribe # sandbox: https://sandbox.invo.network/sandbox/api/subscriptions/subscribe # production: https://invo.network/api/subscriptions/subscribe
The sandbox /sandbox prefix is part of the base. A request without it returns a 404 that looks exactly like a wrong path. Each environment has its own game keys; never mix them. The sandbox clock tools have one more twist: they live at $BASE/subscriptions/<id>/... with no /api segment. See the sandbox recipe.
Subscribe to webhooks before you go live
Renewals, failures, authentication challenges, cancellations, expiries and refunds are all reported by webhook, and several of them carry data you cannot fetch any other way (for example the confirmation link on subscription.authentication_required). Register a target URL before you create a real subscription. See Webhooks.
Identity: what a member needs
A member is identified by player_email. player_name is required on create and is used only if the player does not exist yet in your game. player_phone is optional. If the phone you supply already belongs to a different identity on the platform, the create is refused with 409 PHONE_SHARE_APPROVAL_REQUIRED and a one-time code is sent to the phone’s current owner; the body carries approval_id, expires_at and next_endpoint for the approval flow.
Rate limits
| Surface | Limit | On 429 |
|---|---|---|
POST /subscribe, POST /steam/init | 30 per hour per (game, player_email); 2000 per minute per game | Body {"error": "rate_limit_exceeded", "message": "...", "retry_after": <seconds>} plus a Retry-After header. |
GET /player | 120 per minute per (game, player_email); 6000 per minute per game | Same. |
GET /<subscription_id> | 6000 per minute per game | Same. |
POST .../cancel, .../amount, .../payment-method | 30 per minute per (game, subscription); 2000 per minute per game | Same. |
POST .../refund | 20 per minute per (game, subscription) | {"message": "Too many refund requests. Please slow down.", "error_code": "RATE_LIMITED"} |
| Sandbox clock tools | 10 per minute per (game, subscription); 60 per minute per IP | {"message": "Sandbox clock rate limit exceeded", "error_code": "RATE_LIMITED"} |
POST /api/currency-purchases/setup-intent | 20 per hour per player_email | Message only. |
Conventions used throughout
- All timestamps are ISO 8601 with an explicit offset, for example
2026-11-05T14:02:11.482913+00:00. - All money and coin figures are JSON strings, never numbers (
"9.99", not9.99), so a parser cannot silently round them. - Match on
error_code(and onstatuswhere the body carries one), never on the human-readablemessage. Messages are illustrative and may be reworded. - “Member” and “player” mean the same person: the end user your game bills. “Partner” and “developer” mean you.
- Where a shape on these pages disagrees with the API, the API wins and the page has a bug. Tell us.
Clients used by the samples
Every page in this section stacks the same five samples per call: curl, Node with the @invonetwork/web-sdk server client, Node over raw HTTP, Python with the invonetwork package, and Python over raw HTTP. The SDK samples assume the clients below; the raw HTTP samples assume the two helpers below and nothing else.
import { InvoServer } from "@invonetwork/web-sdk/server";
const invo = new InvoServer({
gameSecret: process.env.INVO_GAME_SECRET!, // server-side only
baseUrl: process.env.INVO_BASE_URL!, // https://invo.network | https://sandbox.invo.network/sandbox
});const BASE = process.env.INVO_BASE_URL; // https://invo.network | https://sandbox.invo.network/sandbox
const GAME_SECRET = process.env.INVO_GAME_SECRET; // server-side only
async function invo(method, path, body) {
const res = await fetch(BASE + path, {
method,
headers: { "Content-Type": "application/json", "X-Game-Secret-Key": GAME_SECRET },
body: body === undefined ? undefined : JSON.stringify(body),
});
const json = await res.json().catch(() => ({}));
return { status: res.status, json };
}import os
from invonetwork import InvoServer
invo = InvoServer(
game_secret=os.environ["INVO_GAME_SECRET"], # server-side only
base_url=os.environ["INVO_BASE_URL"], # https://invo.network | https://sandbox.invo.network/sandbox
)import os, requests
BASE = os.environ["INVO_BASE_URL"] # https://invo.network | https://sandbox.invo.network/sandbox
GAME_SECRET = os.environ["INVO_GAME_SECRET"] # server-side only
def invo(method, path, body=None, params=None):
r = requests.request(method, BASE + path,
headers={"Content-Type": "application/json",
"X-Game-Secret-Key": GAME_SECRET},
json=body, params=params, timeout=30)
try:
return r.status_code, r.json()
except ValueError:
return r.status_code, {}Where to start
Read the card road or the Steam road for your rail, then Webhooks, then run the sandbox recipe end to end. Finish with the checklist before you flip the game live in production.