Welcome Servies To Emole Services Developer Documention
You Can Learn How TO Create Services And ALso Create New Mobile App
| Blueprint | What it does |
|---|---|
| Shipping company | Shipping options and rates, waybills, tracking |
| Payment gateway | Redirect the shopper to your page, signed confirmation, full or partial refund, void |
| Buy now, pay later | A payment method shown between two amount limits, with a "split into 4 payments" widget that receives the price in payload.price |
| Delivery estimate | A product-page widget: "Arrives in 2–4 days" |
| Payment method logos | A widget under the buy button |
A payment gateway is shown to shoppers only with a service URL and a verification secret in step 5, because the platform doesn't accept unsigned payment notices.
| When | hook | You reply with |
|---|---|---|
| Shopper on the checkout page | shipping.rates | {"options":[{"name":"Express","description":"Within two days","rate":25,"transitDays":2}]} |
| Merchant clicks Add shipment | shipping.create | {"trackingNumber":"EX123456","labelUrl":"https://…"} |
| Merchant deletes the shipment | shipping.cancel | {"ok":true} or {"ok":false,"error":"Handed to courier"} |
| Shipment tracking | shipping.track | {"url":"https://…","events":[{"name","location","date"}]} |
shipping.ratesdata:| Field | Meaning |
|---|---|
subtotal · totalWeight | Subtotal and weight |
address | Shopper's address: country, city, postal code |
items | SKU, name, quantity, price, weight |
sender | The merchant's ship-from address: name · company · phone · email · country · state · city · address1 · zip |
sender.source | store from shipping settings · vendor the vendor's address · none not set yet |
shipping.create. Reply with the tracking number and URL; the shipment is created with all order items, the order becomes "shipped" and the shopper is notified.labelUrl. Make it a printable page or PDF.shipping.cancel. ok:false with error stops the deletion and shows your reason.shipping.track and shows your events in order.{ "hook": "shipping.create", "storeId": 10, "config": { },
"data": {
"orderId": 44345, "orderNumber": "44345", "shippingMethod": "Standard shipping",
"recipient": { "name": "Noura Alotaibi", "phone": "05…", "email": "…", "country": "SA",
"state": "…", "city": "Riyadh", "address1": "Al Malqa", "address2": "", "zip": "" },
"items": [ { "sku": "…", "name": "…", "quantity": 1, "price": 271, "weight": 0.5 } ],
"totalWeight": 0.5, "orderTotal": 271, "currency": "SAR",
"codAmount": 0,
"sender": { }
} }codAmount greater than zero means cash on delivery: collect that amount from the shopper.tracking and awb for the number, label and pdf for the URL.connection. See Account linking.payment.create: order number, amount, currency, customer, and returnUrl, cancelUrl and callbackUrl.{"redirectUrl":"https://pay.example.com/checkout/abc"} and the shopper is redirected.POST to callbackUrl signed with your secret in X-Emole-Signature:{ "orderId": 1042, "status": "paid", "amount": 349.00, "transactionId": "tx_123" }"status":"failed" on failure.returnUrl. If they didn't finish, they can retry from their order page.payment.create with {"mode":"offline","message":"…"}, then send a signed paid notice when collected.| From the merchant dashboard | hook | You reply with |
|---|---|---|
| Full or partial refund | payment.refund | {"success":true} or {"success":false,"error":"…"} |
| Void a payment | payment.void | {"success":true} |
| Type | storeType | Difference |
|---|---|---|
| Private store | 1 | One merchant, ships from one place, paid to one account |
| Shared store | 2 | Multiple vendors. An order may include several vendors, each shipping from their location with their own share |
data.vendors:"storeType": 2,
"data": {
"subtotal": 420, "totalWeight": 3.5,
"vendors": [
{ "vendorId": 12, "name": "Rose Shop", "subtotal": 271, "totalWeight": 2, "skus": ["RS-01"], "sender": { } },
{ "vendorId": 19, "name": "Oud House", "subtotal": 149, "totalWeight": 1.5, "skus": ["OD-07"], "sender": { } }
]
}payment.create each vendor's share is there for split payments: vendorId · name · email · itemsTotal · items. vendorId = 0 means products sold by the store owner.