{
  "openapi": "3.1.1",
  "info": {
    "title": "Norspire API",
    "version": "1.0.0",
    "description": "The operations under /api/v1/ have a version promise. The operations under /api/app/ belong to the first-party apps."
  },
  "tags": [
    {
      "name": "Server"
    },
    {
      "name": "Embed"
    },
    {
      "name": "Webhooks"
    }
  ],
  "paths": {
    "/api/v1/access": {
      "post": {
        "operationId": "server.access",
        "summary": "Check the access of 1 view of 1 article.",
        "tags": [
          "Server"
        ],
        "x-norspire-audience": "public",
        "x-norspire-auth": "server_key",
        "security": [
          {
            "serverKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "article": {
                    "type": "string",
                    "pattern": "^[!-~]{1,200}$",
                    "description": "The article reference of the CMS, 1 to 200 characters from ! to ~. Norspire stores it for the attribution of a sale."
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "free",
                      "metered",
                      "paid"
                    ],
                    "description": "The access level that the CMS sets for the article. A free article answers full with no meter read and no write."
                  },
                  "reader": {
                    "description": "The value of the reader cookie of the publisher site, when the browser sent one. A value that names no reader gives clearReader true.",
                    "type": "string",
                    "maxLength": 4096
                  },
                  "meter": {
                    "description": "The value of the meter cookie of the publisher site, when the browser sent one. A wrong value counts as an empty meter.",
                    "type": "string",
                    "maxLength": 4096
                  },
                  "accessKey": {
                    "description": "The access key of a paid article: 1 to 40 characters from a to z, 0 to 9 and -, starting with a letter. Only level paid takes it, and no field means the key paid. A key that no plan of the publication has gives 400 unknown_access_key.",
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{0,39}$"
                  }
                },
                "required": [
                  "article",
                  "level"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access": {
                      "type": "string",
                      "enum": [
                        "full",
                        "registration_wall",
                        "paywall"
                      ],
                      "description": "The access of this view. For full, send the paywalled part. For each other value, send the teaser and the wall element of that type, and no paywalled part."
                    },
                    "freeLeft": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The free articles that are left in the meter month after this view, or null. A number: render the meter element with it. Null: render no meter element."
                    },
                    "known": {
                      "type": "boolean",
                      "description": "True when reader names a live reader account of the publication. Add the attribute known to the Norspire elements on the page."
                    },
                    "setMeter": {
                      "description": "The new value of the meter cookie, or null for no change. A text: set the meter cookie to it for 31 days.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "clearReader": {
                      "type": "boolean",
                      "description": "True when reader has a value that names no live reader. Delete the reader cookie and render the page as for a visitor."
                    },
                    "tierWall": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "month",
                            "year"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Not null only with access paywall, when the reader has a subscription whose plan does not give the access key of the article. The value is the payment period of that plan. Then add tier-wall with this value and access-key with the key of the request to the element norspire-wall."
                    }
                  },
                  "required": [
                    "access",
                    "freeLeft",
                    "known",
                    "setMeter",
                    "clearReader",
                    "tierWall"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Problem details. The code is `invalid_request`, `unknown_access_key`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Problem details. The code is `unauthenticated`, `key_mode_mismatch`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Problem details. The code is `browser_request`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Problem details. The code is `no_site`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Problem details. The code is `too_large`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Problem details. The code is `unsupported_media_type`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Problem details. The code is `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Problem details. The code is `busy`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/embed/site": {
      "get": {
        "operationId": "embed.site",
        "summary": "Read the texts, the limits and the plans of the paywall embed.",
        "tags": [
          "Embed"
        ],
        "x-norspire-audience": "public",
        "x-norspire-auth": "embed",
        "security": [
          {
            "originRule": []
          }
        ],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "description": "The value of data-locale of the script tag. The value en gives English. Each other value, and no value, gives the market locale of the publication.",
              "type": "string",
              "minLength": 1,
              "maxLength": 16
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "sv-SE",
                        "nb-NO",
                        "da-DK"
                      ],
                      "description": "The locale of each text of the answer."
                    },
                    "limits": {
                      "type": "object",
                      "properties": {
                        "visitor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991,
                          "description": "The free articles for a visitor each month. The meter draws its bars from it."
                        },
                        "registered": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991,
                          "description": "The free articles for a registered reader each month. The meter draws its bars from it with the attribute known."
                        }
                      },
                      "required": [
                        "visitor",
                        "registered"
                      ]
                    },
                    "urls": {
                      "type": "object",
                      "properties": {
                        "login": {
                          "type": "string",
                          "description": "The absolute address of the log-in page on the subscription host, with no query. The embed adds the query."
                        },
                        "signup": {
                          "type": "string",
                          "description": "The absolute address of the sign-up page on the subscription host, with no query. The embed adds the query."
                        },
                        "account": {
                          "type": "string",
                          "description": "The absolute address of the account page on the subscription host, with no query. The embed adds the query."
                        },
                        "cancel": {
                          "type": "string",
                          "description": "The absolute address of the cancel page on the subscription host, with no query. The embed adds the query."
                        },
                        "withdraw": {
                          "type": "string",
                          "description": "The absolute address of the withdrawal page on the subscription host, with no query. The embed adds the query."
                        },
                        "checkout": {
                          "type": "string",
                          "description": "The address of the checkout on the subscription host, ending in a slash. The embed adds the plan ID and the query."
                        },
                        "changePlan": {
                          "type": "string",
                          "description": "The address of the plan change page on the subscription host, ending in a slash. The embed adds the plan ID and the query return."
                        }
                      },
                      "required": [
                        "login",
                        "signup",
                        "account",
                        "cancel",
                        "withdraw",
                        "checkout",
                        "changePlan"
                      ]
                    },
                    "texts": {
                      "type": "object",
                      "properties": {
                        "logIn": {
                          "type": "string",
                          "description": "The text of the log-in link."
                        },
                        "account": {
                          "type": "string",
                          "description": "The text of the account link."
                        },
                        "cancel": {
                          "type": "string",
                          "description": "The label of the cancel link. The label of the admin applies in the market locale."
                        },
                        "withdraw": {
                          "type": "string",
                          "description": "The label of the withdrawal link. The label of the admin applies in the market locale."
                        },
                        "meterNotice": {
                          "type": "object",
                          "properties": {
                            "one": {
                              "type": "string",
                              "description": "The meter notice for 1 free article."
                            },
                            "other": {
                              "type": "string",
                              "description": "The meter notice for another number. The text keeps {count} for the number."
                            }
                          },
                          "required": [
                            "one",
                            "other"
                          ]
                        },
                        "registrationWall": {
                          "type": "object",
                          "properties": {
                            "heading": {
                              "type": "string",
                              "description": "The heading of the registration wall."
                            },
                            "text": {
                              "description": "The sentence that names the registered limit, or null for a limit of 0. Show no sentence for null.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "createAccount": {
                              "type": "string",
                              "description": "The text of the create account button."
                            },
                            "logIn": {
                              "type": "string",
                              "description": "The text of the log-in link of the wall."
                            }
                          },
                          "required": [
                            "heading",
                            "text",
                            "createAccount",
                            "logIn"
                          ]
                        },
                        "offerBox": {
                          "type": "object",
                          "properties": {
                            "heading": {
                              "type": "string",
                              "description": "The heading of the offer box."
                            },
                            "empty": {
                              "type": "string",
                              "description": "The sentence for an offer box with no plan."
                            },
                            "haveSubscription": {
                              "type": "string",
                              "description": "The text before the log-in link, for a visitor who may have a subscription."
                            },
                            "logIn": {
                              "type": "string",
                              "description": "The text of the log-in link of the offer box."
                            },
                            "choose": {
                              "type": "string",
                              "description": "The text of the plan button. The embed adds the plan name as hidden text."
                            }
                          },
                          "required": [
                            "heading",
                            "empty",
                            "haveSubscription",
                            "logIn",
                            "choose"
                          ]
                        },
                        "tierWall": {
                          "type": "object",
                          "properties": {
                            "heading": {
                              "type": "string",
                              "description": "The heading of the tier wall."
                            },
                            "text": {
                              "type": "string",
                              "description": "The sentence under the heading. It states that the plan of the reader does not give this article."
                            },
                            "none": {
                              "type": "string",
                              "description": "The sentence for a tier wall with no plan to change to. The wall then links to the account."
                            },
                            "change": {
                              "type": "string",
                              "description": "The text of the plan change button."
                            },
                            "changeLabel": {
                              "type": "string",
                              "description": "The accessible name of the plan change button. The text keeps {plan} for the plan name, which the embed fills."
                            },
                            "account": {
                              "type": "string",
                              "description": "The text of the account link of a tier wall with no plan to change to."
                            }
                          },
                          "required": [
                            "heading",
                            "text",
                            "none",
                            "change",
                            "changeLabel",
                            "account"
                          ]
                        },
                        "unavailable": {
                          "type": "object",
                          "properties": {
                            "heading": {
                              "type": "string",
                              "description": "The heading of the unavailable card."
                            },
                            "text": {
                              "type": "string",
                              "description": "The sentence of the unavailable card."
                            },
                            "retry": {
                              "type": "string",
                              "description": "The text of the button that loads the page again."
                            }
                          },
                          "required": [
                            "heading",
                            "text",
                            "retry"
                          ]
                        }
                      },
                      "required": [
                        "logIn",
                        "account",
                        "cancel",
                        "withdraw",
                        "meterNotice",
                        "registrationWall",
                        "offerBox",
                        "tierWall",
                        "unavailable"
                      ]
                    },
                    "plans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The plan ID. The embed puts it in the checkout address."
                          },
                          "name": {
                            "type": "string",
                            "description": "The plan name."
                          },
                          "description": {
                            "description": "The plan description, or null when the plan has none.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "price": {
                            "type": "string",
                            "description": "The amount with the currency, for example 99,00 kr. It holds no interval."
                          },
                          "per": {
                            "type": "string",
                            "description": "The interval text that follows the price, for example / month or / year."
                          },
                          "perMonth": {
                            "description": "For a year plan, the text of the price for each month. Else null.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial": {
                            "description": "The text of the trial for a plan with trial days. Else null.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "renewal": {
                            "type": "string",
                            "description": "The renewal sentence. The embed always shows it with the price."
                          },
                          "campaign": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "description": "The campaign code. The embed adds campaign=<code> to the checkout address of the plan."
                                  },
                                  "name": {
                                    "type": "string",
                                    "description": "The campaign name, for the badge."
                                  },
                                  "first": {
                                    "type": "string",
                                    "description": "The label of the first step, for example The first 2 months."
                                  },
                                  "price": {
                                    "type": "string",
                                    "description": "The campaign price with the currency, for example 29,00 kr. It holds no interval."
                                  },
                                  "per": {
                                    "type": "string",
                                    "description": "The interval text that follows the campaign price, for example / month."
                                  },
                                  "perMonth": {
                                    "description": "For a year plan, the text of the campaign price for each month. Else null.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "then": {
                                    "type": "string",
                                    "description": "The label of the second step, for example Then."
                                  },
                                  "laterPrice": {
                                    "type": "string",
                                    "description": "The later price, the plan price after the campaign periods. It holds no interval."
                                  },
                                  "laterPer": {
                                    "type": "string",
                                    "description": "The interval text that follows the later price, for example / month."
                                  },
                                  "laterPerMonth": {
                                    "description": "For a year plan, the text of the later price for each month. Else null.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "renewal": {
                                    "type": "string",
                                    "description": "The sentence that states the automatic renewal at the later price."
                                  },
                                  "label": {
                                    "type": "string",
                                    "description": "The plan name and the campaign name, the hidden text of the plan button. The embed adds it after the button text."
                                  }
                                },
                                "required": [
                                  "code",
                                  "name",
                                  "first",
                                  "price",
                                  "per",
                                  "perMonth",
                                  "then",
                                  "laterPrice",
                                  "laterPer",
                                  "laterPerMonth",
                                  "renewal",
                                  "label"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The campaign row of the plan, or null. The field is not null only while the plan has a running campaign with Show in the offer on. The row then replaces the plan row, has no trial text, and its button opens the checkout of the campaign."
                          },
                          "keys": {
                            "minItems": 1,
                            "maxItems": 10,
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys of the plan, 1 to 10. The offer box shows the plan for the key of the article. A key is not secret."
                          },
                          "interval": {
                            "type": "string",
                            "enum": [
                              "month",
                              "year"
                            ],
                            "description": "The interval of the plan. The tier wall shows the plans with the interval of the plan of the reader."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "price",
                          "per",
                          "perMonth",
                          "trial",
                          "renewal",
                          "campaign",
                          "keys",
                          "interval"
                        ]
                      },
                      "description": "The plans that a visitor can buy, in the order of the subscribe page."
                    }
                  },
                  "required": [
                    "locale",
                    "limits",
                    "urls",
                    "texts",
                    "plans"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Problem details. The code is `invalid_request`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Problem details. The code is `forbidden`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Problem details. The code is `no_site`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Problem details. The code is `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Problem details. The code is `internal`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Problem details. The code is `busy`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/entitlements": {
      "post": {
        "operationId": "server.entitlements",
        "summary": "Read the entitlement of 1 reader by the reader cookie or the reader ID.",
        "tags": [
          "Server"
        ],
        "x-norspire-audience": "public",
        "x-norspire-auth": "server_key",
        "security": [
          {
            "serverKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reader": {
                    "description": "The value of the reader cookie of the publisher site. A value that names no live reader gives known false. Send this field or readerId, and not both.",
                    "type": "string",
                    "maxLength": 4096
                  },
                  "readerId": {
                    "description": "The reader ID of a webhook event or of an earlier answer. An ID that names no live reader of the publication gives known false. Send this field or reader, and not both.",
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "known": {
                      "type": "boolean",
                      "description": "True when the request names a live reader account of the publication."
                    },
                    "readerId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The reader ID of the reader in this publication, or null when known is false."
                    },
                    "subscription": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "description": "The ID of the subscription."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "trialing",
                                "active",
                                "past_due",
                                "ended"
                              ],
                              "description": "The status at the time of the request. A subscription that ends at the end of its period and whose end date passed is ended, also before the next background run."
                            },
                            "plan": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "description": "The ID of the plan of the subscription."
                                },
                                "name": {
                                  "type": "string",
                                  "description": "The name of the plan."
                                }
                              },
                              "required": [
                                "id",
                                "name"
                              ],
                              "description": "The plan of the subscription."
                            },
                            "currentPeriodEnd": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                              "description": "The end of the current period, in UTC."
                            },
                            "cancelAtPeriodEnd": {
                              "type": "boolean",
                              "description": "True when the subscription ends at the end of the current period."
                            },
                            "endsAt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "The end of the current period while cancelAtPeriodEnd is true, the end date of an ended subscription, or null."
                            }
                          },
                          "required": [
                            "id",
                            "status",
                            "plan",
                            "currentPeriodEnd",
                            "cancelAtPeriodEnd",
                            "endsAt"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The newest subscription of the reader, or null when the reader has none."
                    },
                    "accessKeys": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The access keys that the reader has at the time of the request. The list is empty when the reader has no access."
                    }
                  },
                  "required": [
                    "known",
                    "readerId",
                    "subscription",
                    "accessKeys"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Problem details. The code is `invalid_request`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Problem details. The code is `unauthenticated`, `key_mode_mismatch`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Problem details. The code is `browser_request`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Problem details. The code is `no_site`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Problem details. The code is `too_large`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Problem details. The code is `unsupported_media_type`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Problem details. The code is `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Problem details. The code is `busy`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/handoff": {
      "post": {
        "operationId": "server.handoff",
        "summary": "Exchange a hand-off code for a reader token.",
        "tags": [
          "Server"
        ],
        "x-norspire-audience": "public",
        "x-norspire-auth": "server_key",
        "security": [
          {
            "serverKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 4096,
                    "description": "The value of the query ns_handoff on the request of the reader. A value that is not an open code gives 400 invalid_code."
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reader": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512,
                      "description": "The reader token. Keep it as opaque text and set the reader cookie to it."
                    },
                    "maxAge": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2592000,
                      "description": "The whole seconds until the hosted session ends, 2,592,000 at most. Use it as Max-Age of the reader cookie."
                    }
                  },
                  "required": [
                    "reader",
                    "maxAge"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Problem details. The code is `invalid_request`, `invalid_code`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Problem details. The code is `unauthenticated`, `key_mode_mismatch`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "Problem details. The code is `browser_request`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Problem details. The code is `no_site`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "Problem details. The code is `too_large`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "Problem details. The code is `unsupported_media_type`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Problem details. The code is `rate_limited`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Problem details. The code is `busy`.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "subscription.created": {
      "post": {
        "operationId": "webhook.subscription.created",
        "summary": "The event subscription.created.",
        "description": "A reader started a subscription. The subscription is active or in its trial. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A reader started a subscription. The subscription is active or in its trial.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.created",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "charge.succeeded": {
      "post": {
        "operationId": "webhook.charge.succeeded",
        "summary": "The event charge.succeeded.",
        "description": "A charge of the subscription succeeded. The member charge holds its amount. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A charge of the subscription succeeded. The member charge holds its amount.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "charge.succeeded",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "charge.failed": {
      "post": {
        "operationId": "webhook.charge.failed",
        "summary": "The event charge.failed.",
        "description": "A charge of the subscription failed. The member charge holds its amount. The subscription can be past due. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A charge of the subscription failed. The member charge holds its amount. The subscription can be past due.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "charge.failed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "charge.refunded": {
      "post": {
        "operationId": "webhook.charge.refunded",
        "summary": "The event charge.refunded.",
        "description": "A refund of a charge completed. The member refund holds its amount. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A refund of a charge completed. The member refund holds its amount.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "charge.refunded",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "refund.failed": {
      "post": {
        "operationId": "webhook.refund.failed",
        "summary": "The event refund.failed.",
        "description": "A refund of a charge failed. The member refund holds its amount. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A refund of a charge failed. The member refund holds its amount.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "refund.failed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.payment_method_changed": {
      "post": {
        "operationId": "webhook.subscription.payment_method_changed",
        "summary": "The event subscription.payment_method_changed.",
        "description": "The reader changed the payment method of the subscription. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The reader changed the payment method of the subscription.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.payment_method_changed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.cancel_requested": {
      "post": {
        "operationId": "webhook.subscription.cancel_requested",
        "summary": "The event subscription.cancel_requested.",
        "description": "The reader asked to end the subscription at the end of the current period. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The reader asked to end the subscription at the end of the current period.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.cancel_requested",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.agreement_stopped": {
      "post": {
        "operationId": "webhook.subscription.agreement_stopped",
        "summary": "The event subscription.agreement_stopped.",
        "description": "The reader stopped the payment agreement in the app of the payment provider. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The reader stopped the payment agreement in the app of the payment provider.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.agreement_stopped",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.resumed": {
      "post": {
        "operationId": "webhook.subscription.resumed",
        "summary": "The event subscription.resumed.",
        "description": "The reader resumed a subscription that was set to end. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The reader resumed a subscription that was set to end.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.resumed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.withdrawn": {
      "post": {
        "operationId": "webhook.subscription.withdrawn",
        "summary": "The event subscription.withdrawn.",
        "description": "The reader withdrew from the subscription inside the withdrawal period. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The reader withdrew from the subscription inside the withdrawal period.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.withdrawn",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.ended": {
      "post": {
        "operationId": "webhook.subscription.ended",
        "summary": "The event subscription.ended.",
        "description": "The subscription ended. The member endReason gives the reason. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The subscription ended. The member endReason gives the reason.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.ended",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "refund.requested": {
      "post": {
        "operationId": "webhook.refund.requested",
        "summary": "The event refund.requested.",
        "description": "A staff member asked for a refund of a charge. The member refund holds its amount. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A staff member asked for a refund of a charge. The member refund holds its amount.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "refund.requested",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.price_change_notified": {
      "post": {
        "operationId": "webhook.subscription.price_change_notified",
        "summary": "The event subscription.price_change_notified.",
        "description": "Norspire sent the notice of a price change to the reader. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Norspire sent the notice of a price change to the reader.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.price_change_notified",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.price_change_notice_failed": {
      "post": {
        "operationId": "webhook.subscription.price_change_notice_failed",
        "summary": "The event subscription.price_change_notice_failed.",
        "description": "Norspire could not send the notice of a price change to the reader. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Norspire could not send the notice of a price change to the reader.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.price_change_notice_failed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.plan_changed": {
      "post": {
        "operationId": "webhook.subscription.plan_changed",
        "summary": "The event subscription.plan_changed.",
        "description": "The plan of the subscription changed at once. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The plan of the subscription changed at once.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.plan_changed",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.plan_change_scheduled": {
      "post": {
        "operationId": "webhook.subscription.plan_change_scheduled",
        "summary": "The event subscription.plan_change_scheduled.",
        "description": "A plan change is set for the end of the current period. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A plan change is set for the end of the current period.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.plan_change_scheduled",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.plan_change_canceled": {
      "post": {
        "operationId": "webhook.subscription.plan_change_canceled",
        "summary": "The event subscription.plan_change_canceled.",
        "description": "A scheduled plan change was removed. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A scheduled plan change was removed.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.plan_change_canceled",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.plan_change_reverted": {
      "post": {
        "operationId": "webhook.subscription.plan_change_reverted",
        "summary": "The event subscription.plan_change_reverted.",
        "description": "A plan change failed to take payment, so the subscription returned to its earlier plan. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "A plan change failed to take payment, so the subscription returned to its earlier plan.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.plan_change_reverted",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "account.deleted": {
      "post": {
        "operationId": "webhook.account.deleted",
        "summary": "The event account.deleted.",
        "description": "The account of the reader was deleted. The member reader holds no email address. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The account of the reader was deleted. The member reader holds no email address.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "account.deleted",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    },
    "subscription.swish_consent_ended": {
      "post": {
        "operationId": "webhook.subscription.swish_consent_ended",
        "summary": "The event subscription.swish_consent_ended.",
        "description": "The Swish consent of the subscription ended outside Norspire. The subscription can no longer be charged. Norspire signs each event. Refuse an event with no valid signature or with a timestamp outside the window of the guide.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "webhook-id",
            "in": "header",
            "required": true,
            "description": "The event ID. It is the same in each attempt and equals the member id of the body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-timestamp",
            "in": "header",
            "required": true,
            "description": "The time of the attempt, in whole seconds since the epoch. Refuse a timestamp outside the window of the guide.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook-signature",
            "in": "header",
            "required": true,
            "description": "Check this signature before you use the body. The value is a list of `v1,<base64>` items, each an HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<body>` with the signing secret.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The Swish consent of the subscription ended outside Norspire. The subscription can no longer be charged.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "The event ID. It is the same in each attempt. Use it to drop a repeat."
                  },
                  "type": {
                    "type": "string",
                    "const": "subscription.swish_consent_ended",
                    "description": "The type of the event."
                  },
                  "timestamp": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                    "description": "The time of the event, in UTC."
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 9007199254740991,
                        "description": "The sequence number of the event in its subscription. It grows by 1 for each event. Use it to put the events of 1 subscription in order."
                      },
                      "host": {
                        "type": "string",
                        "description": "The host of the publication."
                      },
                      "reader": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The reader ID. It does not change."
                          },
                          "email": {
                            "description": "The email address of the reader at the time of the attempt, or `null` after the account is deleted.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "email"
                        ],
                        "description": "The reader of the subscription."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "The ID of the subscription."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "trialing",
                              "active",
                              "past_due",
                              "ended"
                            ],
                            "description": "The status of the subscription after the event."
                          },
                          "plan": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "The ID of the plan of the subscription after the event."
                              },
                              "name": {
                                "type": "string",
                                "description": "The name of the plan."
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The plan of the subscription after the event."
                          },
                          "accessKeys": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The access keys that the subscription gives at the time of the event. The list is empty for a subscription that gives no access."
                          },
                          "currentPeriodEnd": {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$",
                            "description": "The end of the current period, in UTC."
                          },
                          "cancelAtPeriodEnd": {
                            "type": "boolean",
                            "description": "Whether the subscription ends at the end of the period."
                          },
                          "endsAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The end of the current period while `cancelAtPeriodEnd` is `true`, the end date of an ended subscription, or `null`."
                          },
                          "endReason": {
                            "description": "The reason that the subscription ended, or `null`. Treat an unknown value as another value.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paymentMethod": {
                            "type": "string",
                            "description": "The type of the payment method, for example `card` or `swish`. Treat an unknown value as another value."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ],
                            "description": "The currency of the subscription."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "plan",
                          "accessKeys",
                          "currentPeriodEnd",
                          "cancelAtPeriodEnd",
                          "endsAt",
                          "endReason",
                          "paymentMethod",
                          "currency"
                        ],
                        "description": "The subscription after the event."
                      },
                      "charge": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the charge."
                              },
                              "invoiceNumber": {
                                "description": "The number of the invoice of the charge, or `null` for a charge with no invoice.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "invoiceNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The charge of a charge event, or `null` for each other event."
                      },
                      "refund": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "object",
                                "properties": {
                                  "minor": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991,
                                    "description": "The amount in the minor unit of the currency, an integer."
                                  },
                                  "currency": {
                                    "type": "string",
                                    "enum": [
                                      "SEK",
                                      "NOK",
                                      "DKK"
                                    ],
                                    "description": "The currency of the amount."
                                  }
                                },
                                "required": [
                                  "minor",
                                  "currency"
                                ],
                                "description": "The amount of the refund."
                              },
                              "creditNoteNumber": {
                                "description": "The number of the credit note of the refund, or `null` for a refund with no credit note.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "amount",
                              "creditNoteNumber"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The refund of a refund event, or `null` for each other event."
                      }
                    },
                    "required": [
                      "sequence",
                      "host",
                      "reader",
                      "subscription",
                      "charge",
                      "refund"
                    ],
                    "description": "The facts of the event."
                  }
                },
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "The receiver has the event. Any 2xx status acknowledges it."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_request",
              "invalid_code",
              "unknown_access_key",
              "unauthenticated",
              "key_mode_mismatch",
              "forbidden",
              "csrf",
              "cross_site",
              "browser_request",
              "suspended",
              "not_found",
              "no_site",
              "conflict",
              "last_admin",
              "limit_reached",
              "open_payment",
              "stale",
              "too_large",
              "unsupported_media_type",
              "invalid_fields",
              "invalid_credentials",
              "rate_limited",
              "internal",
              "busy"
            ]
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "pointer": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "values": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "object",
                        "properties": {
                          "minor": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "SEK",
                              "NOK",
                              "DKK"
                            ]
                          }
                        },
                        "required": [
                          "minor",
                          "currency"
                        ]
                      }
                    ]
                  }
                }
              },
              "required": [
                "pointer",
                "code"
              ]
            }
          },
          "retryAt": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "requestId"
        ]
      }
    },
    "securitySchemes": {
      "serverKey": {
        "type": "http",
        "scheme": "bearer"
      },
      "originRule": {
        "type": "apiKey",
        "in": "header",
        "name": "Origin",
        "description": "The origin of the request must be a site origin of the publication."
      }
    }
  }
}
