Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit 48d3542 · 11 days ago

Central Asia for engineers, part 3: accepting payments — Kaspi, Halyk, Freedom Pay, Payme, Click, MBank and Elsom

🌐 Machine-translated from Russian. Show original

Card schemes work everywhere, but local users in Central Asia often pay with super-apps and QR codes: Kaspi in Kazakhstan, Payme and Click in Uzbekistan, banking apps and ELQR in Kyrgyzstan. This part is an integration overview for a developer who has never shipped a payment flow in the region.

⚖️ Rules change. This post is an overview of official sources as of November 2026, not legal or tax advice. Before you act, check the current versions and talk to a local lawyer.

ℹ️ Terms change. Prices, plans and features are as of November 2026. Check the official sites before you buy or integrate.

In this part:

The landscape in one table#

CountryProviderPublic developer docsIntegration style
KZKaspi (Kaspi Pay)No public self-serve API foundContract with Kaspi; QR and payment in the Kaspi app
KZHalyk ePayYes — epayment.kz/docsOAuth2 token + hosted payment page + callback
KZFreedom PayYes — freedompay.kz/docsinit_payment with MD5 signature, redirect, callback
UZPaymeYes — developer.help.paycom.uzProvider calls your JSON-RPC endpoint (Merchant API)
UZClickYes — docs.click.uzProvider calls your Prepare / Complete endpoints (SHOP API)
KGMBankNo public docs foundMerchant onboarding through MBank business services
KGElsomNo public docs foundWallet operations moving into the KICB app
KGELQRNational QR standardQR codes accepted across banks and wallets

Before any code: almost every provider requires a local legal entity (or a partner who has one) and a bank account in the country. Plan onboarding weeks ahead of the launch date.

Kazakhstan#

Kaspi. Kaspi Pay is the dominant way to pay in Kazakhstan, but we did not find a public, self-serve merchant API. Integration is arranged with Kaspi under a contract; the business side starts at kaspi.kz. Several third-party services offer "Kaspi APIs" built on top of a merchant's cashier account — read Kaspi's terms before you depend on one.

Halyk ePay (epayment.kz/docs) has public documentation with a test environment:

  1. Your server gets an OAuth2 token (grant_type=client_credentials, scope payment) with the order data — invoice ID, amount, currency, terminal and callback URLs (postLink, failurePostLink).
  2. The browser loads the ePay payment page script and calls halyk.pay(...) with the payment object that includes the token.
  3. ePay sends the result to your postLink. Your server confirms it with a status check API call before marking the order as paid.

The docs list separate test and production hosts for OAuth, API and the payment page script. Keep them in configuration, never in code.

Freedom Pay (freedompay.kz/docs) uses a classic signed-request scheme. To build pg_sig: sort request parameters by name, put the script name (init_payment.php) first, add your secret key last, join with ; and take MD5.

import { createHash, randomBytes } from "node:crypto";

// Freedom Pay pg_sig, following the documented algorithm
function pgSig(script, params, secretKey) {
  const values = Object.keys(params).sort().map((k) => String(params[k]));
  return createHash("md5").update([script, ...values, secretKey].join(";")).digest("hex");
}

const params = {
  pg_order_id: "1001",
  pg_merchant_id: process.env.FP_MERCHANT_ID,
  pg_amount: "5000",
  pg_currency: "KZT",
  pg_description: "Order 1001",
  pg_salt: randomBytes(8).toString("hex"),
};
params.pg_sig = pgSig("init_payment.php", params, process.env.FP_SECRET_KEY);

Callbacks from Freedom Pay are signed the same way — verify the signature of every callback with the script name of your callback URL.

More detail on Kazakh banks, callbacks, refunds and QR payments: online payments with Kazakh banks (in Russian).

Uzbekistan#

Both big Uzbek providers use an "inverted" model: the provider calls your server to check the order and to confirm the payment. Your endpoint is effectively a billing API.

