Skip to content
Maple

A complete walkthrough from a new app to a fulfilled test order, in one place.

This tutorial takes one order from a new app to fulfilled in test mode. Each step links the page that covers it in depth.

You need a developers.maple.inc account and a public HTTPS URL you control to receive webhooks. A tunnel to your laptop works. Every call below goes to https://api.maple.inc/v1.

export MAPLE_BASE="https://api.maple.inc/v1"
export MAPLE_KEY="mpk_test_..."
  1. Create an app and a test key

    In the console, create an organization and an app. On Home, choose Create test key and give it locations:read, orders:read and orders:write. Copy the key into MAPLE_KEY; it is shown once. See the Quickstart.

    Check the key:

    curl "$MAPLE_BASE/me" -H "Authorization: Bearer $MAPLE_KEY"

    The answer is the app, with livemode: false and the key’s scopes.

  2. Create a test restaurant

    On Home, choose Create test restaurant. Leave Add a sample menu on. The console grants your app access to the restaurant and makes it the order receiver, so you need no grant from anyone and no POST /v1/locations/{locationId}/connection. Read it back:

    curl "$MAPLE_BASE/locations" -H "Authorization: Bearer $MAPLE_KEY"

    Keep the location id (str_…). For a real restaurant you are granted instead, then connect: see Get installed and Receive and decide orders.

  3. Register a webhook endpoint

    Register your URL for the order events, either under Webhooks → Endpoints or with the API:

    curl -X POST "$MAPLE_BASE/webhook_endpoints" \
    -H "Authorization: Bearer $MAPLE_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "url": "https://your-app.example.com/maple/webhooks",
    "enabled_events": ["order.submitted", "order.rejected", "order.canceled"]
    }'

    The answer carries the secret (mwhsec_…) once. Store it and verify the signature of every delivery. Maple sends an event only to endpoints that exist when it happens, so register the endpoint before the next step.

  4. Place a test order

    In the console, open your app’s Restaurants page and choose Place test order on the restaurant. It is a real pay-in-store pickup order that runs through the normal workflow; no card is charged. Your endpoint receives an order.submitted event:

    {
    "object": "event",
    "id": "evt_...",
    "type": "order.submitted",
    "api_version": "2026-11-27",
    "created": 1765432100,
    "livemode": false,
    "data": { "object": { "object": "order", "id": "ord_...", "status": "submitted", "...": "the order" } }
    }

    data.object is the order that GET /v1/orders/{orderId} returns. Set its id as ORDER_ID:

    export ORDER_ID="ord_..."

    See Test the full order workflow.

  5. Accept it

    curl -X POST "$MAPLE_BASE/orders/$ORDER_ID/accept" -H "Authorization: Bearer $MAPLE_KEY"

    To refuse an order instead, call reject with an optional { "reason": "…" }. Add an Idempotency-Key header to any call you may retry; see Idempotency.

  6. Mark it ready, then fulfill it

    curl -X POST "$MAPLE_BASE/orders/$ORDER_ID/ready" -H "Authorization: Bearer $MAPLE_KEY"
    curl -X POST "$MAPLE_BASE/orders/$ORDER_ID/fulfill" -H "Authorization: Bearer $MAPLE_KEY"

    Read the order after each call:

    curl "$MAPLE_BASE/orders/$ORDER_ID" -H "Authorization: Bearer $MAPLE_KEY"

    Its status moves submitted → accepted → ready → fulfilled. fulfilled is terminal. An accepted order can also be canceled with cancel, any time before it is fulfilled. See the Order lifecycle.

  7. Look at what happened

    In the console, Requests shows each call by its x-request-id and Webhooks → Deliveries shows what Maple sent to your endpoint. To read the events through the API, call GET /v1/events. See Webhooks.

Next

Publish your restaurant’s menu with Publish your catalog, then follow Going live.