{
  "openapi": "3.1.0",
  "info": {
    "title": "plusmore RaaS API",
    "version": "1.0.0",
    "description": "The plusmore RaaS API v1: the same contract in the sandbox and live. Every request carries a bearer API key and a signature (x-plusmore-timestamp, x-plusmore-nonce, x-plusmore-signature v1); POST /v1/orders also carries Idempotency-Key. Every gift card is sold at the rate our gift card supplier gives us, passed on in full: plusmore adds 0%. Going live on the plusmore RaaS API is a one off, non refundable 999 USDC setup and API activation fee per product. It guarantees no uptime, supply, margin or continued service. Float top ups can take up to 3 days to arrive. Docs: https://plusmore.xyz/pool-n-earn/developers/docs",
    "contact": {
      "email": "support@plusmore.xyz"
    }
  },
  "servers": [
    {
      "url": "https://raas.plusmore.xyz/v1",
      "description": "live, pmr_live_ keys from the partner portal"
    },
    {
      "url": "https://raas-sandbox.plusmore.xyz/v1",
      "description": "sandbox, pmr_test_ keys, nothing real"
    }
  ],
  "security": [
    {
      "bearer": [],
      "signature": [],
      "timestamp": [],
      "nonce": []
    }
  ],
  "paths": {
    "/ping": {
      "get": {
        "operationId": "ping",
        "summary": "Check a key",
        "description": "Your partner id, the environment, the key id and its scopes.",
        "x-plusmore-scope": "any",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/catalogue": {
      "get": {
        "operationId": "listCatalogue",
        "summary": "The gift card catalogue",
        "description": "Every gift card you can sell, with its rate, amounts, prices and availability. Cash equivalent gift cards are not listed.",
        "x-plusmore-scope": "catalogue:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO 3166 alpha 2.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "description": "ISO 4217.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "A search term.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "A category id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor of the page before.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CataloguePageEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/catalogue/{slug}": {
      "get": {
        "operationId": "getCatalogueItem",
        "summary": "One gift card",
        "description": "One gift card with its live availability.",
        "x-plusmore-scope": "catalogue:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The gift card's slug.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogueItemEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, not_sold",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "cash_equivalent_excluded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fx": {
      "get": {
        "operationId": "getFx",
        "summary": "Exchange rates",
        "description": "US dollars per one unit of every catalogue currency, as orders are costed.",
        "x-plusmore-scope": "catalogue:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "fx_unavailable, maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/summary": {
      "get": {
        "operationId": "getSummary",
        "summary": "Catalogue summary",
        "description": "Counts only: brands, gift cards, countries and currencies. Read it live, never type it.",
        "x-plusmore-scope": "catalogue:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "post": {
        "operationId": "createQuote",
        "summary": "Get a quote",
        "description": "The cost of one gift card at one amount, checked against your available balance. Books nothing. A quote lives 60 seconds.",
        "x-plusmore-scope": "quotes:write",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, field_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, not_sold",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "denomination_unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "cash_equivalent_excluded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "restocking, capacity_unavailable, fx_unavailable, maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "post": {
        "operationId": "createOrder",
        "summary": "Place an order",
        "description": "201 issued with the gift card, 202 pending (it issues later, read it with GET /v1/orders/{client_ref}), or an error. The same client_ref always answers the same order and never charges twice.",
        "x-plusmore-scope": "orders:write",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Equal to the body's client_ref.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, field_not_allowed, idempotency_key_required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "insufficient_balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found, not_sold",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "denomination_unavailable, price_changed, idempotency_mismatch, order_in_progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "cash_equivalent_excluded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "upstream_failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "restocking, capacity_unavailable, fx_unavailable, maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrders",
        "summary": "List orders",
        "description": "Your orders, newest first, without gift card codes.",
        "x-plusmore-scope": "orders:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "pending, issued or failed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "RFC 3339.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "RFC 3339.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor of the page before.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderPageEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{client_ref}": {
      "get": {
        "operationId": "getOrder",
        "summary": "Read an order",
        "description": "One order; for an issued order, its gift card code.",
        "x-plusmore-scope": "orders:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "client_ref",
            "in": "path",
            "required": true,
            "description": "Your client_ref.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/balance": {
      "get": {
        "operationId": "getBalance",
        "summary": "Your balance",
        "description": "Balance, holds, available and the low balance level. There are no order limits on your account. Your credited float pays for each order.",
        "x-plusmore-scope": "balance:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/funding": {
      "get": {
        "operationId": "getFunding",
        "summary": "How to fund",
        "description": "USDC on Base to your float address. Float top ups can take up to 3 days to arrive.",
        "x-plusmore-scope": "funding:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundingEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deposits": {
      "get": {
        "operationId": "listDeposits",
        "summary": "Your deposits",
        "description": "Every deposit with its state: detected, credited or held.",
        "x-plusmore-scope": "funding:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor of the page before.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositPageEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deposits/{id}": {
      "get": {
        "operationId": "getDeposit",
        "summary": "One deposit",
        "description": "One deposit with its state.",
        "x-plusmore-scope": "funding:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The deposit id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DepositEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/statements": {
      "get": {
        "operationId": "getStatement",
        "summary": "A monthly statement",
        "description": "The month's figures signed with Ed25519. The live statement key id is shown in the partner portal.",
        "x-plusmore-scope": "statements:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "month",
            "in": "query",
            "required": true,
            "description": "The month, such as 2026-10.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedStatementEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "The event feed",
        "description": "The same events as the webhooks, oldest first after the id you give.",
        "x-plusmore-scope": "events:read",
        "security": [
          {
            "bearer": [],
            "signature": [],
            "timestamp": [],
            "nonce": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "The id of the last event you read.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPageEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "invalid_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized, signature_invalid, timestamp_out_of_window, nonce_reused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "scope_missing, ip_not_allowed, wrong_environment, partner_not_live, partner_suspended, origin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "451": {
            "description": "region_blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "maintenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer pmr_live_ or pmr_test_ then the key id and the secret."
      },
      "signature": {
        "type": "apiKey",
        "in": "header",
        "name": "x-plusmore-signature",
        "description": "v1= then the hex HMAC SHA-256, keyed by your signing secret, of seven lines joined by a newline: v1, the method, the path, the sorted RFC 3986 query (or an empty line), the timestamp, the nonce and the hex SHA-256 of the raw body."
      },
      "timestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "x-plusmore-timestamp",
        "description": "Unix seconds, within 300 seconds of our clock."
      },
      "nonce": {
        "type": "apiKey",
        "in": "header",
        "name": "x-plusmore-nonce",
        "description": "A new UUID for every request."
      }
    },
    "schemas": {
      "Environment": {
        "type": "string",
        "enum": [
          "sandbox",
          "production"
        ]
      },
      "Scope": {
        "type": "string",
        "enum": [
          "catalogue:read",
          "quotes:write",
          "orders:write",
          "orders:read",
          "balance:read",
          "funding:read",
          "statements:read",
          "events:read"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "field_not_allowed",
                  "idempotency_key_required",
                  "unauthorized",
                  "signature_invalid",
                  "timestamp_out_of_window",
                  "nonce_reused",
                  "insufficient_balance",
                  "scope_missing",
                  "ip_not_allowed",
                  "wrong_environment",
                  "partner_not_live",
                  "partner_suspended",
                  "origin",
                  "not_found",
                  "not_sold",
                  "denomination_unavailable",
                  "price_changed",
                  "idempotency_mismatch",
                  "order_in_progress",
                  "cash_equivalent_excluded",
                  "rate_limited",
                  "limit_exceeded",
                  "region_blocked",
                  "upstream_failed",
                  "restocking",
                  "capacity_unavailable",
                  "fx_unavailable",
                  "maintenance"
                ],
                "description": "limit_exceeded is sent by the sandbox only, when a test allowance of a sandbox key is spent; the live API never sends it."
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "retry_after_sec": {
                "type": "integer",
                "minimum": 0
              },
              "details": {
                "type": "object"
              }
            },
            "required": [
              "code",
              "message",
              "request_id"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Ping": {
        "type": "object",
        "properties": {
          "partner_id": {
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "key_id": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scope"
            }
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "server_time": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "partner_id",
          "environment",
          "key_id",
          "scopes",
          "expires_at",
          "server_time"
        ],
        "additionalProperties": false
      },
      "PricePoint": {
        "type": "object",
        "properties": {
          "face_minor": {
            "type": "integer"
          },
          "cost_minor": {
            "type": "integer"
          },
          "cost_usd6": {
            "type": "integer"
          }
        },
        "required": [
          "face_minor",
          "cost_minor",
          "cost_usd6"
        ],
        "additionalProperties": false
      },
      "FaceRange": {
        "type": "object",
        "properties": {
          "min_minor": {
            "type": "integer"
          },
          "max_minor": {
            "type": "integer"
          },
          "step_minor": {
            "type": "integer"
          }
        },
        "required": [
          "min_minor",
          "max_minor",
          "step_minor"
        ],
        "additionalProperties": false
      },
      "CatalogueItem": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "category_label": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "rate_bps": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10000,
            "description": "The rate in basis points: the rate our gift card supplier gives us, passed on in full. plusmore adds 0%."
          },
          "denominations": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer"
            }
          },
          "range": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FaceRange"
              },
              {
                "type": "null"
              }
            ]
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricePoint"
            }
          },
          "availability": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "available",
                  "limited",
                  "unavailable"
                ]
              },
              "max_face_minor_today": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "state",
              "max_face_minor_today"
            ],
            "additionalProperties": false
          },
          "cash_equivalent": {
            "type": "boolean"
          },
          "logo_url": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "source": {
            "type": "string",
            "enum": [
              "supplier"
            ]
          },
          "demo": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "brand",
          "name",
          "category",
          "category_label",
          "country",
          "currency",
          "rate_bps",
          "denominations",
          "range",
          "prices",
          "availability",
          "cash_equivalent",
          "logo_url",
          "terms",
          "source",
          "demo"
        ],
        "additionalProperties": false
      },
      "CataloguePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogueItem"
            }
          },
          "total": {
            "type": "integer"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "total",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "Fx": {
        "type": "object",
        "properties": {
          "base": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "usd6_per_unit": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "fixed": {
            "type": "boolean"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "enum": [
              "supplier"
            ]
          }
        },
        "required": [
          "base",
          "usd6_per_unit",
          "fixed",
          "as_of",
          "source"
        ],
        "additionalProperties": false
      },
      "Summary": {
        "type": "object",
        "properties": {
          "brands": {
            "type": "integer"
          },
          "gift_cards": {
            "type": "integer"
          },
          "countries": {
            "type": "integer"
          },
          "currencies": {
            "type": "integer"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "brands",
          "gift_cards",
          "countries",
          "currencies",
          "as_of"
        ],
        "additionalProperties": false
      },
      "QuoteRequest": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "face_minor": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000
          }
        },
        "required": [
          "slug",
          "currency",
          "face_minor"
        ],
        "additionalProperties": false
      },
      "Quote": {
        "type": "object",
        "properties": {
          "quote_id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "face_minor": {
            "type": "integer"
          },
          "rate_bps": {
            "type": "integer"
          },
          "cost_minor": {
            "type": "integer"
          },
          "cost_usd6": {
            "type": "integer"
          },
          "sellable": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "enum": [
              "ok",
              "insufficient_balance",
              "restocking",
              "limit_exceeded"
            ],
            "description": "limit_exceeded only in the sandbox, once a test allowance is spent; live there are no order limits."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "quote_id",
          "slug",
          "currency",
          "face_minor",
          "rate_bps",
          "cost_minor",
          "cost_usd6",
          "sellable",
          "code",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "OrderRequest": {
        "type": "object",
        "properties": {
          "client_ref": {
            "type": "string",
            "pattern": "^(?=[A-Za-z0-9_.:-]*[A-Za-z0-9])[A-Za-z0-9_.:-]{1,128}$",
            "description": "Your own id for the purchase. Send the same one to retry; it must equal the Idempotency-Key header."
          },
          "slug": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "face_minor": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000000
          },
          "quote_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^qt_[0-9A-Za-z]{22}$"
          },
          "end_customer": {
            "type": "object",
            "properties": {
              "ref": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "An opaque id for your customer, never an email or a name: only its SHA-256 is kept."
              },
              "country": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              }
            },
            "required": [
              "ref",
              "country"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "client_ref",
          "slug",
          "currency",
          "face_minor",
          "end_customer"
        ],
        "additionalProperties": false
      },
      "Voucher": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "pin": {
            "type": [
              "string",
              "null"
            ]
          },
          "redeem_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "demo": {
            "type": "boolean"
          },
          "notice": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "pin",
          "redeem_url",
          "expires_at",
          "demo",
          "notice"
        ],
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "client_ref": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "issued",
              "failed"
            ]
          },
          "slug": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "face_minor": {
            "type": "integer"
          },
          "rate_bps": {
            "type": "integer"
          },
          "cost_minor": {
            "type": "integer"
          },
          "cost_usd6": {
            "type": "integer"
          },
          "quote_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_customer": {
            "type": "object",
            "properties": {
              "ref_sha256": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            },
            "required": [
              "ref_sha256",
              "country"
            ],
            "additionalProperties": false
          },
          "voucher": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "issued_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "replay": {
            "type": "boolean"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          }
        },
        "required": [
          "id",
          "client_ref",
          "status",
          "slug",
          "brand",
          "currency",
          "face_minor",
          "rate_bps",
          "cost_minor",
          "cost_usd6",
          "quote_id",
          "end_customer",
          "voucher",
          "created_at",
          "issued_at",
          "replay",
          "environment"
        ],
        "additionalProperties": false
      },
      "OrderPage": {
        "type": "object",
        "properties": {
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "orders",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "LimitUsage": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer"
          },
          "used": {
            "type": "integer"
          },
          "resets_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "limit",
          "used",
          "resets_at"
        ],
        "additionalProperties": false
      },
      "Balance": {
        "type": "object",
        "properties": {
          "balance_usd6": {
            "type": "integer"
          },
          "held_usd6": {
            "type": "integer"
          },
          "available_usd6": {
            "type": "integer"
          },
          "low_balance_usd6": {
            "type": [
              "integer",
              "null"
            ]
          },
          "limits": {
            "type": "object",
            "properties": {
              "per_order_usd6": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "per_day_usd6": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "per_30_days_usd6": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "per_end_customer_per_day_usd6": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "max_balance_usd6": {
                "type": "null",
                "description": "Always null: a float has no maximum balance."
              },
              "test_orders_per_day": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LimitUsage"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "test_orders_per_key": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "limit": {
                        "type": "integer"
                      },
                      "used": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "limit",
                      "used"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "per_order_usd6",
              "per_day_usd6",
              "per_30_days_usd6",
              "per_end_customer_per_day_usd6",
              "max_balance_usd6",
              "test_orders_per_day",
              "test_orders_per_key"
            ],
            "additionalProperties": false,
            "description": "Live, every field is null: there are no order limits on your account and no maximum balance. The sandbox shows its test allowances here."
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          }
        },
        "required": [
          "balance_usd6",
          "held_usd6",
          "available_usd6",
          "low_balance_usd6",
          "limits",
          "as_of",
          "environment"
        ],
        "additionalProperties": false
      },
      "Funding": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "enum": [
              "USDC"
            ]
          },
          "chain_id": {
            "type": "integer",
            "description": "8453 (Base) live, 84532 (Base Sepolia, simulated) in the sandbox."
          },
          "token_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "The USDC contract on Base live; null in the sandbox."
          },
          "deposit_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your float address for this product live; null in the sandbox."
          },
          "notice": {
            "type": "string",
            "enum": [
              "Float top ups can take up to 3 days to arrive."
            ]
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "methods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "simulate",
                    "chain"
                  ]
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "POST",
                    "TRANSFER"
                  ]
                },
                "path": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "open": {
                  "type": "boolean"
                }
              },
              "required": [
                "kind",
                "method",
                "path",
                "open"
              ],
              "additionalProperties": false
            }
          },
          "chain": {
            "type": "object",
            "properties": {
              "network": {
                "type": "string"
              },
              "chain_id": {
                "type": "integer"
              },
              "token_symbol": {
                "type": "string"
              },
              "token_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "open": {
                "type": "boolean"
              }
            },
            "required": [
              "network",
              "chain_id",
              "token_symbol",
              "token_address",
              "open"
            ],
            "additionalProperties": false
          },
          "registered_wallets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plus_address": {
            "type": "null"
          },
          "max_deposit_now_plus": {
            "type": [
              "string",
              "null"
            ]
          },
          "conversion": {
            "type": "null"
          },
          "reference_price_usd6": {
            "type": "integer"
          },
          "fee_bps": {
            "type": "integer"
          }
        },
        "required": [
          "asset",
          "chain_id",
          "token_address",
          "deposit_address",
          "notice"
        ]
      },
      "Conversion": {
        "type": "object",
        "properties": {
          "tx_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "plus_in": {
            "type": "string"
          },
          "usdc_out_usd6": {
            "type": "integer"
          },
          "reference_price_usd6": {
            "type": "integer"
          },
          "fee_bps": {
            "type": "integer"
          },
          "impact_bps": {
            "type": "integer"
          }
        },
        "required": [
          "tx_hash",
          "plus_in",
          "usdc_out_usd6",
          "reference_price_usd6",
          "fee_bps",
          "impact_bps"
        ],
        "additionalProperties": false
      },
      "Deposit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "detected",
              "credited",
              "held"
            ]
          },
          "hold_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "simulated",
              "starting_balance",
              "chain"
            ]
          },
          "asset": {
            "type": "string",
            "enum": [
              "USDC"
            ]
          },
          "token": {
            "type": [
              "string",
              "null"
            ]
          },
          "amount_usd6": {
            "type": "integer"
          },
          "credited_usd6": {
            "type": [
              "integer",
              "null"
            ]
          },
          "plus_amount": {
            "type": [
              "string",
              "null"
            ]
          },
          "conversions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversion"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "credited_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "state",
          "source",
          "asset",
          "amount_usd6",
          "credited_usd6",
          "created_at",
          "credited_at"
        ]
      },
      "DepositPage": {
        "type": "object",
        "properties": {
          "deposits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Deposit"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "deposits",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "Statement": {
        "type": "object",
        "properties": {
          "partner_id": {
            "type": "string"
          },
          "key_id": {
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "month": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}$"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          },
          "opening_balance_usd6": {
            "type": "integer"
          },
          "deposits_usd6": {
            "type": "integer"
          },
          "deposits_count": {
            "type": "integer"
          },
          "debits_usd6": {
            "type": "integer"
          },
          "orders_issued_count": {
            "type": "integer"
          },
          "closing_balance_usd6": {
            "type": "integer"
          },
          "held_usd6": {
            "type": "integer"
          },
          "final": {
            "type": "boolean"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "partner_id",
          "key_id",
          "environment",
          "month",
          "currency",
          "opening_balance_usd6",
          "deposits_usd6",
          "deposits_count",
          "debits_usd6",
          "orders_issued_count",
          "closing_balance_usd6",
          "held_usd6",
          "final",
          "generated_at"
        ],
        "additionalProperties": false
      },
      "SignedStatement": {
        "type": "object",
        "properties": {
          "statement": {
            "$ref": "#/components/schemas/Statement"
          },
          "canonical": {
            "type": "string",
            "description": "The exact bytes signed: the canonical JSON of statement (keys sorted, no spaces)."
          },
          "signature": {
            "type": "object",
            "properties": {
              "alg": {
                "type": "string",
                "enum": [
                  "Ed25519"
                ]
              },
              "key_id": {
                "type": "string"
              },
              "encoding": {
                "type": "string",
                "enum": [
                  "base64url"
                ]
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "alg",
              "key_id",
              "encoding",
              "value"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "statement",
          "canonical",
          "signature"
        ],
        "additionalProperties": false
      },
      "PartnerEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "order.issued",
              "order.failed",
              "order.pending",
              "deposit.detected",
              "deposit.credited",
              "deposit.held",
              "balance.low",
              "key.created",
              "key.revoked",
              "statement.ready"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "test": {
            "type": "boolean"
          },
          "data": {
            "type": "object"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "environment",
          "test",
          "data"
        ],
        "additionalProperties": false
      },
      "EventPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerEvent"
            }
          },
          "next_after": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "events",
          "next_after",
          "has_more"
        ],
        "additionalProperties": false
      },
      "PingEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Ping"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CataloguePageEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CataloguePage"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CatalogueItemEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CatalogueItem"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "FxEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Fx"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SummaryEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Summary"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "QuoteEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Quote"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "OrderEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Order"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "OrderPageEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/OrderPage"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BalanceEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Balance"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "FundingEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Funding"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "DepositPageEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DepositPage"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "DepositEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Deposit"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SignedStatementEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SignedStatement"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "EventPageEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EventPage"
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_"
          }
        },
        "required": [
          "data",
          "request_id"
        ],
        "additionalProperties": false
      }
    }
  }
}
