Connecting your systems
How a POS, ERP, booking or inventory system connects to NexG, how data moves each way, and how NexG shows your data on nexgapp.com.
On this page
Three directions
A point-of-sale, ERP, booking or inventory system can be connected to NexG in three directions. Each has its own channel and its own security.
| Direction | How | Status |
|---|---|---|
| Your system reads NexG | Calls the API with a key: your orders, your catalogue as NexG publishes it, zones and events. See the reference. | Live |
| Your system tells NexG | Posts signed events to NexG. See Webhooks. | Banks, in sandbox. Other systems coming soon. |
| NexG calls your system | NexG registers your system as a connection, keeps its credentials in a vault, and tests it from its database. | Registration and tests live. Syncing data coming soon. |
What moves, and which way
| Data | Into NexG today | Out of NexG today | Coming soon |
|---|---|---|---|
| Catalogue and prices | Merchant console, or a CSV export from your system | GET /v1/catalog/merchants/{id} | Sync from your system |
| Availability | The available column, in the console or CSV | available on each item | Stock levels from your inventory |
| Orders and their stage | Guests order on nexgapp.com | GET /v1/orders | Bookings by API; order events pushed to you |
| Payments | Signed bank events (sandbox) | payment_status on each order | A live bank |
| Settlements and payouts | Not over any API | Not over any API | Not planned yet |
Connecting a system today
Your catalogue, from your system to NexG
Export your products from your POS or ERP as CSV and import the file in the NexG merchant console (Menu, then import). The import shows a preview with any problems row by row before anything is written. A row with an id updates that item; a row without one updates the item with exactly that name, or adds a new one, so re-importing the same file never duplicates products.
id,section,name,description,price_kes,available,age_restricted
,Popular,Nyama choma platter,"Half kilo of goat ribs, kachumbari, ugali",1450,true,false
,Popular,Grilled tilapia,"Whole fish, lemon and chilli, sukuma wiki",1200,true,falseThe full template adds portion_size, ingredients, allergens, dietary_labels, prep_time_minutes, availability_notes, handling_notes and storage_guidance. Download it from the same page. Photos are uploaded in the console, not in the file. Prices are whole shillings.
Your orders, from NexG to your system
Issue a key with merchant_read for your merchant, then poll your orders once a minute and upsert them by order_id. Map NexG's stage to your own statuses once, in one place.
// Every minute: read new and changed orders, newest first, until one you
// already have at the same stage. Keyed by NexG's order_id.
const res = await fetch('https://api.nexgapp.com/v1/orders', {
headers: { 'X-Api-Key': process.env.NEXG_API_KEY },
});
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
for (const order of body.data.items) {
await pos.orders.upsert({
externalId: order.order_id, // NexG's id
reference: order.reference, // what staff read: NX-261110-0003
status: STAGE_TO_POS[order.stage],
totalCents: order.total_cents, // integer cents, never a float
});
}| NexG stage | Means |
|---|---|
placed | A guest has ordered. New for you. |
confirmed | Accepted. |
preparing | Being made or packed. |
ready | Ready for the rider. |
picked_up | The rider has it. |
arriving | Nearly there. |
delivered | Done. |
cancelled, disputed, refunded | Stopped, under review, or money returned. |
Your NexG listing, on your own website
Read your merchant and catalogue as NexG publishes them, and show them in your own design. Link back to your storefront at https://nexgapp.com/explore/{merchant id} so guests can order.
curl "https://api.nexgapp.com/v1/catalog/merchants/9b2f6c1e-4a7d-4c3b-8e21-5f0a7d3c9e14" \
-H "X-Api-Key: $NEXG_API_KEY"Your data on nexgapp.com
NexG shows your business in NexG's own format. What you send is data, never markup: names, descriptions, prices, sections and flags. NexG stores it in its own fields and sets it with its own design, so every storefront reads the same way and a guest always knows where to look.
{
"name": "Nyama choma platter",
"description": "Half kilo of goat ribs, kachumbari, ugali",
"price_kes": 1450,
"available": true,
"age_restricted": false,
"highlighted": true
}Popular
Nyama choma platter
Half kilo of goat ribs, kachumbari, ugali
KES 1,450
AddIllustration. NexG's type, colours and layout; your words and prices.
- No HTML, scripts, styles, fonts or tracking from a partner ever reach a NexG page. Formatting characters in text are shown as text.
- Prices are whole shillings, and the totals guests pay (delivery, service fee) are worked out by NexG. A partner never sets a fee.
- Nothing is public until NexG has verified the merchant's documents. Age-restricted items appear only for a verified licence, labelled 18+ with ID checked at hand-over.
- Photos are uploaded in the merchant console and shown in NexG's frames.
Two-way sync
Designed, not live
The rules below are written into NexG's integration code, but no POS, ERP, booking or inventory provider is connected through them yet. The first providers will be announced in the changelog.
Every connection moves through the same steps, and cannot skip one:
- Requested: someone allowed to manage connections adds your system for your business and the locations it serves.
- Tested: NexG calls your system with your current credentials, and every operation the connection will use must pass.
- Mapped: every field is mapped between your records and NexG's, and the mapping is versioned.
- Previewed: the changes the mapping would make are shown before any are made.
- Active: only after approval. A connection can be paused, sent back for new credentials, or disconnected once pending work is settled.
And once data flows:
- Each kind of data has one owner: NexG, your system, shared under written rules, or read only from yours. Your system can never write what NexG owns.
- Each event is applied once, by its id, and changes NexG made itself are not applied back.
- Events apply in your system's order, or are reconciled when order cannot be trusted.
- Nothing is deleted because it is missing from a snapshot. Deletion needs an explicit delete from your side.