# Create a check

Requires scope `checks:write`. Minimal, non-NX-specific payload — omit `seats` for a single implicit seat. Third-party-supplied `price` is honored per item; omit it to use the menu item's default price.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "NX Public API",
    "version": "1.0.0",
    "description": "Public marketplace API. Authenticate via POST /oauth/token (client-credentials + venueId) to obtain a short-lived bearer token, then call resource endpoints. Tokens are venue-pinned: each is scoped to a single venue and the scopes granted to that integration."
  },
  "servers": [
    {
      "url": "https://prod.api.nxapp.net/public/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Bearer token from /oauth/token."
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "cursor": {
            "type": "string",
            "description": "Opaque pagination cursor; present when more results exist."
          }
        },
        "required": [
          "requestId"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code (e.g. RESOURCE_NOT_FOUND)."
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "requestId": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "requestId"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "CheckItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "menuItemId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "seatId": {
            "type": "string"
          },
          "courseName": {
            "type": "string"
          },
          "voided": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "quantity",
          "price"
        ]
      },
      "CheckTotals": {
        "type": "object",
        "properties": {
          "subtotal": {
            "type": "number"
          },
          "tax": {
            "type": "number"
          },
          "tip": {
            "type": "number"
          },
          "gratuity": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "paid": {
            "type": "number"
          },
          "remainingBalance": {
            "type": "number"
          }
        },
        "required": [
          "subtotal",
          "tax",
          "total",
          "remainingBalance"
        ]
      },
      "Check": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "checkNumber": {
            "type": "number"
          },
          "shortCode": {
            "type": "string",
            "description": "Human-friendly recall handle — a convenience alongside `id`."
          },
          "businessDate": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "orderStatus": {
            "type": "string",
            "description": "The honest \"is this still pending staff acceptance?\" signal. Prefer this over `type`, which does not change when a QUEUED check goes live."
          },
          "source": {
            "type": "string"
          },
          "guestCount": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "closedAt": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "Guest-facing check URL (mobilepay storefront link) — the same link sent on emailed/texted receipts."
          },
          "totals": {
            "$ref": "#/components/schemas/CheckTotals"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckItem"
            }
          }
        },
        "required": [
          "id",
          "businessDate",
          "totals",
          "items"
        ]
      },
      "CheckCreateItem": {
        "type": "object",
        "properties": {
          "menuItemId": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "price": {
            "type": "number",
            "description": "Integer cents. Omit to use the menu item's default price."
          },
          "notes": {
            "type": "string"
          }
        },
        "required": [
          "menuItemId",
          "quantity"
        ]
      },
      "CheckCreateSeat": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckCreateItem"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CheckCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "guestCount": {
            "type": "number"
          },
          "note": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "QUEUED"
            ],
            "description": "Default OPEN (live immediately, normal kitchen routing). QUEUED = pending staff acceptance."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckCreateItem"
            },
            "description": "Single-seat convenience. Mutually exclusive with `seats`."
          },
          "seats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckCreateSeat"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/checks": {
      "post": {
        "summary": "Create a check",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Optional. Makes a retry safe: the same key with the same body within 24 hours returns the original response (header `X-Idempotent-Replayed: true`) instead of repeating the action. The same key with a different body returns 422; a request still in flight returns 409. Only 2xx responses are remembered. Scoped to your client, venue and route."
          }
        ],
        "description": "Requires scope `checks:write`. Minimal, non-NX-specific payload — omit `seats` for a single implicit seat. Third-party-supplied `price` is honored per item; omit it to use the menu item's default price.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Check"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 150,
      "2": 23,
      "3": 41,
      "4": 164,
      "5": 38,
      "6": 175,
      "7": 92,
      "8": 201,
      "9": 202,
      "10": 43,
      "11": 17
    }
  }
}
```