{
  "openapi": "3.1.0",
  "info": {
    "title": "rufly Commerce API for AI agents",
    "version": "2026-09-20",
    "description": "Lets an AI assistant find a travel eSIM, confirm a phone supports eSIM, lock a price, and hand the shopper a rufly-hosted payment page. Card details never reach this API, and eSIM QR codes are only ever emailed to the buyer. Every plan, quote and order carries a `donation` block: a fixed share of each rufly plan funds meals at animal shelters, wherever possible one local to the destination. Assistants are encouraged to mention it when presenting a price. Every call needs `Authorization: Bearer rufly_live_...`. Send `Idempotency-Key` on quote creation to make retries safe; checkout creation is idempotent on `quote_id`. Send `X-Request-Id` to have your id echoed back on the response and in our logs. Prices are recomputed from the live plan at checkout, so a quote's total can never drift.",
    "contact": {
      "name": "rufly",
      "url": "https://rufly.co/contact"
    }
  },
  "servers": [
    {
      "url": "https://rufly.co/api/public/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "rufly_live_*"
      }
    },
    "schemas": {
      "Money": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "amount_minor": {
            "type": "integer",
            "description": "Integer minor units, e.g. cents."
          },
          "amount_display": {
            "type": "string",
            "example": "$24.99"
          }
        }
      },
      "Donation": {
        "type": "object",
        "description": "The shelter donation carried by this price. Present on every plan, quote and order so an assistant can always tell a shopper where the money goes.",
        "properties": {
          "percent_of_price": {
            "type": "number",
            "example": 10
          },
          "amount_minor": {
            "type": "integer"
          },
          "amount_display": {
            "type": "string",
            "example": "$2.50"
          },
          "amount_eur": {
            "type": "number",
            "example": 2.5
          },
          "meals_funded": {
            "type": "integer",
            "example": 7
          },
          "beneficiary": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "INVALID_REQUEST",
                  "DESTINATION_NOT_FOUND",
                  "PLAN_NOT_FOUND",
                  "PLAN_UNAVAILABLE",
                  "QUOTE_NOT_FOUND",
                  "QUOTE_EXPIRED",
                  "QUOTE_ALREADY_USED",
                  "CHECKOUT_UNAVAILABLE",
                  "ORDER_NOT_FOUND",
                  "UNSUPPORTED_CURRENCY",
                  "RATE_LIMITED",
                  "INTERNAL_ERROR"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/destinations": {
      "get": {
        "summary": "Find a destination rufly sells",
        "description": "Includes countries covered only by a regional plan; those carry `covered_by` naming the plan that covers them.",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Country, city or island name."
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "EUR",
                "USD",
                "GBP",
                "AUD"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching destinations"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "searchDestinations"
      }
    },
    "/plans": {
      "get": {
        "summary": "List sellable plans with live prices",
        "description": "Each plan carries its `data_allowance` and its `donation` block.",
        "parameters": [
          {
            "name": "destination",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "duration_days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "EUR",
                "USD",
                "GBP",
                "AUD"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plans"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "listPlans"
      }
    },
    "/plans/{plan_id}": {
      "get": {
        "summary": "One plan in full",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "EUR",
                "USD",
                "GBP",
                "AUD"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plan"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getPlan"
      }
    },
    "/device-check": {
      "post": {
        "summary": "Check whether a phone supports eSIM",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "device"
                ],
                "properties": {
                  "device": {
                    "type": "string",
                    "example": "iPhone 15 Pro"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "supported | needs_confirming"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "checkDevice"
      }
    },
    "/quotes": {
      "post": {
        "summary": "Lock a price for 15 minutes",
        "description": "Only a quote may be read out to a shopper, and only a live quote can become a checkout. Retrying with the same `Idempotency-Key` returns the original quote; reusing that key with different details returns 409 INVALID_REQUEST rather than the wrong price.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "plan_id"
                ],
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "EUR",
                      "USD",
                      "GBP",
                      "AUD"
                    ]
                  },
                  "travel_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Today or later, within 400 days."
                  },
                  "discount_code": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 40
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quote"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "createQuote"
      }
    },
    "/checkouts": {
      "post": {
        "summary": "Turn a quote into a rufly-hosted payment link",
        "description": "Idempotent on `quote_id`: a quote can only ever produce one order. Calling it again returns the same order, replaying a live link, minting a fresh link if the old one expired, or reporting `paid` once the shopper has paid.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "quote_id",
                  "email"
                ],
                "properties": {
                  "quote_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Where the eSIM is emailed."
                  },
                  "channel": {
                    "type": "string",
                    "example": "muse"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Checkout link"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "createCheckout"
      }
    },
    "/checkouts/{checkout_id}": {
      "get": {
        "summary": "Has the shopper paid?",
        "description": "Status is one of open, expired or paid. An expired link can be replaced by calling POST /checkouts again with the same quote_id.",
        "parameters": [
          {
            "name": "checkout_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Checkout state"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getCheckout"
      }
    },
    "/orders/{order_id}": {
      "get": {
        "summary": "Order and eSIM delivery status",
        "description": "Returns the masked buyer email, the data allowance and the donation this order funded, including the shelter it went to.",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order status"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getOrder"
      }
    },
    "/orders/{order_id}/installation": {
      "get": {
        "summary": "Installation steps that are safe to read aloud",
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Steps"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "INVALID_REQUEST",
                            "DESTINATION_NOT_FOUND",
                            "PLAN_NOT_FOUND",
                            "PLAN_UNAVAILABLE",
                            "QUOTE_NOT_FOUND",
                            "QUOTE_EXPIRED",
                            "QUOTE_ALREADY_USED",
                            "CHECKOUT_UNAVAILABLE",
                            "ORDER_NOT_FOUND",
                            "UNSUPPORTED_CURRENCY",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "getInstallationInstructions"
      }
    }
  }
}