Integrate Your Game with Sverse and Mint NFTs via API

Developer Guide

1. Overview

This guide explains how to integrate your game with Sverse in a multi-chain environment and mint NFTs via the Sverse Developer Platform API.

By integrating with Sverse, your game can:

  • authenticate and manage your application/project,

  • provision wallets (custodial or linked external addresses),

  • create chain-aware NFT collections,

  • mint NFTs to players,

  • and receive real-time events through webhooks.


2. Prerequisites

Before starting, you should have:

  • A Sverse developer account (via SDeveloper Portal)

  • A project/application created in Sverse (or permission to create one)

  • A target chain selected (via /v1/chains)

  • A server backend (recommended) to store secrets and call the API securely

Important:

  • Do not call privileged endpoints directly from the client.

  • Keep API keys and client secrets server-side.


3. Choose Environment and Base URL

Use Sandbox during development:

  • Sandbox: https://sandbox.sverse.io

Switch to Production for launch:

  • Production: https://open.sverse.io

All endpoint paths remain the same between environments.


4. Authenticate (Get Access Token)

Request

Response (example)

Use the returned accessToken as:

Authorization: Bearer <token>


5. Create or Select Your Project (Game/App)

A “project” represents your game/application in Sverse.

Create Project

Save the returned projectId.


6. Select Supported Chains

List available chains in the current environment:

Pick a chainKey for your NFT collection and mint flow, for example:

  • ton-mainnet / ton-testnet

  • eth-mainnet / eth-sepolia


Sverse supports a logical wallet that can have addresses on multiple chains.

7.1 Create a Wallet for a Player (Logical Wallet)

You will receive walletId.

Where do you get MEMBER_ID? Your game should maintain a mapping between your user identity and the Sverse app member (see Section 8).

Option A: Custodial address (Sverse-managed)

Option B: External address (player-managed)


8. Register Players as App Members

To track participation in your game, create or update app members.

This creates/updates the “membership” record that your game can query later.


9. Create an NFT Collection (Chain-Aware)

An NFT collection is tied to a chain and token standard.

Save the returned collectionId.

Note:

  • If your platform uses ERC-721/1155, set tokenStandard accordingly.

  • contractAddress may be optional depending on whether Sverse deploys it or you provide it.


10. Mint an NFT to a Player Wallet

Minting happens in the context of the collection.

Response (example)

Minting may be async. You should confirm via:

  • transaction status polling, and/or

  • webhooks (recommended).


11. Track Mint Confirmation (Transactions)

List transactions to see status updates:

Once confirmed, the transaction may include:

  • onchainTxHash

  • confirmations

  • explorerUrl


12.1 Create a Webhook Endpoint

Store the webhook secret securely.

12.2 Verify Webhook Signatures

Your webhook handler should:

  • read raw request body,

  • verify HMAC signature (based on the shared secret),

  • reject any invalid signatures,

  • then process the event idempotently.

Recommended properties:

  • eventId

  • eventType

  • createdAt

  • data payload with chainKey and references (txId, nftId, walletId)


Idempotency

Always use idempotencyKey for:

  • minting

  • transfers

  • order creation

This prevents duplicate actions when retries occur.

Server-to-Server Calls

Keep these server-side:

  • authentication

  • minting

  • transfers

  • webhook endpoint management

Multi-chain Support

Treat chain as a first-class parameter:

  • always store chainKey with your assets and transactions,

  • do not assume a single network,

  • handle different confirmation times across chains.

Reconciliation

For any economic action:

  • rely on webhook confirmation,

  • and fall back to polling for resilience.


14. Minimal End-to-End Example Flow

A working mint flow for a game typically follows:

  1. Player joins the game → upsert app member

  2. Create or obtain player walletId

  3. Ensure chain address exists (custodial or external)

  4. Create (or reuse) NFT collectionId

  5. Mint NFT to player walletId

  6. Confirm via webhook transaction.confirmed / nft.minted

  7. Update your game inventory state


15. Next Steps

After minting works, most games add:

  • Marketplace listing of minted NFTs

  • In-game utility rules for owned NFTs

  • Transfers/trades between players

  • Revenue sharing and fee configuration

Last updated