Payme Merchant API (developer.help.paycom.uz):

  • Transport: JSON-RPC 2.0 over HTTPS POST. Your server must always answer HTTP 200; errors go inside the JSON-RPC response.
  • Methods you implement: CheckPerformTransaction, CreateTransaction, PerformTransaction, CancelTransaction, CheckTransaction, GetStatement (plus fiscal data methods where required).
  • Authentication: HTTP Basic with login Paycom and the cashbox key from the merchant cabinet (a separate test key for the sandbox).
  • Amounts are in tiyin (1 UZS = 100 tiyin). A 5,000 UZS order is 500000.
  • The checkout link is the checkout host plus a Base64 string of parameters (m — merchant ID, ac.<field> — your order field, a — amount).
  • Payme may repeat the same call: CreateTransaction, PerformTransaction and CancelTransaction must be idempotent and return the stored result.
// Payme: check the Basic auth header before anything else
function paymeAuthorized(req) {
  const expected = "Basic " + Buffer.from("Paycom:" + process.env.PAYME_KEY).toString("base64");
  return req.headers.authorization === expected;
}

Click SHOP API (docs.click.uz):

  • Click sends two requests to your billing: Prepare (action=0) and Complete (action=1), as form-encoded POSTs.
  • Each request has sign_string — MD5 of concatenated fields with your secret key. For Prepare: click_trans_id + service_id + SECRET_KEY + merchant_trans_id + amount + action + sign_time; Complete adds merchant_prepare_id after merchant_trans_id.
  • Amount is in sums with decimals (5000.00), not in tiyin — a classic source of bugs when one codebase supports both Payme and Click.
  • You answer with JSON: error: 0 and your merchant_prepare_id / merchant_confirm_id, or a negative error code (for example, -1 for a failed signature check).
import { createHash } from "node:crypto";

function clickSignOk(b, secret) {
  const parts = [b.click_trans_id, b.service_id, secret, b.merchant_trans_id];
  if (String(b.action) === "1") parts.push(b.merchant_prepare_id);
  parts.push(b.amount, b.action, b.sign_time);
  return createHash("md5").update(parts.join("")).digest("hex") === b.sign_string;
}

Click publishes ready-made libraries, for example click-integration-php. Both providers offer a sandbox or test tools — run every scenario (duplicate requests, cancel after perform, wrong amount) before going live.

Kyrgyzstan#

MBank. MBank's business services (mbank.kg) include accepting QR payments from MBank and other apps. We did not find public developer documentation for online acquiring; expect to receive the API specification after merchant onboarding.

Elsom. Elsom is the e-wallet of KICB bank. According to KICB, since 18 November 2024 Elsom operations are moving into the KICB mobile app, and new users can no longer register in Elsom. For a new integration, talk to KICB about its current merchant acquiring rather than building on the old wallet.

ELQR — the national QR standard. The National Bank of the Kyrgyz Republic built a single standard for QR payments: a merchant QR code must accept payments from all participating banks and wallets. The operator is the Interbank Processing Center (Elcard). In 2026 international QR payments were launched via Alipay+. For a merchant this means one QR code reaches most local apps, and your provider (bank or payment organization) gives you the API to generate dynamic QR codes and receive notifications.

Freedom Pay also operates in Kyrgyzstan (freedompay.kg) with the same API and signature scheme as in Kazakhstan — convenient if you serve both markets.

One integration pattern for all providers#

  1. Create the order first, with a status pending, amount and currency in your database.
  2. Redirect or show QR — the provider's page, app or code.
  3. Receive the callback, verify the signature or auth header, check the amount and currency against your order.
  4. Make it idempotent — store provider transaction IDs with a unique constraint; repeated callbacks return the stored answer.
  5. Confirm with a status request where the provider offers one (Halyk ePay does).
  6. Reconcile daily against the provider's statement (GetStatement in Payme, reports in merchant cabinets).

Checklist for foreign teams#

  • Local legal entity and bank account (or a licensed partner) in each country.
  • Separate test and production credentials, stored in a secret manager.
  • Amount units per provider (tiyin vs sums vs tenge) covered by unit tests.
  • Callback endpoints reachable from the provider's IPs over HTTPS with a valid certificate.
  • Fiscal receipts: check local requirements — Payme has fiscal data methods; in Kazakhstan online cash registers apply.
  • Refund and cancel flows tested, not just the happy path.

Previous: Central Asia for engineers, part 2: data localization in Kazakhstan, Uzbekistan and Kyrgyzstan and a SaaS architecture for the region.

Sources#

Comments 00 участников · 1 гость🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.