Schemas / Commerce

rig.commerce.invoice

v1.0.0 · stable maturity: draft 7 fields 3 required

Fields

FieldTypeMeaning
buyer entity required Person or organisation billed
seller entity required Person or organisation that bills
status enumdraft · issued · paid · void · credited required draft / issued / paid / void / credited
identifier string optional Optional. Invoice number as issued
issuedDate string optional Optional. Day issued, YYYY-MM-DD
dueDate string optional Optional. Day payment is due, YYYY-MM-DD
order entity optional Optional. The rig.commerce.order this bills

A bill for a sale. Format when present.

Field meanings follow schema.org Invoice. This schema is the bill - not a tax engine, not a reminder, and not the payment.

buyer, seller, and status are required.

The total is rig.commerce.price on this entity. Lines are rig.commerce.invoice_line entities that point at this invoice. Do not put a lines array here. Do not derive overdue - that is a host reading of dueDate.

The payment that settles it sets rig.finance.payment invoice.

JSON Schema

Resolves at https://rig.works/schemas/rig.commerce.invoice.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.commerce.invoice.schema.json",
  "title": "rig.commerce.invoice",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "buyer": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "seller": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "issued",
        "paid",
        "void",
        "credited"
      ]
    },
    "identifier": {
      "$ref": "./_defs.schema.json#/$defs/string"
    },
    "issuedDate": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "ISO 8601 calendar date."
    },
    "dueDate": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
      "description": "ISO 8601 calendar date."
    },
    "order": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    }
  },
  "required": [
    "buyer",
    "seller",
    "status"
  ],
  "description": "A bill for a sale. Field meanings follow schema.org Invoice. Total composes rig.commerce.price. Lines are rig.commerce.invoice_line.",
  "x-rig-maturity": "draft"
}

Seen in

record-shop.json