Who it’s for
Payments for gaming services
A player bought currency and wants it in the game — now. Your server gets a webhook with the nickname and the pack and credits the purchase automatically while the player is still online.
- No company required
- 3% fee
- Payouts in USDT
How it works
From the “Pay” button to the delivered purchase — with no manual checking of transfers.
- 1
The player picks a pack
In the shop on your site or in your bot. Your server creates an invoice:
metadataholds the nickname and what to credit. - 2
Payment via SBP
The form opens by link or in Telegram: one tap to the bank app on a phone, a QR code on desktop.
- 3
Your server gets
invoice.paidThe event carries your
order_idandmetadata: whom to credit and with what. - 4
The purchase is in the game
Your server credits the currency or the perk, and the player returns to the shop via
return_url.
What your server receives
An invoice is created with one API request, and your server is notified by webhook. The sample is in Node.js.
order_idandmetadatafrom the request come back inevent.data— use them to deliver the order. The buyer never seesmetadata.- The signature is checked by
verify(token, header, body)— the docs have it in four languages. Test events are signed with the test key, live ones with the live key. "test": truemeans a test-mode payment: no money moved, deliver nothing.- The same event may arrive twice — deduplicate by
ExpressOplata-Event-Id. Respond with2xxwithin 10 seconds, or the delivery is retried. - Credit based on
metadata, not on the amount paid: then the pack does not depend on who pays the fee.
{
"amount": "349.00",
"order_id": "gd-99120",
"description": "In-game currency",
"return_url": "https://game.example/shop",
"metadata": {
"player": "Steve_42",
"coins": 500
}
}Webhook handler · Node.js
import express from "express";
import { verify } from "./verify.js"; // the function from /en/docs/#signature
import { db, game } from "./app.js"; // your code
const app = express();
app.post("/hooks/expressoplata", express.raw({ type: "application/json" }), async (req, res) => {
const event = JSON.parse(req.body); // req.body is the raw bytes the signature covers
const token = event.test ? process.env.EO_TEST_TOKEN : process.env.EO_TOKEN;
if (!verify(token, req.get("ExpressOplata-Signature") ?? "", req.body)) return res.sendStatus(401);
if (event.type !== "invoice.paid") return res.sendStatus(200);
const eventId = req.get("ExpressOplata-Event-Id");
if (await db.isDone(eventId)) return res.sendStatus(200); // a repeat of the same event
const { order_id, metadata } = event.data;
if (event.test) {
console.log("a test payment: the path works, deliver nothing", order_id);
} else {
await game.credit(metadata.player, metadata.coins); // the currency goes to the player
}
await db.markDone(eventId);
res.sendStatus(200);
});
app.listen(8080);Common questions
All questionsWhat can I sell?
In-game currency, perks, access to your own servers — your project’s own goods and services. Casinos without a licence cannot be connected: the rules forbid them outright.
What about donations?
Fine, as long as they pay for your own project. The rules forbid collecting “donations” on behalf of third parties.
How do I avoid crediting twice?
The same event may arrive again — deduplicate by the ExpressOplata-Event-Id header. Pass the purchase number in order_id: a repeat request with the same number and amount returns the same invoice.
Who pays the fee — us or the player?
You decide: the bot sets the player’s share — from 0 to 100%. If the player pays all of it, the 3% fee is added on top and you receive the full price of the pack.
Connect your project
Submit a request on the site or in the bot. The test key works right away, before the project is reviewed.