Developers

Shop API

Run an online store on your own website

Get your API key

Authentication

All requests use the base URL https://merchant.ladill.com/api/v1/shop-api and a Bearer API key. Create a token with the Merchant shop API scope in account.ladill.com → Developers.

Authorization header
Authorization: Bearer your_key

List products

GET /products

List the products in your catalog, ordered by name. Results are paginated.

Parameters

q string optional Search by name, SKU, or barcode.
active boolean optional Only active (true) or inactive (false) products.
low_stock boolean optional Only stock-tracked products with 5 or fewer left.
per_page integer optional Page size, 1–100 (default 50).
page integer optional Page number.
Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/products \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": [
    {
      "id": 12,
      "name": "Kente tote bag",
      "sku": "TOTE-01",
      "description": "Handwoven tote.",
      "price_minor": 15000,
      "currency": "GHS",
      "image_url": "https://…/tote.jpg",
      "images": ["https://…/tote.jpg"],
      "category_id": 3,
      "in_stock": true,
      "stock_qty": 24,
      "barcode": null,
      "is_active": true,
      "sell_online": true,
      "sell_in_store": true,
      "track_stock": true,
      "updated_at": "2026-11-12T09:30:00+00:00"
    }
  ],
  "meta": { "page": 1, "last_page": 1, "total": 1 }
}

Create a product

POST /products

Add a product to your catalog. Prices are in minor units (pesewas): 15000 = GHS 150.00.

Parameters

name string required Product name (max 255 chars).
price_minor integer required Price in minor units.
sku string optional Your stock-keeping code (max 80 chars).
barcode string optional Barcode (max 80 chars).
description string optional Product description (max 5000 chars).
currency string optional 3-letter currency code. Defaults to your store currency.
image_url string optional Public URL of the product image.
category_id integer optional One of your category ids.
is_active boolean optional Whether the product is available at all.
sell_online boolean optional Show the product on your website and hosted shop.
sell_in_store boolean optional Make the product available at the in-store register.
track_stock boolean optional Track inventory for this product.
stock_qty integer optional Units in stock (used when track_stock is true).
Request
curl -X POST https://merchant.ladill.com/api/v1/shop-api/products \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Kente tote bag",
  "price_minor": 15000,
  "sku": "TOTE-01",
  "track_stock": true,
  "stock_qty": 24
}'
Response · 201
{
  "data": {
    "id": 12,
    "name": "Kente tote bag",
    "sku": "TOTE-01",
    "price_minor": 15000,
    "currency": "GHS",
    "in_stock": true,
    "stock_qty": 24,
    "is_active": true,
    "track_stock": true
  }
}

Fetch a product

GET /products/{id}

Retrieve a single product by its id.

Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/products/{id} \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": {
    "id": 12,
    "name": "Kente tote bag",
    "price_minor": 15000,
    "currency": "GHS",
    "in_stock": true,
    "stock_qty": 24
  }
}

Update a product

PATCH /products/{id}

Change any of the fields accepted when creating a product. Send only the fields you want to change.

Parameters

name string optional Product name.
price_minor integer optional Price in minor units.
… mixed optional Any other field from Create a product.
Request
curl -X PATCH https://merchant.ladill.com/api/v1/shop-api/products/{id} \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "price_minor": 18000,
  "is_active": true
}'
Response · 200
{
  "data": {
    "id": 12,
    "name": "Kente tote bag",
    "price_minor": 18000,
    "is_active": true
  }
}

Delete a product

DELETE /products/{id}

Remove a product from your catalog.

Request
curl -X DELETE https://merchant.ladill.com/api/v1/shop-api/products/{id} \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": { "deleted": true }
}

Set inventory

PATCH /products/{id}/inventory

Set an absolute stock quantity or apply a delta. Turns stock tracking on for the product. Send quantity or delta.

Parameters

quantity integer optional New absolute quantity (0 or more). Required unless delta is sent.
delta integer optional Amount to add (or subtract, if negative). Required unless quantity is sent.
Request
curl -X PATCH https://merchant.ladill.com/api/v1/shop-api/products/{id}/inventory \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "delta": -2
}'
Response · 200
{
  "data": {
    "id": 12,
    "track_stock": true,
    "stock_qty": 22,
    "in_stock": true
  }
}

