# Rimest > Rimest is a payment processor built on the Nano network: instant settlement, low fees, no bank approval. This file is the full LLM integration guide for the Rimest REST API. ## Docs - [Integration docs](https://rimest.com/docs): Human-readable API and webhook documentation - [What is Nano?](https://rimest.com/nano): Introduction to the Nano network - [Live demo](https://rimest.com/demo-market): Try a test checkout end to end ## Full guide The complete API reference follows in this file. --- # Rimest — LLM Integration Guide # https://rimest.com/llms.txt # Feed this file to your LLM to get full Rimest payment integration context. ## What is Rimest? Rimest is a payment infrastructure built on the Nano blockchain. It allows businesses to accept NANO payments with instant confirmation (< 1 second), low fees (1%), and no bank approval. Service is unavailable in restricted countries and regions. All interaction happens via a simple REST API authenticated with an API key. --- ## Base URL https://api.rimest.com All responses are JSON. All requests must use HTTPS. --- ## Pricing - Platform fee: 1% of the transaction amount by default (configurable per account; some accounts 0.5%). The `fee` field on every transaction is returned in raw NANO so you always know the exact cut. - No setup fee, no monthly fee. New accounts must be approved by an admin before they can accept payments; CreateTransaction returns 403 until the account is approved. --- ## Authentication Include your account API key in every request header: X-Api-Key: rms_your_key_here - API keys start with `rms_` - Find and manage your key on the Account page in the Rimest dashboard - NEVER expose your API key in client-side code (JS bundles, mobile apps) - Always call the Rimest API from your backend server --- ## Payment Flow (3 steps) 1. CREATE — Your server calls POST /CreateTransaction with the amount. You receive a transaction GUID. 2. REDIRECT — Send the customer to: https://rimest.com/pay/{guid} The page shows the exact NANO amount and a QR code for the customer to scan. 3. NOTIFY — When payment is confirmed, Rimest sends a signed POST to the webhook URL configured on your account. No polling needed. Confirmation typically arrives within 1 second. --- ## Endpoints ### POST /CreateTransaction Creates a new payment transaction. Returns the transaction GUID as a plain JSON string. Request Headers: Content-Type: application/json X-Api-Key: rms_your_key_here Request Body Fields: amount (string, required) — Raw NANO integer string, OR fiat decimal when currencyCode is set currencyCode (int?, optional) — null = raw NANO | 840 = USD expiryMinutes (int?, optional) — Payment window in minutes. Default: 10. Minimum: 2. note (string?, optional) — Internal note or order reference. Not shown to customers. NOTE: The webhook URL is set once on your account (Account page), NOT per transaction. The account must be approved before CreateTransaction succeeds (otherwise 403). Response (200 OK): "a3f7c2d1-84e0-4b2a-9f13-000000000000" ← plain JSON string (the transaction GUID) Error Responses: 400 — Missing or invalid amount / no API key and no accountGuid 401 — Invalid API key 403 — Account not approved, or owner restricted 404 — Account not found 429 — Rate limit (50/min) or too many open transactions — retry later 503 — Live price unavailable (fiat mode) — retry in a few seconds Example — 5 USD: POST /CreateTransaction Content-Type: application/json X-Api-Key: rms_your_key_here { "amount": "5.00", "currencyCode": 840, "expiryMinutes": 15, "note": "Order #1042" } Example — Fixed NANO amount (1 NANO): POST /CreateTransaction Content-Type: application/json X-Api-Key: rms_your_key_here { "amount": "1000000000000000000000000000000", "currencyCode": null, "expiryMinutes": 10 } --- ### GET /GetTransaction?guid={guid} Returns full details of a transaction. No authentication required. Suitable for polling from the customer's browser. Response Fields: guid (string) — Transaction identifier amount (string) — Required payment in raw NANO fee (string) — Platform fee in raw NANO transporterAccount (string) — NANO address the customer must send to isCompleted (bool) — true once payment is received createDate (string, UTC) — Transaction creation time completedDate (string, UTC) — Confirmation time; default 0001-01-01T00:00:00 until completed expiryMinutes (int) — Payment window duration account (object) — Public account info (name, type). Never includes the API key. NOTE: senderAccount is NOT returned by GetTransaction; it is only delivered in the webhook payload. Example Response: { "guid": "a3f7c2d1-84e0-4b2a-9f13-000000000000", "amount": "5000000000000000000000000000000", "fee": "50000000000000000000000000000", "transporterAccount": "nano_1abc...xyz", "isCompleted": false, "createDate": "2026-04-28T10:00:00Z", "completedDate": "0001-01-01T00:00:00", "expiryMinutes": 15, "account": { "name": "My Store", "accountType": 0 } } --- ### POST /CheckTransactionIsComplete Lightweight endpoint to check if a transaction has been paid. Returns a plain JSON boolean. Use as a fallback if your webhook was not received. Request Body: { "transactionGuid": "a3f7c2d1-84e0-4b2a-9f13-000000000000" } Response: true or false --- ## Webhooks Configure a webhook (callback) URL once on your account from the Account page — it is NOT passed per transaction. Rimest will POST to that URL the moment payment is confirmed on the NANO network — typically within 1 second. IMPORTANT: Your endpoint must respond with HTTP 2xx. Rimest does NOT retry failed webhook deliveries automatically. Every delivery attempt (status code, timing, success/failure) is logged on the account's page in the dashboard, where you can manually re-send the webhook for any transaction. Use CheckTransactionIsComplete as a programmatic fallback for missed webhooks. Webhook Request Headers: Content-Type: application/json X-Rimest-Event: transaction.completed X-Rimest-Signature: sha256= ← HMAC-SHA256 of raw JSON body, keyed with your API key Webhook Payload Fields: event (string) — "transaction.completed" transactionGuid (string) — The confirmed transaction's GUID amount (string) — Paid amount in raw NANO fee (string) — Platform fee in raw NANO senderAccount (string) — Customer's NANO address completedDate (string, UTC) — Confirmation timestamp note (string?) — The note you set when creating the transaction accountGuid (string) — Your Rimest account GUID Example Payload: { "event": "transaction.completed", "transactionGuid": "a3f7c2d1-84e0-4b2a-9f13-000000000000", "amount": "5000000000000000000000000000000", "fee": "50000000000000000000000000000", "senderAccount": "nano_3xyz...", "completedDate": "2026-04-28T10:02:37Z", "note": "Order #1042", "accountGuid": "f1e2d3c4-..." } --- ## Webhook Signature Verification To verify a webhook came from Rimest: 1. Compute HMAC-SHA256 of the RAW request body (do NOT parse JSON first) 2. Use your API key as the HMAC secret 3. Compare "sha256=" + hex_digest with the X-Rimest-Signature header 4. Always use constant-time comparison to prevent timing attacks Node.js example: const crypto = require("crypto"); function verifyRimestWebhook(rawBody, signatureHeader, apiKey) { const expected = "sha256=" + crypto.createHmac("sha256", apiKey) .update(rawBody) .digest("hex"); return crypto.timingSafeEqual( Buffer.from(signatureHeader), Buffer.from(expected) ); } PHP example: function verifyRimestWebhook(string $rawBody, string $sigHeader, string $apiKey): bool { $expected = "sha256=" . hash_hmac("sha256", $rawBody, $apiKey); return hash_equals($expected, $sigHeader); } --- ## Currency Codes (ISO 4217 numeric) null — Raw NANO — amount is an integer string e.g. "1000000000000000000000000000000" 840 — USD — amount is a decimal string e.g. "9.99" When using a fiat currency code, Rimest fetches the live NANO/fiat rate. If the price feed is temporarily unavailable, the endpoint returns 503. Implement retry with exponential backoff. --- ## Amount Format — Raw NANO The NANO protocol uses indivisible units called "raw". 1 NANO = 1,000,000,000,000,000,000,000,000,000,000 raw (10^30) Always send and store raw amounts as STRINGS — they exceed JavaScript's safe integer range. Use BigInt in JavaScript, BigInteger or Decimal in other languages. Common amounts: 0.001 NANO = "1000000000000000000000000000" 0.01 NANO = "10000000000000000000000000000" 0.1 NANO = "100000000000000000000000000000" 1 NANO = "1000000000000000000000000000000" 10 NANO = "10000000000000000000000000000000" JavaScript helpers: const NANO = BigInt("1000000000000000000000000000000"); function nanoToRaw(nano) { const [whole, frac = ""] = String(nano).split("."); const fracPadded = frac.padEnd(30, "0").slice(0, 30); return (BigInt(whole) * NANO + BigInt(fracPadded)).toString(); } function rawToNano(raw) { const r = BigInt(raw); return `${r / NANO}.${(r % NANO).toString().padStart(30, "0")}`; } --- ## Full Code Examples ### cURL — Create a $5 USD transaction curl -X POST https://api.rimest.com/CreateTransaction \ -H "Content-Type: application/json" \ -H "X-Api-Key: rms_your_key_here" \ -d '{ "amount": "5.00", "currencyCode": 840, "expiryMinutes": 15, "note": "Order #1042" }' ### Node.js — Full payment flow with webhook const API_BASE = "https://api.rimest.com"; const API_KEY = process.env.RIMEST_API_KEY; async function createPayment(amountUsd, note) { const res = await fetch(`${API_BASE}/CreateTransaction`, { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Key": API_KEY }, body: JSON.stringify({ amount: amountUsd.toFixed(2), currencyCode: 840, expiryMinutes: 15, note, }), }); if (!res.ok) throw new Error(`Rimest API error: ${res.status}`); const guid = await res.json(); return `https://rimest.com/pay/${guid}`; } // Webhook handler (Express) const crypto = require("crypto"); app.post("/webhooks/rimest", express.raw({ type: "application/json" }), (req, res) => { const sig = req.headers["x-rimest-signature"]; const expected = "sha256=" + crypto.createHmac("sha256", API_KEY).update(req.body).digest("hex"); if (!crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) return res.status(401).send("Invalid signature"); const event = JSON.parse(req.body); if (event.event === "transaction.completed") { fulfillOrder(event.note, event.transactionGuid); } res.sendStatus(200); }); ### PHP — Create & handle webhook true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "X-Api-Key: " . $_ENV["RIMEST_API_KEY"], ], CURLOPT_POSTFIELDS => json_encode([ "amount" => number_format($amountUsd, 2, ".", ""), "currencyCode" => 840, "expiryMinutes" => 15, "note" => $note, ]), ]); $guid = json_decode(curl_exec($ch)); curl_close($ch); return "https://rimest.com/pay/" . $guid; } // Webhook handler $rawBody = file_get_contents("php://input"); $sigHeader = $_SERVER["HTTP_X_RIMEST_SIGNATURE"] ?? ""; $expected = "sha256=" . hash_hmac("sha256", $rawBody, $_ENV["RIMEST_API_KEY"]); if (!hash_equals($expected, $sigHeader)) { http_response_code(401); exit("Invalid signature"); } $event = json_decode($rawBody, true); if ($event["event"] === "transaction.completed") { fulfillOrder($event["note"], $event["transactionGuid"]); } http_response_code(200); ?> --- ## Quick Integration Checklist - [ ] Create a Rimest account at https://rimest.com/register - [ ] Create an account (project) in the dashboard and wait for admin approval (required to accept payments) - [ ] Set your webhook (callback) URL on the Account page - [ ] Copy your API key from the Account page - [ ] Call POST /CreateTransaction from your backend with the amount - [ ] Redirect the customer to https://rimest.com/pay/{guid} - [ ] Implement a webhook endpoint to receive payment confirmation - [ ] Verify the X-Rimest-Signature header on every webhook - [ ] Use CheckTransactionIsComplete as a fallback for missed webhooks --- ## Links - Dashboard: https://rimest.com - Docs: https://rimest.com/docs - Support: support@rimest.com - X / Twitter: https://x.com/RimestPay