Welcome Servies To Emole Services Developer Documention
You Can Learn How TO Create Services And ALso Create New Mobile App
| Direction | Who starts | When | Verification |
|---|---|---|---|
| Platform → your server | Platform | A store event, a page that needs your widget, or a service asking you (shipping rates, tax, discount, payment) | You verify X-Emole-Signature with your secret |
| Your server → platform | Your server | You read or change store data, or confirm a payment | The platform verifies appToken, or your signature for payment confirmation |
| Your server → another company | Your server | You create a shipment or invoice in the merchant's account at another company | With the merchant's key or token from connection. See Account linking |
POST, in any language. One URL is enough for all events, e.g. https://api.example.com/emole.https://).hook. See A ready server.localhost. During development use a tunnel such as Cloudflare Tunnel or ngrok.app.ping, then a request with a forged signature. You must answer the first with 200 and reject the second with 401.

POST with application/json and these headers:| Header | Meaning |
|---|---|
X-Emole-Event | The event or service name, same as hook in the body |
X-Emole-Signature | sha256= followed by the HMAC-SHA256 of the body with your secret, in lowercase hex |
X-Emole-Redelivery | Only when resent from the request log; its value is the original log entry ID |
shipping.* · payment.* · discount.check · tax.rate{
"hook": "shipping.rates",
"storeId": 10,
"storeType": 1,
"config": { },
"appToken": "…",
"connection": null,
"data": { }
}order.* · customer.registered · zones{
"hook": "order.paid",
"storeId": 10,
"storeType": 1,
"sandbox": false,
"config": { },
"payload": { "orderId": "47351", "orderTotal": "931.50" },
"appToken": "…",
"connection": null,
"permissions": ["orders.read"]
}| Field | Meaning |
|---|---|
hook | Route the request to the right handler |
storeId | The store. Keep your data per store |
storeType | 1 private, 2 shared (multiple vendors), 3 public platform. In shared stores you get the split in data.vendors |
sandbox | true when testing from the builder |
config | The merchant's settings for your app. The secret is never sent here |
appToken | To read and change this store's data, within your permissions |
data · payload | The service or event details |
connection | The merchant's key or token at the other company, or null |
401 if it doesn't match.Rely on the signature alone. Don't accept a request because it carries some other header or comes from a particular IP.
| Service | What happens |
|---|---|
shipping.rates | Your options don't show; other shipping methods remain |
shipping.create | The shipment isn't created and the merchant sees the reason |
shipping.cancel | The shipment stays |
payment.create | The shopper isn't redirected; the order stays "pending payment" and they can retry |
discount.check | The discount isn't applied |
tax.rate | The store falls back to the previous tax provider |
order.* | The failure is logged and you can resend from the log |
| Widgets | The widget doesn't show |
hook | When | Your reply | Details |
|---|---|---|---|
app.ping | Check my app | Any JSON with 200 | — |
order.* · customer.registered | When the event happens | 200 only | Events |
| A zone name | When a page with your widget opens | HTML | Zones |
shipping.rates | Shopper on the checkout page | {"options":[{"name","rate","description","transitDays"}]} | Payment & shipping |
shipping.create · shipping.cancel · shipping.track | Add, delete or track a shipment | Tracking number and waybill · ok · tracking events | Payment & shipping |
payment.create · payment.refund · payment.void | Order confirmation, refund, void | redirectUrl · success | Payment & shipping |
discount.check | Computing a cart with your discount rule | {"valid":true} or {"valid":false,"message":"…"} | Discount & tax |
tax.rate | Computing a product's tax | {"rate":15} | Discount & tax |
mfa.send | Sending a verification code | {"sent":true} | Login & 2FA |
npm i express, then EMOLE_SECRET=… node server.js.401.storeId.X-Emole-Redelivery) isn't processed twice.| What you see | Cause and fix |
|---|---|
| Every request rejected with 401 | You're signing a re-serialized body. Read it raw, and make sure the secret matches step 5 |
| No requests arrive | The URL is localhost or behind a firewall, or the app isn't installed and enabled |
| "Timed out" in the log | Reply faster, raise the timeout up to 30 seconds, or move work to the background |
| Shipping options don't show | The reply has no options, or no name and rate. The reply body is in the log |
| Discount not applied | The reply was valid:false or failed, or the merchant didn't add your rule to the discount |
| Order doesn't become "paid" | Unsigned confirmation, a different amount, or a store that didn't install your app |
| The same event arrived twice | It was resent from the log. Ignore duplicates by order ID or X-Emole-Redelivery |