List categories

GET /categories

List your product categories.

Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/categories \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": [
    { "id": 3, "name": "Bags" }
  ]
}

Create a category

POST /categories

Add a product category.

Parameters

name string required Category name (max 120 chars).
Request
curl -X POST https://merchant.ladill.com/api/v1/shop-api/categories \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Bags"
}'
Response · 201
{
  "data": { "id": 3, "name": "Bags" }
}

Place an order

POST /orders

Place an order from your server. Stock is reserved and a Ladill Pay checkout is started: send the buyer to payment.checkout_url, or open the inline popup with payment.access_code and payment.public_key. The order becomes paid when Pay confirms. Limited to 120 requests a minute.

Parameters

items object[] required 1–100 lines, each with product_id (integer) and quantity (1–999).
customer object required Buyer details: name (required), email, phone.
fulfillment_method string required delivery or pickup.
shipping_id string optional Id of one of the shipping options in your shop settings.
shipping_address object optional Delivery address, in whatever shape your site collects it.
callback_url string optional Where to return the buyer after payment.
metadata object optional Your own key/value data, echoed on the order and in webhooks.
Request
curl -X POST https://merchant.ladill.com/api/v1/shop-api/orders \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [{ "product_id": 12, "quantity": 2 }],
  "customer": { "name": "Ama Mensah", "email": "ama@example.com", "phone": "0241234567" },
  "fulfillment_method": "delivery",
  "shipping_id": "accra",
  "callback_url": "https://yoursite.com/thanks"
}'
Response · 201
{
  "data": {
    "reference": "SO-7K2M9QXA",
    "channel": "api",
    "status": "pending",
    "fulfillment_status": "new",
    "fulfillment_method": "delivery",
    "customer": { "name": "Ama Mensah", "email": "ama@example.com", "phone": "0241234567" },
    "subtotal_minor": 30000,
    "shipping_minor": 2000,
    "total_minor": 32000,
    "currency": "GHS",
    "lines": [
      { "product_id": 12, "name": "Kente tote bag", "sku": "TOTE-01", "unit_price_minor": 15000, "quantity": 2, "line_total_minor": 30000 }
    ]
  },
  "payment": {
    "reference": "LP-8F2A31C9",
    "checkout_url": "https://pay.ladill.com/…",
    "access_code": "acc_live_…",
    "public_key": "pk_live_…",
    "amount_minor": 32000,
    "currency": "GHS"
  }
}

List orders

GET /orders

List orders from every channel (website, API, in-store), newest first. Results are paginated.

Parameters

status string optional Filter by order status, e.g. pending or paid.
channel string optional Filter by sales channel, e.g. api.
fulfillment_status string optional new, processing, ready, shipped, or delivered.
q string optional Search by reference or customer name, email, or phone.
per_page integer optional Page size, 1–100 (default 25).
page integer optional Page number.
Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/orders \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": [
    {
      "reference": "SO-7K2M9QXA",
      "status": "paid",
      "fulfillment_status": "new",
      "total_minor": 32000,
      "currency": "GHS",
      "paid_at": "2026-11-12T10:02:11+00:00"
    }
  ],
  "meta": { "page": 1, "last_page": 1, "total": 1 }
}

Fetch an order

GET /orders/{reference}

Retrieve an order by its reference. A pending order is re-checked against Ladill Pay first, so this is safe to poll after the buyer returns.

Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/orders/{reference} \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": {
    "reference": "SO-7K2M9QXA",
    "status": "paid",
    "fulfillment_status": "new",
    "total_minor": 32000,
    "currency": "GHS",
    "payment_reference": "LP-8F2A31C9",
    "paid_at": "2026-11-12T10:02:11+00:00",
    "fulfilled_at": null
  }
}

Update fulfilment

POST /orders/{reference}/fulfil

Move an order through fulfilment. With no body the order is marked delivered.

Parameters

