Postman
The Lunixi Postman collections let you try the API without writing code. The collection fetches the token itself and signs every request; you send the request and see the raw answer in Postman. For a production integration use the SDKs.
Downloading the files
All collections, environment templates and the local signer come in one package: download it as a ZIP (opens in a new tab) or open the GitHub repository (opens in a new tab). The file paths below are inside this package.
Without downloading, you can also import them in Postman with Import → Link from these addresses:
| Profile | File | Address |
|---|---|---|
| Payment, standalone | collection | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/standalone/Lunixi-Payment-Gateway.standalone.postman_collection.json |
| Payment, standalone | environment | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/standalone/environments/lunixi.standalone.template.postman_environment.json |
| Payment, local signer | collection | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/local-signer/Lunixi-Payment-Gateway.local-signer.postman_collection.json |
| Payment, local signer | environment | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/local-signer/environments/lunixi.local-signer.template.postman_environment.json |
| Fraud, standalone | collection | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/fraud/standalone/Lunixi-Fraud.standalone.postman_collection.json |
| Fraud, standalone | environment | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/fraud/standalone/environments/lunixi-fraud.standalone.template.postman_environment.json |
| Fraud, local signer | collection | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/fraud/local-signer/Lunixi-Fraud.local-signer.postman_collection.json |
| Fraud, local signer | environment | https://raw.githubusercontent.com/Lunixi-Payment/postman/main/fraud/local-signer/environments/lunixi-fraud.local-signer.template.postman_environment.json |
Two profiles
| Profile | When | Where the private key is |
|---|---|---|
| Local signer (recommended) | You can run a small Node.js helper on your machine | Only in the helper process; it never enters the collection |
| Standalone | You cannot use a terminal | In the private_key_pem variable of the Postman environment |
In both profiles the token is kept in the Postman environment until it expires.
Local signer
Files:
local-signer/Lunixi-Payment-Gateway.local-signer.postman_collection.jsonlocal-signer/environments/lunixi.local-signer.template.postman_environment.jsontools/signer-server.js
In the folder where you unpacked the package, start the signer with the full path of your private key; without a key the signer does not start:
LUNIXI_PRIVATE_KEY_PATH=/absolute/path/private.pem node tools/signer-server.jsThe signer listens on http://127.0.0.1:8787 (change it with POSTMAN_SIGNER_PORT). Then import the collection and the environment into Postman. The signer signs every request, so keep it running while you use the collection.
Standalone
Files:
standalone/Lunixi-Payment-Gateway.standalone.postman_collection.jsonstandalone/environments/lunixi.standalone.template.postman_environment.json
You enter the private key in the environment's private_key_pem variable; the collection's pre-request script fetches the token and signs every request inside Postman. No extra package is needed.
In the standalone profile the private key lives in the Postman environment. Do not share or export the environment; use the local signer profile when you can.
Environment variables
| Variable | Description |
|---|---|
base_url | https://api-gateway.lunixi.com |
key_id | Your API key's id (mk_live_sk_… or mk_test_sk_…) |
private_key_pem | Standalone profile only: the private key |
signer_url | Local signer profile only: http://127.0.0.1:8787 |
callback_url | Where the buyer returns after the payment |
currency | Default currency (TRY) |
The key decides the environment: requests sent with a TEST key go to the test environment. The other variables (payment id, token and so on) are filled by the collection as the requests run.
Request signature
The collection signs every request on top of the Bearer token with the X-Key-Id, X-Date, X-Nonce, X-Signature and, when there is a body, Digest headers. Before signing, {{variables}} are resolved and the JSON body is sent without whitespace, so the signature covers exactly what the gateway receives. Every send gets a new X-Nonce and X-Date, so sending a request again is fine.
Every request has a request is authenticated test. A 401 means the token or the request signature was rejected; the Postman Console shows the signed headers. → Authentication
What the payment collection contains
Auth · Payments / Checkout · Payments / Actions · Payment Methods · Split Payments · Promissory Notes · Reference · Payment Links · BIN / Installments · Stored Cards · Analytics · Webhooks · Wallet · Bank Accounts · Bank Transfers · Insurance · Sanction
Fraud collection
The fraud surface has its own collection per profile:
fraud/local-signer/Lunixi-Fraud.local-signer.postman_collection.jsonfraud/standalone/Lunixi-Fraud.standalone.postman_collection.json
Folders: Auth, Decision, Event Ingest, Decision Logs. The event ingest endpoints need a per-request signature; in the local signer profile run Prepare Signed Event first, then Record Transaction Event (the same pair for batches). The fraud environment templates are prepared for a TEST key by default.
Related
- REST without an SDK — the signing flow
- Authentication — canonical string and signature headers
- Testing — working with a TEST key