{
  "openapi": "3.1.0",
  "info": {
    "title": "MapleSolutions agent commerce API",
    "version": "2026-12-01.1",
    "summary": "Catalog, quotes and deposits for AI agents acting for a business buyer.",
    "description": "Read the catalog at https://maplesolutions.info/.well-known/maplesolutions-catalog.json.",
    "contact": {
      "email": "hello@maplesolutions.info",
      "url": "https://maplesolutions.info/agents"
    }
  },
  "servers": [
    {
      "url": "https://maplesolutions.info"
    }
  ],
  "paths": {
    "/.well-known/maplesolutions-catalog.json": {
      "get": {
        "operationId": "getCatalog",
        "summary": "Products, plans, services and project pricing parameters",
        "responses": {
          "200": {
            "description": "The catalog document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          }
        }
      }
    },
    "/api/catalog": {
      "get": {
        "operationId": "getCatalogFromApi",
        "summary": "The catalog, including these purchasing endpoints",
        "description": "The same document as /.well-known/maplesolutions-catalog.json. Allows cross-origin reads.",
        "responses": {
          "200": {
            "description": "The catalog document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Catalog"
                }
              }
            }
          },
          "503": {
            "description": "Agent commerce is switched off",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotes": {
      "post": {
        "operationId": "createQuote",
        "summary": "Scope a custom project and get a price",
        "description": "The server prices the brief with the published formula; a price sent by the client is rejected. Briefs that are too large or sensitive return 202 with a price range and a person responds within one business day. Limit: 30 requests a minute per IP and per buyer email.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Optional. Repeating a request with the same key and body returns the same quote (header Idempotent-Replay: true). The same key with a different body is a 409."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quoted. Valid until expires_at.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Idempotent-Replay": {
                "schema": {
                  "const": "true"
                },
                "description": "Present when this is a replay of an earlier request with the same Idempotency-Key."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "202": {
            "description": "needs_review: a person will respond; no deposit is offered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteNeedsReview"
                }
              }
            }
          },
          "400": {
            "description": "Not valid JSON, or a bad Idempotency-Key",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request did not pass validation; the errors member lists each field and, for choices, the valid values",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Agent commerce is switched off",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotes/{id}": {
      "get": {
        "operationId": "getQuote",
        "summary": "Current state of a quote",
        "description": "Statuses: quoted, needs_review, accepted, deposit_paid, expired, cancelled. A quote that has passed expires_at reads as expired. Buyer details are never returned.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^q_[0-9a-f]{24}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The quote",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Quote"
                    },
                    {
                      "$ref": "#/components/schemas/QuoteNeedsReview"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No quote has that id",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Agent commerce is switched off",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/quotes/{id}/accept": {
      "post": {
        "operationId": "acceptQuote",
        "summary": "Accept a quote and get a Stripe Checkout link for the deposit",
        "description": "The deposit is taken from the stored quote; nothing in the request can set an amount. A deposit up to 2500 CAD returns checkout_url: an agent that holds its principal's authority may pay it, and must say so in authorized_by. A larger deposit returns approval_url and requires_human_approval: a person must open it and confirm the terms at checkout; the agent must not complete it unaided. Limit: 10 requests a minute per IP. Test-mode Stripe only until the owner enables live payments.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^q_[0-9a-f]{24}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Required. Repeating the request with the same key and body returns the same response (header Idempotent-Replay: true) and never creates a second checkout. The same key with a different body is a 409."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted. Pay with checkout_url, or hand approval_url to a person.",
            "headers": {
              "Idempotent-Replay": {
                "schema": {
                  "const": "true"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "400": {
            "description": "Not valid JSON, or Idempotency-Key missing or invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No quote has that id",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "The quote is not in status quoted (already accepted, expired, needs_review...), or the Idempotency-Key was used with a different request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request did not pass validation, or msa_version is not the current agreement version",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "The payment provider could not create the checkout; the quote can be accepted again",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Agent commerce is switched off",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/orders": {
      "post": {
        "operationId": "createOrder",
        "summary": "Order a fixed-price service (alto-setup) and get a Stripe Checkout link",
        "description": "Sells fixed-price services only (today: alto-setup, 350 CAD one time). The price comes from the catalog; nothing in the request can set an amount. This does not sell Alto B2B plans: Starter, Pro and Agency are chosen on the signup page (purchase_url in the catalog) and Enterprise is by email. Limit: 10 requests a minute per IP. Test-mode Stripe only until the owner enables live payments.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Required. Repeating the request with the same key and body returns the same response (header Idempotent-Replay: true) and never creates a second checkout. The same key with a different body is a 409."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created. Pay with checkout_url.",
            "headers": {
              "Idempotent-Replay": {
                "schema": {
                  "const": "true"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Not valid JSON, or Idempotency-Key missing or invalid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency-Key already used with a different request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Body larger than 64 KB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request did not pass validation (the errors member lists each field)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited; see Retry-After",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "The payment provider could not create the checkout; retry with the same Idempotency-Key",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Agent commerce is switched off",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "description": "Present on 422. One entry per invalid field.",
            "items": {
              "type": "object",
              "required": [
                "path",
                "message"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "valid": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "Buyer": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "company",
          "contact_name",
          "email"
        ],
        "properties": {
          "company": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "contact_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          }
        }
      },
      "Brief": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "project_type"
        ],
        "properties": {
          "project_type": {
            "enum": [
              "integration",
              "shopify_customization",
              "web_app",
              "shopify_app",
              "custom_software"
            ]
          },
          "features": {
            "type": "array",
            "maxItems": 40,
            "default": [],
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "qty"
              ],
              "properties": {
                "id": {
                  "enum": [
                    "custom_page_or_section",
                    "email_notifications",
                    "api_endpoint",
                    "webhook_handling",
                    "file_upload_storage",
                    "search_filtering",
                    "bulk_import_export",
                    "reporting_charts",
                    "scheduled_sync_job",
                    "checkout_integration",
                    "user_accounts_auth",
                    "shopify_extension",
                    "admin_dashboard",
                    "roles_permissions",
                    "shopify_embedded_admin_ui"
                  ]
                },
                "qty": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 20
                }
              }
            }
          },
          "integrations_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20,
            "default": 0
          },
          "data_migration": {
            "enum": [
              "none",
              "small",
              "large"
            ],
            "default": "none"
          },
          "design": {
            "enum": [
              "client_supplied",
              "new"
            ],
            "default": "client_supplied"
          },
          "timeline": {
            "enum": [
              "standard",
              "rush"
            ],
            "default": "standard"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "default": "",
            "description": "Plain text for the human reviewer. Never used for pricing and never executed."
          },
          "flags": {
            "type": "array",
            "items": {
              "enum": [
                "payment_processing",
                "payroll",
                "banking",
                "health_data",
                "regulated_pii"
              ]
            },
            "default": [],
            "description": "Declare payment, payroll, banking, health or regulated personal data work. Any flag sends the brief to a person."
          }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "buyer",
          "brief"
        ],
        "properties": {
          "buyer": {
            "$ref": "#/components/schemas/Buyer"
          },
          "brief": {
            "$ref": "#/components/schemas/Brief"
          }
        }
      },
      "Quote": {
        "type": "object",
        "required": [
          "id",
          "status",
          "expires_at",
          "project_type",
          "line_items",
          "cu_total",
          "scale_factor",
          "price",
          "currency",
          "deposit",
          "milestones",
          "requires_human_approval",
          "terms"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^q_[0-9a-f]{24}$"
          },
          "status": {
            "enum": [
              "quoted",
              "accepted",
              "deposit_paid",
              "expired",
              "cancelled"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "project_type": {
            "type": "string"
          },
          "cu_total": {
            "type": "integer",
            "description": "Complexity units, excluding base overhead"
          },
          "scale_factor": {
            "type": "number"
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "label",
                "amount"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "qty": {
                  "type": "integer"
                },
                "cu": {
                  "type": "number"
                },
                "rate": {
                  "type": "number",
                  "description": "CAD, before tax"
                },
                "amount": {
                  "type": "number",
                  "description": "CAD, before tax"
                }
              }
            }
          },
          "price": {
            "type": "number",
            "description": "CAD, before tax"
          },
          "currency": {
            "const": "CAD"
          },
          "tax_note": {
            "type": "string"
          },
          "deposit": {
            "type": "number",
            "description": "CAD, before tax"
          },
          "milestones": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "pct",
                "amount"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "pct": {
                  "type": "number"
                },
                "amount": {
                  "type": "number",
                  "description": "CAD, before tax"
                }
              }
            }
          },
          "requires_human_approval": {
            "type": "boolean",
            "description": "True when the deposit is above 2500 CAD, the agent spend ceiling."
          },
          "terms": {
            "type": "object",
            "required": [
              "msa_version",
              "msa_url",
              "refund"
            ],
            "properties": {
              "msa_version": {
                "type": "string"
              },
              "msa_url": {
                "type": "string",
                "format": "uri"
              },
              "refund": {
                "type": "string"
              }
            }
          }
        }
      },
      "AcceptRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "msa_version",
          "authorized_by",
          "buyer_legal_name",
          "billing_email",
          "agent"
        ],
        "properties": {
          "msa_version": {
            "type": "string",
            "description": "Must be the current agreement version (v1-draft); read it from the quote's terms."
          },
          "authorized_by": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Free-text statement that the agent acts with the buyer's authority to accept this quote and pay the deposit. Stored with the order."
          },
          "buyer_legal_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "billing_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "agent": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "operator"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "operator": {
                "type": "string",
                "maxLength": 200
              }
            }
          }
        }
      },
      "Accepted": {
        "type": "object",
        "required": [
          "status",
          "quote_id",
          "order_id",
          "deposit",
          "currency",
          "requires_human_approval",
          "expires_at"
        ],
        "properties": {
          "status": {
            "const": "accepted"
          },
          "quote_id": {
            "type": "string"
          },
          "order_id": {
            "type": "string",
            "pattern": "^o_[0-9a-f]{24}$"
          },
          "deposit": {
            "type": "number",
            "description": "CAD, before tax"
          },
          "currency": {
            "const": "CAD"
          },
          "requires_human_approval": {
            "type": "boolean"
          },
          "checkout_url": {
            "type": "string",
            "format": "uri",
            "description": "Present when the deposit is within the agent spend ceiling."
          },
          "approval_url": {
            "type": "string",
            "format": "uri",
            "description": "Present when requires_human_approval is true. A person must open it; the agent must not complete it unaided."
          },
          "next": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the checkout stops accepting payment. After that the quote can be accepted again while it is still valid."
          }
        }
      },
      "OrderRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "service",
          "authorized_by",
          "buyer_legal_name",
          "billing_email",
          "agent"
        ],
        "properties": {
          "service": {
            "enum": [
              "alto-setup"
            ]
          },
          "authorized_by": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Free-text statement that the agent acts with the buyer's authority to order and pay. Stored with the order."
          },
          "buyer_legal_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "billing_email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "agent": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "operator"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "operator": {
                "type": "string",
                "maxLength": 200
              }
            }
          }
        }
      },
      "Order": {
        "type": "object",
        "required": [
          "status",
          "service",
          "order_id",
          "amount",
          "currency",
          "checkout_url",
          "expires_at"
        ],
        "properties": {
          "status": {
            "const": "created"
          },
          "service": {
            "type": "string"
          },
          "order_id": {
            "type": "string",
            "pattern": "^o_[0-9a-f]{24}$"
          },
          "amount": {
            "type": "number",
            "description": "CAD, before tax"
          },
          "currency": {
            "const": "CAD"
          },
          "checkout_url": {
            "type": "string",
            "format": "uri"
          },
          "next": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "QuoteNeedsReview": {
        "type": "object",
        "required": [
          "id",
          "status",
          "price_range",
          "review_reasons",
          "next"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^q_[0-9a-f]{24}$"
          },
          "status": {
            "const": "needs_review"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "project_type": {
            "type": "string"
          },
          "cu_total": {
            "type": "integer"
          },
          "scale_factor": {
            "type": "number"
          },
          "price_range": {
            "type": "object",
            "required": [
              "low",
              "high",
              "currency"
            ],
            "properties": {
              "low": {
                "type": "number",
                "description": "CAD, before tax"
              },
              "high": {
                "type": "number",
                "description": "CAD, before tax"
              },
              "currency": {
                "const": "CAD"
              }
            }
          },
          "review_reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "next": {
            "type": "string"
          }
        }
      },
      "Catalog": {
        "type": "object",
        "required": [
          "company",
          "contact",
          "currency",
          "products",
          "services",
          "projects",
          "endpoints",
          "terms_url",
          "msa_version",
          "spend_ceiling_cad",
          "updated_at"
        ],
        "properties": {
          "currency": {
            "const": "CAD"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "spend_ceiling_cad": {
            "type": "number"
          },
          "msa_version": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Product": {
        "type": "object",
        "required": [
          "slug",
          "name",
          "commerce"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "commerce": {
            "type": "object",
            "required": [
              "fulfillment",
              "plans"
            ],
            "properties": {
              "fulfillment": {
                "enum": [
                  "direct",
                  "shopify",
                  "none"
                ],
                "description": "direct: buy via purchase_url or our API. shopify: install from handoff_url; Shopify bills the merchant. none: not available yet."
              },
              "handoff_url": {
                "type": "string",
                "format": "uri"
              },
              "purchase_url": {
                "type": "string",
                "format": "uri"
              },
              "plans": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          }
        }
      },
      "Plan": {
        "type": "object",
        "required": [
          "id",
          "name",
          "price_cad",
          "interval",
          "purchasable"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price_cad": {
            "type": [
              "number",
              "null"
            ],
            "description": "null when pricing is \"custom\""
          },
          "pricing": {
            "const": "custom"
          },
          "interval": {
            "enum": [
              "month",
              "one_time"
            ]
          },
          "purchasable": {
            "type": "boolean"
          },
          "limits": {
            "type": "object"
          },
          "contact": {
            "type": "string"
          }
        }
      }
    }
  }
}