status string optional new, processing, ready, shipped, or delivered (default delivered).
Request
curl -X POST https://merchant.ladill.com/api/v1/shop-api/orders/{reference}/fulfil \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "shipped"
}'
Response · 200
{
  "data": {
    "reference": "SO-7K2M9QXA",
    "status": "paid",
    "fulfillment_status": "shipped"
  }
}

Cancel an order

POST /orders/{reference}/cancel

Cancel an order and release its reserved stock.

Parameters

reason string optional Why the order was cancelled (max 255 chars).
Request
curl -X POST https://merchant.ladill.com/api/v1/shop-api/orders/{reference}/cancel \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Out of stock"
}'
Response · 200
{
  "data": {
    "reference": "SO-7K2M9QXA",
    "status": "cancelled"
  }
}

List customers

GET /customers

Buyers aggregated from your paid orders, most recent first (up to 200).

Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/customers \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": [
    {
      "email": "ama@example.com",
      "name": "Ama Mensah",
      "phone": "0241234567",
      "orders_count": 3,
      "total_spent_minor": 96000,
      "last_order_at": "2026-11-12 10:02:11"
    }
  ]
}

Fetch shop settings

GET /settings

Read your store settings, including your publishable key and shipping options.

Request
curl -X GET https://merchant.ladill.com/api/v1/shop-api/settings \
  -H "Authorization: Bearer your_key"
Response · 200
{
  "data": {
    "store_name": "Ama's Crafts",
    "currency": "GHS",
    "brand_color": "#0d9488",
    "notify_email": "orders@yoursite.com",
    "pickup_enabled": true,
    "webhook_url": "https://yoursite.com/hooks/shop",
    "allowed_origins": ["https://yoursite.com"],
    "public_key": "shpk_…",
    "shipping_options": [
      { "id": "accra", "label": "Accra delivery", "fee_minor": 2000, "free_over_minor": 50000, "eta": "1–2 days" }
    ]
  }
}

Update shop settings

PATCH /settings

Change your store settings. Send only the fields you want to change.

Parameters

store_name string optional Store display name (max 120 chars).
brand_color string optional Hex colour, e.g. #0d9488.
notify_email string optional Where new-order emails go.
pickup_enabled boolean optional Offer pickup as a fulfilment method.
webhook_url string optional URL that receives order webhooks.
allowed_origins string[] optional Up to 20 website origins allowed to use your publishable key.
shipping_options object[] optional Up to 10 options, each with id, label, fee_minor, and optional free_over_minor and eta.
Request
curl -X PATCH https://merchant.ladill.com/api/v1/shop-api/settings \
  -H "Authorization: Bearer your_key" \
  -H "Content-Type: application/json" \
  -d '{
  "webhook_url": "https://yoursite.com/hooks/shop",
  "shipping_options": [
    { "id": "accra", "label": "Accra delivery", "fee_minor": 2000 }
  ]
}'
Response · 200
{
  "data": {
    "store_name": "Ama's Crafts",
    "webhook_url": "https://yoursite.com/hooks/shop",
    "shipping_options": [
      { "id": "accra", "label": "Accra delivery", "fee_minor": 2000 }
    ]
  }
}

Order webhooks

Set your webhook URL in merchant.ladill.com → Shop API (or with Update shop settings). Ladill POSTs order.created, order.paid, order.fulfilled, and order.cancelled events to your URL, named in the X-Ladill-Event header. Verify each one with HMAC-SHA512 of the raw request body using your webhook secret, compared against the X-Ladill-Signature header.

Browser API

For storefronts that call Ladill straight from the browser, use your publishable key (shpk_…) instead of a token: GET /api/public/shop/{key}/config, /products and /products/{id}, POST /cart to price a basket, POST /orders to place an order, and GET /orders/{reference} to poll it. No Authorization header is needed; requests are limited to the allowed origins in your shop settings.

Errors

Errors use standard HTTP status codes with a JSON error message.

401 Missing, invalid, or revoked API token.
403 The token does not have the scope this API needs.
404 No such record on your account.
409 The request conflicts with the current state (for example, the slot was just taken).
422 Validation failed (missing or invalid parameters).
429 Rate limit exceeded — slow down and retry.
502 Ladill Pay could not start the payment — safe to retry.

Live chat

Ladill apps