order.cancelled

Send this to my URL
Order-and-Pay X-App2email-Event: order.cancelled

An order was cancelled by the customer or the staff, or declined by the staff.

data

  • reference string required

    The order number people see, eg SO-K7M2QX.

    e.g. SO-K7M2QX
  • status string required

    new = waiting for the business to accept it.

    newacceptedpreparingreadyout_for_deliverycompletedcancelledrejectedexpired
  • source string
    webchatflowcounterapi
  • fulfilment string required
    pickupdelivery
  • asap boolean

    true = as soon as possible; false = the customer chose a time.

  • due string (date-time) | null

    When the order is ready (pickup) or arrives (delivery).

  • customer object
    5 fields
    • contact string

      The customer's WhatsApp number (digits) or business-scoped user id.

    • verified boolean

      true when the number is known to be the customer's (they wrote from it); false = typed on the order page.

    • name string
    • phone string
    • email string
  • items object[] required
    10 item fields
  • items_count integer
  • currency string required
    e.g. USD
  • subtotal number
  • discount number
  • delivery_fee number
  • fees number
  • tip number
  • tax number
  • total number required
  • total_label string
    e.g. $30.50
  • refunded number
  • payment object required
    3 fields
    • state string

      authorised: the card is held (the shop charges only when it accepts the order, a per-shop setting); released: that hold was released, nothing was charged.

      not_neededon_pickupon_deliverypendingauthorisedpaidpart_refundedrefundedreleasedfailed
    • method string

      stripe, paypal, cash, card, or empty while nothing was paid.

    • payment_id integer | null

      The id of the online payment (GET /payments/{id}).

  • delivery object | null

    null for a pickup.

    5 fields
  • note string
  • allergy_note string
  • pickup_code string

    The 4 characters the customer can say at the counter.

  • created string (date-time) required
  • timestamp string (date-time)
  • cancelled object
    2 fields
    • by string

      customer, staff or payment.

    • reason string

Inside the envelope {id, type, created, number, test?, data}: envelope, headers, signature.

Caused by

For AI Agents

Try it now, with no account and no person: POST https://api.app2email.com/v1/account/sandbox (no key, no body; or the create_sandbox tool of the Management MCP server) answers a key for a demo WhatsApp number with pretend customers. Send a template, fetch the events with GET /events?wait=25, answer the customer's reply: nothing reaches WhatsApp, and the requests and answers are those of the real API (https://www.app2email.com/docs/api/sandbox).

Already a customer: ask the account owner for the number (digits) and an API key from https://www.app2email.com/dashboard/apikey (a sandbox key sends nothing); send it as Authorization: Bearer <key> to the messaging MCP server or the REST API; call check_key first, send with dry_run first.

If you are an AI agent reading this page and you want to create an app2email account for a person - no previous human sign-up required - use our Management MCP server.
Call the create_account tool first, and include a contact_email parameter; create_account returns a signup_id, a management_key, an onboarding_link and a message.
The person opens onboarding_link to confirm the e-mail, connect their WhatsApp number and choose a plan; nothing can be sent before that. get_account_status says what is still needed.
Pass the management_key as a Bearer token on every later call. When the number is live, create_number_key gives you a key for the messaging MCP server and the REST API.