API Keys
Let external tools use your products, customers, invoices, stock, and sales data without your login — give each key only the access it needs, let it expire, and revoke it any time.
Connect external tools and integrations to your account with API keys. Each key gives access to your products, customers, invoices, stock levels, and more — without sharing your login credentials. Give each key only the access it needs, let it expire on its own, and revoke it instantly when you no longer need it.
What it does
API Keys let you create authentication tokens that third-party tools can use to access your data through the Paymash API. Each key is a unique token (starting with sk_live_) that is shown once at creation — copy it immediately, because it cannot be retrieved again. Keys authenticate against a defined set of endpoints covering products, categories, customers, invoices, stores, statistics, VAT rates, company settings, and inventory — stock levels, stock history and exports, and booking stock movements and transfers between stores.
Each key has its own Access: Full access, Read only (reads invoices, customers, products and statistics, changes nothing), or Custom, where you choose per area — Invoices & payments, Customers, Products & stock, Statistics, Website — between none, read, and read & write. A key can also expire after 7, 30 or 90 days, after which it stops working by itself.
The key management page lists all your keys — active, expired and revoked — with the key prefix for identification, its access, the last-used timestamp, and the creation date. Revoked keys stay in the list for audit purposes but stop working immediately.
Benefits
- No credential sharing — external tools get their own key instead of using your login email and password
- Only the access it needs — a reporting tool gets read-only access, a stock tool only products and stock
- Temporary access that ends by itself — give an agency or a one-off import a key that expires
- Instant revocation — revoke a key with one click and it stops working immediately, no password change needed
- Per-key tracking — see when each key was last used to identify unused or suspicious keys
- Rate limited — each key is capped at 60 requests per minute to protect your account
- Audit trail — creating, editing and revoking keys is recorded in the Activity Log
How it works
- Open Settings → API Keys from the sidebar (manager-only — cashiers cannot see this page)
- Click Create Key, enter a name that identifies the integration (e.g. "Accounting sync" or "Inventory tool"), and choose its Access and when it Expires
- The full key is shown once in a copyable field — copy it now. After you close the dialog, only the prefix (
sk_live_XXXXXXXX) is visible - Hand the key to the external tool. It authenticates by sending the key in an
X-API-Keyheader or as aBearertoken - The key list shows each key's name, prefix, access, last-used time, and creation date. Use Edit key to change its access, expiry or allowed return domains later
- To revoke a key, click the revoke action on the key row. The key stops working immediately. Revoked keys remain visible in the list
Who is this for
- Business owners who want to connect their accounting software, ERP, or custom reporting tools to their Paymash data
- Developers building integrations that need programmatic access to the product catalog, customer list, stock levels, or sales data
- Merchants with a warehouse or ERP system that should read stock levels and book goods in, out, or between stores
- Agencies or consultants managing multiple clients — create a key per client tool and revoke it when the engagement ends
Can I see the full key after creation?
No. The full key is shown exactly once when you create it. After that, only the prefix (sk_live_ followed by 8 characters) is visible. If you lose the key, revoke it and create a new one.
What data can an API key access? Products, categories, customers, invoices, stores, statistics, VAT rates, company settings, and inventory. API keys cannot reach key management, employee data, or anything outside that list.
Can an API key read and change stock? Yes. A key can read stock levels, the stock list and summary, the movement history, and the stock export — and it can book stock movements and transfers between stores, so a warehouse or ERP system can keep your stock up to date. Movements booked through a key are recorded without an employee name, because no person made them. Low-stock alert settings and the till's own stock view stay in the app and aren't reachable with a key.
Is there a limit on how many keys I can have? Yes — up to 25 active keys per company. Revoked keys don't count toward the limit. If you hit 25, revoke an unused key to free a slot.
What happens if someone uses my key too fast? Each key is rate-limited to 60 requests per minute. If the limit is exceeded, the API returns a 429 status code with standard rate-limit headers showing when the limit resets.
Can cashiers create or manage API keys? No. The API Keys page is manager-only. Cashiers and non-manager employees cannot see or access it.
Do revoked keys disappear from the list? No. Revoked keys stay in the list with a revocation timestamp, so you have a full history of all keys ever created. They are sorted below active keys.
Can I restrict what a key can do? Yes. Choose Read only, or Custom to set each area — Invoices & payments, Customers, Products & stock, Statistics, Website — to none, read, or read & write. A key that tries something outside its access is refused. Keys created before this option existed keep full access until you edit them.
Can a key expire? Yes. Set Expires to 7, 30 or 90 days when you create or edit the key; after that the key is refused. There is no reminder before it expires. Choose Never for integrations that should keep running.
What are allowed return domains? Some integrations — a booking system, for example — create an invoice and send the customer to pay it online. List the integration's website under Allowed return domains (host names only, like booking.example.com) and, once the customer has paid, they are sent back to that site. Addresses not on the list are refused.
How do invoices created through an API key appear? In their own sales channel, API, numbered 4-1, 4-2 and so on, so you can tell them apart from the invoices your team writes. The connected system doesn't need to choose a channel. Otherwise they behave like invoices written in the back office: booked on invoice until paid, and editable in Sales.
Ready to try this feature?