json icon

Cart Checked Out

v1.0.0events

Published when a customer has checked out their cart.

1{
2  "$schema": "http://json-schema.org/draft-07/schema#",
3  "title": "CartCheckedOut",
4  "description": "Emitted when a customer checks out their cart",
5  "type": "object",
6  "properties": {
7    "eventId": {
8      "type": "string",
9      "format": "uuid"
10    },
11    "occurredAt": {
12      "type": "string",
13      "format": "date-time"
14    },
15    "cartId": {
16      "type": "string",
17      "format": "uuid"
18    },
19    "customerId": {
20      "type": "string",
21      "format": "uuid"
22    },
23    "items": {
24      "type": "array",
25      "items": {
26        "type": "object",
27        "properties": {
28          "productId": {
29            "type": "string",
30            "format": "uuid"
31          },
32          "quantity": {
33            "type": "integer",
34            "minimum": 1
35          },
36          "unitPrice": {
37            "description": "Price per unit in minor units (e.g. cents)",
38            "type": "integer"
39          }
40        },
41        "required": ["productId", "quantity", "unitPrice"]
42      }
43    },
44    "subtotal": {
45      "description": "Total before discounts, in minor units (e.g. cents)",
46      "type": "integer"
47    },
48    "discount": {
49      "description": "Total discount applied, in minor units (e.g. cents)",
50      "type": "integer"
51    },
52    "total": {
53      "description": "Final total, in minor units (e.g. cents)",
54      "type": "integer"
55    },
56    "currency": {
57      "type": "string",
58      "pattern": "^[A-Z]{3}$"
59    }
60  },
61  "required": ["eventId", "occurredAt", "cartId", "customerId", "items", "total", "currency"]
62}
63

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions