{
  "openapi": "3.1.0",
  "info": {
    "version": "0.1.0",
    "title": "On & Off Ramp API",
    "description": "The On & Off Ramp API offers a set of endpoints to move value between fiat and crypto through a single atomic order per direction: on-ramp or off-ramp.",
    "contact": {
      "name": "Uphold API Team",
      "email": "developer@uphold.com",
      "url": "https://developer.uphold.com"
    }
  },
  "servers": [
    {
      "url": "https://api.enterprise.sandbox.uphold.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.enterprise.uphold.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "OAuth2": []
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "On & Off Ramp orders."
    },
    {
      "name": "Metadata",
      "description": "Metadata."
    },
    {
      "name": "Rails",
      "description": "On & Off Ramp rails."
    }
  ],
  "paths": {
    "/on-off-ramp/orders": {
      "get": {
        "operationId": "on-off-ramp.list-orders",
        "summary": "List orders",
        "description": "List existing orders of a user.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "on-off-ramp.orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/list-orders-type-filter"
          },
          {
            "$ref": "#/components/parameters/pagination-per-page"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/list-orders-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      },
      "post": {
        "operationId": "on-off-ramp.create-order",
        "summary": "Create order",
        "description": "Create an on-ramp or off-ramp order from a quote.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "on-off-ramp.orders:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/create-order-request-body"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/create-order-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/create-order-not-found-response"
          },
          "409": {
            "$ref": "#/components/responses/create-order-conflict-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    },
    "/on-off-ramp/orders/{orderId}": {
      "get": {
        "operationId": "on-off-ramp.get-order",
        "summary": "Get order",
        "description": "Retrieve an existing order by id.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "on-off-ramp.orders:read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/order-id"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/get-order-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/get-order-not-found-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    },
    "/on-off-ramp/orders/quote": {
      "post": {
        "operationId": "on-off-ramp.create-quote",
        "summary": "Create quote",
        "description": "Create a quote for an on-ramp or off-ramp order.",
        "tags": [
          "Orders"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "on-off-ramp.orders.quotes:create"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/create-quote-request-body"
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/create-quote-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/create-quote-not-found-response"
          },
          "409": {
            "$ref": "#/components/responses/create-quote-conflict-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    },
    "/on-off-ramp/{entity}/{entityId}/metadata": {
      "get": {
        "operationId": "on-off-ramp.get-metadata",
        "summary": "Get metadata",
        "description": "Retrieve metadata for a given entity.",
        "tags": [
          "Metadata"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/metadata-entity"
          },
          {
            "$ref": "#/components/parameters/metadata-entity-id"
          },
          {
            "$ref": "#/components/parameters/metadata-if-none-match"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/get-metadata-response"
          },
          "304": {
            "$ref": "#/components/responses/get-metadata-not-modified-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/metadata-not-found"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      },
      "put": {
        "operationId": "on-off-ramp.set-metadata",
        "summary": "Set metadata",
        "description": "Create or update metadata for a given entity.",
        "tags": [
          "Metadata"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/metadata-entity"
          },
          {
            "$ref": "#/components/parameters/metadata-entity-id"
          },
          {
            "$ref": "#/components/parameters/metadata-if-match"
          },
          {
            "$ref": "#/components/parameters/metadata-if-none-match-any"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/set-metadata-request-body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/set-metadata-replaced-response"
          },
          "201": {
            "$ref": "#/components/responses/set-metadata-created-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/metadata-not-found"
          },
          "409": {
            "$ref": "#/components/responses/set-metadata-conflict-response"
          },
          "412": {
            "$ref": "#/components/responses/metadata-precondition-failed"
          },
          "413": {
            "$ref": "#/components/responses/metadata-payload-too-large"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      },
      "patch": {
        "operationId": "on-off-ramp.update-metadata",
        "summary": "Update metadata",
        "description": "Update existing metadata for a given entity.",
        "tags": [
          "Metadata"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/metadata-entity"
          },
          {
            "$ref": "#/components/parameters/metadata-entity-id"
          },
          {
            "$ref": "#/components/parameters/metadata-if-match"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/update-metadata-request-body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/update-metadata-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/metadata-not-found"
          },
          "412": {
            "$ref": "#/components/responses/metadata-precondition-failed"
          },
          "413": {
            "$ref": "#/components/responses/metadata-payload-too-large"
          },
          "422": {
            "$ref": "#/components/responses/update-metadata-unprocessable-entity-response"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      },
      "delete": {
        "operationId": "on-off-ramp.delete-metadata",
        "summary": "Delete metadata",
        "description": "Delete metadata for a given entity.",
        "tags": [
          "Metadata"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/metadata-entity"
          },
          {
            "$ref": "#/components/parameters/metadata-entity-id"
          },
          {
            "$ref": "#/components/parameters/metadata-if-match"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "204": {
            "$ref": "#/components/responses/delete-metadata-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/forbidden"
          },
          "404": {
            "$ref": "#/components/responses/metadata-not-found"
          },
          "412": {
            "$ref": "#/components/responses/metadata-precondition-failed"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    },
    "/on-off-ramp/rails": {
      "get": {
        "operationId": "on-off-ramp.list-rails",
        "summary": "List rails",
        "description": "List rails supported by on-ramp and off-ramp orders.",
        "tags": [
          "Rails"
        ],
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          },
          "security": {
            "OAuth2": {
              "subjects": [
                "client",
                "user:business",
                "user:individual"
              ]
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/list-rails-ramp-type-filter"
          },
          {
            "$ref": "#/components/parameters/list-rails-type-filter"
          },
          {
            "$ref": "#/components/parameters/list-rails-network-code-filter"
          },
          {
            "$ref": "#/components/parameters/list-rails-method-filter"
          },
          {
            "$ref": "#/components/parameters/list-rails-asset-code-filter"
          },
          {
            "$ref": "#/components/parameters/x-on-behalf-of"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-ip"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-agent"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-origin"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-country"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-subdivision"
          },
          {
            "$ref": "#/components/parameters/x-uphold-user-city"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/list-rails-response"
          },
          "400": {
            "$ref": "#/components/responses/bad-request"
          },
          "401": {
            "$ref": "#/components/responses/unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/too-many-requests"
          }
        }
      }
    }
  },
  "webhooks": {
    "on-off-ramp.order.created": {
      "post": {
        "security": [],
        "operationId": "on-off-ramp.order-created",
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          }
        },
        "summary": "Order created",
        "description": "A new order has been created.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/webhook-id"
          },
          {
            "$ref": "#/components/parameters/webhook-timestamp"
          },
          {
            "$ref": "#/components/parameters/webhook-signature"
          }
        ],
        "requestBody": {
          "description": "Order created event.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order-webhook-event"
              },
              "examples": {
                "Order Created": {
                  "value": {
                    "id": "123e4567-e89b-12d3-a456-426614174000",
                    "type": "on-off-ramp.order.created",
                    "createdAt": "2024-07-24T15:03:39.000Z",
                    "data": {
                      "order": {
                        "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                        "type": "on-ramp",
                        "pricing": "locked",
                        "origin": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "2.07021435361804542440",
                          "node": {
                            "type": "external-account",
                            "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                            "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                            "via": "card",
                            "network": "visa"
                          }
                        },
                        "destination": {
                          "asset": "XRP",
                          "amount": "46.125658",
                          "rate": "0.48304176727029881912",
                          "node": {
                            "type": "crypto-address",
                            "network": "xrp-ledger",
                            "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                            "reference": "67809592"
                          }
                        },
                        "denomination": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "1.00000000000000000000",
                          "target": "origin"
                        },
                        "fees": [
                          {
                            "type": "deposit",
                            "code": "credit-card-deposit",
                            "asset": "USD",
                            "amount": "1.00",
                            "percentage": "1",
                            "beneficiary": "uphold"
                          },
                          {
                            "type": "network",
                            "code": "crypto-network",
                            "asset": "USD",
                            "amount": "3.51"
                          }
                        ],
                        "status": "processing",
                        "timeline": [],
                        "quotedAt": "2024-07-24T15:02:39.000Z",
                        "createdAt": "2024-07-24T15:03:39.000Z",
                        "updatedAt": "2024-07-24T15:03:39.000Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully."
          }
        }
      }
    },
    "on-off-ramp.order.status-changed": {
      "post": {
        "security": [],
        "operationId": "on-off-ramp.order-status-changed",
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          }
        },
        "summary": "Order status changed",
        "description": "The order status has been changed.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/webhook-id"
          },
          {
            "$ref": "#/components/parameters/webhook-timestamp"
          },
          {
            "$ref": "#/components/parameters/webhook-signature"
          }
        ],
        "requestBody": {
          "description": "Order status changed event.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order-webhook-event"
              },
              "examples": {
                "Order Status Changed": {
                  "value": {
                    "id": "123e4567-e89b-12d3-a456-426614174000",
                    "type": "on-off-ramp.order.status-changed",
                    "createdAt": "2024-07-24T15:13:39.000Z",
                    "data": {
                      "order": {
                        "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                        "type": "on-ramp",
                        "pricing": "locked",
                        "origin": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "2.07021435361804542440",
                          "node": {
                            "type": "external-account",
                            "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                            "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                            "via": "card",
                            "network": "visa"
                          }
                        },
                        "destination": {
                          "asset": "XRP",
                          "amount": "46.125658",
                          "rate": "0.48304176727029881912",
                          "node": {
                            "type": "crypto-address",
                            "network": "xrp-ledger",
                            "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                            "reference": "67809592"
                          }
                        },
                        "denomination": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "1.00000000000000000000",
                          "target": "origin"
                        },
                        "fees": [
                          {
                            "type": "deposit",
                            "code": "credit-card-deposit",
                            "asset": "USD",
                            "amount": "1.00",
                            "percentage": "1",
                            "beneficiary": "uphold"
                          },
                          {
                            "type": "network",
                            "code": "crypto-network",
                            "asset": "USD",
                            "amount": "3.51"
                          }
                        ],
                        "status": "completed",
                        "timeline": [
                          {
                            "event": "deposit-processing",
                            "timestamp": "2024-07-24T15:03:39.000Z"
                          },
                          {
                            "event": "deposit-completed",
                            "timestamp": "2024-07-24T15:04:39.000Z"
                          },
                          {
                            "event": "withdrawal-processing",
                            "timestamp": "2024-07-24T15:05:39.000Z"
                          },
                          {
                            "event": "withdrawal-sent",
                            "timestamp": "2024-07-24T15:10:39.000Z"
                          },
                          {
                            "event": "withdrawal-completed",
                            "timestamp": "2024-07-24T15:13:39.000Z"
                          }
                        ],
                        "quotedAt": "2024-07-24T15:02:39.000Z",
                        "createdAt": "2024-07-24T15:03:39.000Z",
                        "updatedAt": "2024-07-24T15:13:39.000Z",
                        "completedAt": "2024-07-24T15:13:39.000Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully."
          }
        }
      }
    },
    "on-off-ramp.order.timeline-updated": {
      "post": {
        "security": [],
        "operationId": "on-off-ramp.order-timeline-updated",
        "x-uphold": {
          "operation": {
            "notImplementedIn": [
              "production"
            ]
          }
        },
        "summary": "Order timeline updated",
        "description": "A new event has been added to the order timeline.",
        "tags": [
          "Orders"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/webhook-id"
          },
          {
            "$ref": "#/components/parameters/webhook-timestamp"
          },
          {
            "$ref": "#/components/parameters/webhook-signature"
          }
        ],
        "requestBody": {
          "description": "Order timeline updated event.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/order-webhook-event"
              },
              "examples": {
                "Order Timeline Updated": {
                  "value": {
                    "id": "123e4567-e89b-12d3-a456-426614174000",
                    "type": "on-off-ramp.order.timeline-updated",
                    "createdAt": "2024-07-24T15:04:39.000Z",
                    "data": {
                      "order": {
                        "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                        "type": "on-ramp",
                        "pricing": "locked",
                        "origin": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "2.07021435361804542440",
                          "node": {
                            "type": "external-account",
                            "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                            "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                            "via": "card",
                            "network": "visa"
                          }
                        },
                        "destination": {
                          "asset": "XRP",
                          "amount": "46.125658",
                          "rate": "0.48304176727029881912",
                          "node": {
                            "type": "crypto-address",
                            "network": "xrp-ledger",
                            "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                            "reference": "67809592"
                          }
                        },
                        "denomination": {
                          "asset": "USD",
                          "amount": "100.00",
                          "rate": "1.00000000000000000000",
                          "target": "origin"
                        },
                        "fees": [
                          {
                            "type": "deposit",
                            "code": "credit-card-deposit",
                            "asset": "USD",
                            "amount": "1.00",
                            "percentage": "1",
                            "beneficiary": "uphold"
                          },
                          {
                            "type": "network",
                            "code": "crypto-network",
                            "asset": "USD",
                            "amount": "3.51"
                          }
                        ],
                        "status": "processing",
                        "timeline": [
                          {
                            "event": "deposit-processing",
                            "timestamp": "2024-07-24T15:03:39.000Z"
                          },
                          {
                            "event": "deposit-completed",
                            "timestamp": "2024-07-24T15:04:39.000Z"
                          }
                        ],
                        "quotedAt": "2024-07-24T15:02:39.000Z",
                        "createdAt": "2024-07-24T15:03:39.000Z",
                        "updatedAt": "2024-07-24T15:04:39.000Z"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 authentication",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/core/oauth2/token",
            "scopes": {
              "on-off-ramp.orders:create": "Grants access to create orders.",
              "on-off-ramp.orders:read": "Grants access to view orders.",
              "on-off-ramp.orders.metadata:read": "Grants access to view orders metadata.",
              "on-off-ramp.orders.metadata:write": "Grants access to modify orders metadata.",
              "on-off-ramp.orders.quotes:create": "Grants access to create order quotes."
            }
          }
        }
      }
    },
    "schemas": {
      "order-type": {
        "description": "Whether the order is an on-ramp (fiat to crypto) or off-ramp (crypto to fiat) order.",
        "type": "string",
        "enum": [
          "on-ramp",
          "off-ramp"
        ]
      },
      "string-no-edge-spaces": {
        "type": "string",
        "pattern": "^\\S.*\\S$|^\\S$"
      },
      "country-code-for-request": {
        "type": "string",
        "pattern": "^[A-Z]{2}$"
      },
      "subdivision-code-for-request": {
        "type": "string",
        "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
      },
      "order-pricing": {
        "description": "The pricing mode of the order.",
        "type": "string",
        "enum": [
          "estimated",
          "locked"
        ]
      },
      "order-denomination": {
        "description": "The denomination of the order.",
        "type": "object",
        "properties": {
          "asset": {
            "description": "The asset in which the operation is denominated.",
            "type": "string"
          },
          "amount": {
            "description": "The amount of the operation.",
            "type": "string"
          },
          "rate": {
            "description": "The rate against the specified target (origin or destination).",
            "type": "string"
          },
          "target": {
            "description": "Whether this exact amount should be paid by the origin or received by the destination.",
            "type": "string",
            "enum": [
              "origin",
              "destination"
            ]
          }
        },
        "required": [
          "asset",
          "amount",
          "rate",
          "target"
        ]
      },
      "order-fees": {
        "description": "The fees of the order.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "description": "The type of the fee, as charged on the order's transactions.",
              "type": "string",
              "enum": [
                "deposit",
                "exchange",
                "network",
                "withdrawal"
              ]
            },
            "code": {
              "description": "The code of the fee, as charged on the order's transactions.",
              "type": "string"
            },
            "asset": {
              "description": "The asset in which the fee is denominated.",
              "type": "string"
            },
            "amount": {
              "description": "The amount of the fee.",
              "type": "string"
            },
            "percentage": {
              "description": "The percentage of the fee, if the amount was calculated from a percentage.",
              "type": "string"
            },
            "beneficiary": {
              "description": "The party that receives the fee.",
              "type": "string"
            }
          },
          "required": [
            "type",
            "code",
            "asset",
            "amount"
          ]
        }
      },
      "order-timeline-timestamp": {
        "description": "The time at which the event occurred.",
        "type": "string",
        "format": "date-time"
      },
      "order-timeline-item-regular": {
        "type": "object",
        "properties": {
          "event": {
            "description": "The event that occurred in the order's timeline.",
            "type": "string",
            "enum": [
              "deposit-requested",
              "deposit-processing",
              "deposit-completed",
              "deposit-expired",
              "withdrawal-processing",
              "withdrawal-sent",
              "withdrawal-completed",
              "refund-address-requested",
              "refund-address-completed",
              "refund-processing",
              "refund-sent",
              "refund-completed",
              "refund-skipped"
            ]
          },
          "timestamp": {
            "$ref": "#/components/schemas/order-timeline-timestamp"
          }
        },
        "required": [
          "event",
          "timestamp"
        ]
      },
      "feedback": {
        "description": "A feedback message with a code and human-readable description.",
        "type": "object",
        "properties": {
          "code": {
            "description": "A short string with a brief explanation about the code reported.",
            "type": "string"
          },
          "message": {
            "description": "A human-readable message providing more details.",
            "type": "string"
          },
          "details": {
            "description": "Additional information about the feedback reported.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "error": {
        "description": "The error information.",
        "allOf": [
          {
            "$ref": "#/components/schemas/feedback"
          }
        ]
      },
      "order-timeline-item-error": {
        "type": "object",
        "properties": {
          "event": {
            "description": "The event that occurred in the order's timeline.",
            "type": "string",
            "enum": [
              "withdrawal-commit-failed",
              "refund-commit-failed"
            ]
          },
          "timestamp": {
            "$ref": "#/components/schemas/order-timeline-timestamp"
          },
          "error": {
            "title": "The error associated with the event.",
            "$ref": "#/components/schemas/error"
          }
        },
        "required": [
          "event",
          "error",
          "timestamp"
        ]
      },
      "transaction-status-reason": {
        "description": "The reason why the transaction failed or is on hold.",
        "type": "string",
        "enum": [
          "apm-account-holder-data-mismatch",
          "apm-authorization-failed",
          "apm-missing-account-holder-data",
          "apm-payment-method-declined",
          "bank-account-holder-name-mismatch",
          "beneficiary-country-restricted",
          "card-declined",
          "card-declined-by-bank",
          "card-expired",
          "card-permanently-declined-by-bank",
          "card-unauthorized",
          "card-unsupported",
          "card-withdrawals-unsupported",
          "insufficient-funds",
          "pending-requests-for-information",
          "provider-maximum-limit-exceeded",
          "screening-verification-failed",
          "travel-rule-verification-failed",
          "unspecified-error",
          "velocity"
        ]
      },
      "order-timeline-item-reason": {
        "type": "object",
        "properties": {
          "event": {
            "description": "The event that occurred in the order's timeline.",
            "type": "string",
            "enum": [
              "deposit-on-hold",
              "deposit-failed",
              "withdrawal-on-hold",
              "withdrawal-failed",
              "refund-on-hold",
              "refund-failed"
            ]
          },
          "timestamp": {
            "$ref": "#/components/schemas/order-timeline-timestamp"
          },
          "reason": {
            "description": "The reason associated with the event.",
            "$ref": "#/components/schemas/transaction-status-reason"
          }
        },
        "required": [
          "event",
          "reason",
          "timestamp"
        ]
      },
      "order-timeline-item": {
        "type": "object",
        "oneOf": [
          {
            "title": "Regular events",
            "$ref": "#/components/schemas/order-timeline-item-regular"
          },
          {
            "title": "Events with error",
            "$ref": "#/components/schemas/order-timeline-item-error"
          },
          {
            "title": "Events with reason",
            "$ref": "#/components/schemas/order-timeline-item-reason"
          }
        ]
      },
      "order-base": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The id of the order.",
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/order-type"
          },
          "pricing": {
            "$ref": "#/components/schemas/order-pricing"
          },
          "origin": {
            "type": "object"
          },
          "destination": {
            "type": "object"
          },
          "denomination": {
            "$ref": "#/components/schemas/order-denomination"
          },
          "fees": {
            "$ref": "#/components/schemas/order-fees"
          },
          "status": {
            "description": "The status of the order.",
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "on-hold",
              "completed",
              "expired",
              "failed"
            ]
          },
          "timeline": {
            "description": "The timeline of events that occurred throughout the order's lifecycle.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/order-timeline-item"
            }
          },
          "quotedAt": {
            "description": "The time at which the order was quoted.",
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "description": "The time at which the order was created.",
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "description": "The time at which the order was last updated.",
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "description": "The time at which the order was completed, if it has completed.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "type",
          "pricing",
          "origin",
          "destination",
          "denomination",
          "fees",
          "status",
          "timeline",
          "quotedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "order-endpoint-base": {
        "type": "object",
        "properties": {
          "asset": {
            "description": "The asset of the endpoint.",
            "type": "string"
          },
          "amount": {
            "description": "The amount of the endpoint.",
            "type": "string"
          },
          "rate": {
            "description": "The rate of the endpoint against its counter-part (origin to destination and vice-versa).",
            "type": "string"
          }
        },
        "required": [
          "asset",
          "amount",
          "rate"
        ]
      },
      "order-node-external-account-base": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "external-account"
            ]
          },
          "id": {
            "description": "The external account id.",
            "type": "string",
            "format": "uuid"
          },
          "ownerId": {
            "description": "The id of the user that owns the external account.",
            "type": "string",
            "format": "uuid"
          },
          "via": {
            "description": "The rail type which the external account is used.",
            "type": "string",
            "enum": [
              "apm",
              "card",
              "crypto"
            ]
          }
        },
        "required": [
          "type",
          "id",
          "ownerId"
        ]
      },
      "quote-node-external-account-card": {
        "allOf": [
          {
            "$ref": "#/components/schemas/order-node-external-account-base"
          },
          {
            "type": "object",
            "properties": {
              "via": {
                "description": "The rail type which the external account is used.",
                "type": "string",
                "enum": [
                  "card"
                ]
              },
              "network": {
                "description": "The network used with the external account.",
                "type": "string"
              }
            },
            "required": [
              "via",
              "network"
            ]
          }
        ]
      },
      "order-node-external-account-card": {
        "allOf": [
          {
            "$ref": "#/components/schemas/quote-node-external-account-card"
          },
          {
            "type": "object",
            "properties": {
              "confirmationUrl": {
                "description": "The URL to confirm the authorization using the external account (e.g., 3DS).",
                "type": "string",
                "format": "uri"
              }
            }
          }
        ]
      },
      "quote-node-external-account-apm": {
        "allOf": [
          {
            "$ref": "#/components/schemas/order-node-external-account-base"
          },
          {
            "type": "object",
            "properties": {
              "via": {
                "description": "The rail type which the external account is used.",
                "type": "string",
                "enum": [
                  "apm"
                ]
              }
            },
            "required": [
              "via"
            ]
          }
        ]
      },
      "order-node-external-account-apm": {
        "allOf": [
          {
            "$ref": "#/components/schemas/quote-node-external-account-apm"
          },
          {
            "type": "object",
            "properties": {
              "confirmationUrl": {
                "description": "The URL to confirm the authorization using the APM external account.",
                "type": "string",
                "format": "uri"
              }
            }
          }
        ]
      },
      "quote-node-apm-origin": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "apm"
            ]
          },
          "method": {
            "description": "The alternative payment method to be used in the operation.",
            "enum": [
              "apple-pay",
              "google-pay",
              "paypal",
              "venmo"
            ]
          }
        },
        "required": [
          "type",
          "method"
        ]
      },
      "order-node-apm-origin": {
        "allOf": [
          {
            "$ref": "#/components/schemas/quote-node-apm-origin"
          },
          {
            "type": "object",
            "properties": {
              "confirmationUrl": {
                "description": "The URL to confirm the authorization using the APM.",
                "type": "string",
                "format": "uri"
              }
            }
          }
        ]
      },
      "order-node-crypto-address-execution-onchain": {
        "type": "object",
        "properties": {
          "mode": {
            "description": "The mode of execution.",
            "type": "string",
            "enum": [
              "onchain"
            ]
          },
          "transactionHash": {
            "description": "The hash of the transaction in the blockchain.",
            "$ref": "#/components/schemas/string-no-edge-spaces"
          }
        },
        "required": [
          "mode",
          "transactionHash"
        ]
      },
      "order-node-crypto-address-execution-offchain": {
        "type": "object",
        "properties": {
          "mode": {
            "description": "The mode of execution.",
            "type": "string",
            "enum": [
              "offchain"
            ]
          },
          "accountId": {
            "description": "The account id to which the off-chain transaction was made.",
            "type": "string",
            "format": "uuid"
          },
          "accountOwnerId": {
            "description": "The id of the user that owns the account to which the off-chain transaction was made.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "mode"
        ]
      },
      "order-node-crypto-address-execution-simulated": {
        "type": "object",
        "properties": {
          "mode": {
            "description": "The mode of execution.",
            "type": "string",
            "enum": [
              "simulated"
            ]
          },
          "transactionHash": {
            "description": "The simulated transaction hash.",
            "$ref": "#/components/schemas/string-no-edge-spaces"
          }
        },
        "required": [
          "mode"
        ]
      },
      "order-node-crypto-address-execution": {
        "description": "The execution details for the operation.",
        "type": "object",
        "discriminator": {
          "propertyName": "mode",
          "mapping": {
            "onchain": "#/components/schemas/order-node-crypto-address-execution-onchain",
            "offchain": "#/components/schemas/order-node-crypto-address-execution-offchain",
            "simulated": "#/components/schemas/order-node-crypto-address-execution-simulated"
          }
        },
        "oneOf": [
          {
            "title": "On-chain",
            "$ref": "#/components/schemas/order-node-crypto-address-execution-onchain"
          },
          {
            "title": "Off-chain",
            "$ref": "#/components/schemas/order-node-crypto-address-execution-offchain"
          },
          {
            "title": "Simulated",
            "$ref": "#/components/schemas/order-node-crypto-address-execution-simulated"
          }
        ]
      },
      "order-node-crypto-address": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "crypto-address"
            ]
          },
          "network": {
            "description": "The network that the crypto address is on.",
            "$ref": "#/components/schemas/string-no-edge-spaces"
          },
          "address": {
            "description": "The crypto address (may not be available for deposits).",
            "$ref": "#/components/schemas/string-no-edge-spaces"
          },
          "reference": {
            "description": "The additional identifier (e.g., destination tag, memo, or message) for the crypto address.",
            "type": "string"
          },
          "execution": {
            "$ref": "#/components/schemas/order-node-crypto-address-execution"
          }
        },
        "required": [
          "type",
          "network"
        ]
      },
      "order-node-external-account-crypto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/order-node-external-account-base"
          },
          {
            "type": "object",
            "properties": {
              "via": {
                "description": "The rail type which the external account is used.",
                "type": "string",
                "enum": [
                  "crypto"
                ]
              },
              "network": {
                "description": "The network used with the external account.",
                "type": "string"
              },
              "execution": {
                "$ref": "#/components/schemas/order-node-crypto-address-execution"
              }
            },
            "required": [
              "via",
              "network"
            ]
          }
        ]
      },
      "order-on-ramp": {
        "allOf": [
          {
            "$ref": "#/components/schemas/order-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "description": "The type of the order.",
                "type": "string",
                "enum": [
                  "on-ramp"
                ]
              },
              "origin": {
                "description": "The origin of the order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "External account",
                            "type": "object",
                            "discriminator": {
                              "propertyName": "via",
                              "mapping": {
                                "card": "#/components/schemas/order-node-external-account-card",
                                "apm": "#/components/schemas/order-node-external-account-apm"
                              }
                            },
                            "oneOf": [
                              {
                                "title": "External Account - Card",
                                "$ref": "#/components/schemas/order-node-external-account-card"
                              },
                              {
                                "title": "External Account - APM",
                                "$ref": "#/components/schemas/order-node-external-account-apm"
                              }
                            ]
                          },
                          {
                            "title": "APM",
                            "$ref": "#/components/schemas/order-node-apm-origin"
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              },
              "destination": {
                "description": "The destination of the order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "Crypto address",
                            "$ref": "#/components/schemas/order-node-crypto-address"
                          },
                          {
                            "title": "External Account - Crypto",
                            "$ref": "#/components/schemas/order-node-external-account-crypto"
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        ]
      },
      "order-off-ramp": {
        "allOf": [
          {
            "$ref": "#/components/schemas/order-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "description": "The type of the order.",
                "type": "string",
                "enum": [
                  "off-ramp"
                ]
              },
              "origin": {
                "description": "The origin of the order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "$ref": "#/components/schemas/order-node-crypto-address"
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              },
              "destination": {
                "description": "The destination of the order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "External account",
                            "type": "object",
                            "discriminator": {
                              "propertyName": "via",
                              "mapping": {
                                "card": "#/components/schemas/order-node-external-account-card"
                              }
                            },
                            "oneOf": [
                              {
                                "title": "External Account - Card",
                                "$ref": "#/components/schemas/order-node-external-account-card"
                              }
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        ]
      },
      "order": {
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "on-ramp": "#/components/schemas/order-on-ramp",
            "off-ramp": "#/components/schemas/order-off-ramp"
          }
        },
        "oneOf": [
          {
            "title": "On-ramp",
            "$ref": "#/components/schemas/order-on-ramp"
          },
          {
            "title": "Off-ramp",
            "$ref": "#/components/schemas/order-off-ramp"
          }
        ]
      },
      "pagination": {
        "description": "The pagination information.",
        "type": "object",
        "properties": {
          "first": {
            "description": "The URL to the first set of results.",
            "type": "string",
            "format": "uri"
          },
          "prev": {
            "description": "The URL to the previous set of results.",
            "type": "string",
            "format": "uri"
          },
          "next": {
            "description": "The URL to the next set of results.",
            "type": "string",
            "format": "uri"
          }
        }
      },
      "create-order-authorize-3ds-requirement": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the requirement.",
            "type": "string",
            "enum": [
              "authorize:3ds"
            ]
          },
          "returnUrl": {
            "description": "The URL to redirect after the 3DS authorization flow.",
            "type": "string",
            "format": "uri",
            "pattern": "^[a-zA-Z][a-zA-Z0-9+\\-.]*:\\/\\/[^\\s]+$"
          }
        },
        "required": [
          "name",
          "returnUrl"
        ]
      },
      "create-order-authorize-apple-google-pay-requirement": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the requirement.",
            "type": "string",
            "enum": [
              "authorize:apple-pay",
              "authorize:google-pay"
            ]
          },
          "provider": {
            "description": "The provider used for the authorization.",
            "type": "string",
            "enum": [
              "checkout"
            ]
          },
          "deviceData": {
            "description": "The device data for fraud prevention.",
            "type": "string"
          },
          "tokenizedPayment": {
            "description": "The payload from the payment provider.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "name",
          "provider",
          "deviceData",
          "tokenizedPayment"
        ]
      },
      "create-order-authorize-paypal-venmo-requirement": {
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the requirement.",
            "type": "string",
            "enum": [
              "authorize:paypal",
              "authorize:venmo"
            ]
          },
          "provider": {
            "description": "The provider used for the authorization.",
            "type": "string",
            "enum": [
              "braintree"
            ]
          },
          "deviceData": {
            "description": "The device data for fraud prevention.",
            "type": "string"
          },
          "tokenizedPayment": {
            "description": "The payload from the payment provider.",
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "name",
          "provider",
          "deviceData"
        ]
      },
      "create-order-requirement": {
        "type": "object",
        "discriminator": {
          "propertyName": "name",
          "mapping": {
            "authorize:3ds": "#/components/schemas/create-order-authorize-3ds-requirement",
            "authorize:apple-pay": "#/components/schemas/create-order-authorize-apple-google-pay-requirement",
            "authorize:google-pay": "#/components/schemas/create-order-authorize-apple-google-pay-requirement",
            "authorize:paypal": "#/components/schemas/create-order-authorize-paypal-venmo-requirement",
            "authorize:venmo": "#/components/schemas/create-order-authorize-paypal-venmo-requirement"
          }
        },
        "oneOf": [
          {
            "title": "Authorize 3DS",
            "$ref": "#/components/schemas/create-order-authorize-3ds-requirement"
          },
          {
            "title": "Authorize Apple Pay/Google Pay",
            "$ref": "#/components/schemas/create-order-authorize-apple-google-pay-requirement"
          },
          {
            "title": "Authorize PayPal/Venmo",
            "$ref": "#/components/schemas/create-order-authorize-paypal-venmo-requirement"
          }
        ]
      },
      "metadata": {
        "type": "object",
        "additionalProperties": true,
        "minProperties": 1
      },
      "create-order-request": {
        "type": "object",
        "properties": {
          "quoteId": {
            "description": "The id of the quote to create the order from.",
            "type": "string",
            "format": "uuid"
          },
          "params": {
            "description": "Additional parameters required to create the order.",
            "type": "object",
            "properties": {
              "requirements": {
                "description": "The requirements data needed to create the order.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/create-order-requirement"
                }
              }
            }
          },
          "metadata": {
            "description": "Additional data for the order.",
            "$ref": "#/components/schemas/metadata"
          }
        },
        "required": [
          "quoteId"
        ]
      },
      "create-quote-node-external-account": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "external-account"
            ]
          },
          "id": {
            "description": "The external account id.",
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "id"
        ]
      },
      "create-quote-node-apm-origin": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "apm"
            ]
          },
          "method": {
            "description": "The alternative payment method to be used in the operation.",
            "enum": [
              "apple-pay",
              "google-pay",
              "paypal",
              "venmo"
            ]
          }
        },
        "required": [
          "type",
          "method"
        ]
      },
      "create-quote-node-crypto-address": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "crypto-address"
            ]
          },
          "asset": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The asset to be used in the operation.",
                "type": "string",
                "maxLength": 20
              }
            ]
          },
          "network": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The network that the crypto address is on.",
                "type": "string",
                "maxLength": 50
              }
            ]
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The crypto address.",
                "type": "string",
                "maxLength": 256
              }
            ]
          },
          "reference": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The additional identifier (e.g., destination tag, memo, or message) required for some networks such as XRP (Ripple), XLM (Stellar), EOS, and others. If the network does not require a tag, this field can be omitted.",
                "type": "string",
                "maxLength": 255
              }
            ]
          }
        },
        "required": [
          "type",
          "asset",
          "network",
          "address"
        ]
      },
      "create-quote-node-external-account-crypto": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "external-account"
            ]
          },
          "id": {
            "description": "The external account id.",
            "type": "string",
            "format": "uuid"
          },
          "network": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The network used with the crypto external account.",
                "type": "string",
                "maxLength": 50
              }
            ]
          }
        },
        "required": [
          "type",
          "id"
        ]
      },
      "non-zero-decimal-amount": {
        "type": "string",
        "pattern": "^(?!0+(\\.0+)?$)\\d+(\\.\\d+)?$"
      },
      "create-quote-denomination": {
        "type": "object",
        "properties": {
          "asset": {
            "description": "The asset in which the order is denominated.",
            "type": "string"
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/non-zero-decimal-amount"
              },
              {
                "description": "The amount of the order."
              }
            ]
          },
          "target": {
            "description": "Whether this exact amount should be paid by the origin or received by the destination.",
            "type": "string",
            "enum": [
              "origin",
              "destination"
            ],
            "default": "origin"
          }
        },
        "required": [
          "asset",
          "amount"
        ]
      },
      "create-quote-on-ramp-request": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the quote.",
            "type": "string",
            "enum": [
              "on-ramp"
            ]
          },
          "origin": {
            "type": "object",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "external-account": "#/components/schemas/create-quote-node-external-account",
                "apm": "#/components/schemas/create-quote-node-apm-origin"
              }
            },
            "oneOf": [
              {
                "title": "External account",
                "$ref": "#/components/schemas/create-quote-node-external-account"
              },
              {
                "title": "APM",
                "$ref": "#/components/schemas/create-quote-node-apm-origin"
              }
            ]
          },
          "destination": {
            "type": "object",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "crypto-address": "#/components/schemas/create-quote-node-crypto-address",
                "external-account": "#/components/schemas/create-quote-node-external-account-crypto"
              }
            },
            "oneOf": [
              {
                "title": "Crypto address",
                "$ref": "#/components/schemas/create-quote-node-crypto-address"
              },
              {
                "title": "External account",
                "$ref": "#/components/schemas/create-quote-node-external-account-crypto"
              }
            ]
          },
          "denomination": {
            "$ref": "#/components/schemas/create-quote-denomination"
          }
        },
        "required": [
          "type",
          "origin",
          "destination",
          "denomination"
        ]
      },
      "create-quote-node-crypto-outpoint": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "crypto-address"
            ]
          },
          "asset": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The asset to be used in the operation.",
                "type": "string",
                "maxLength": 20
              }
            ]
          },
          "network": {
            "allOf": [
              {
                "$ref": "#/components/schemas/string-no-edge-spaces"
              },
              {
                "description": "The network that the crypto address is on.",
                "type": "string",
                "maxLength": 50
              }
            ]
          }
        },
        "required": [
          "type",
          "asset",
          "network"
        ]
      },
      "create-quote-off-ramp-request": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the quote.",
            "type": "string",
            "enum": [
              "off-ramp"
            ]
          },
          "origin": {
            "$ref": "#/components/schemas/create-quote-node-crypto-outpoint"
          },
          "destination": {
            "type": "object",
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "external-account": "#/components/schemas/create-quote-node-external-account"
              }
            },
            "oneOf": [
              {
                "title": "External account",
                "$ref": "#/components/schemas/create-quote-node-external-account"
              }
            ]
          },
          "denomination": {
            "$ref": "#/components/schemas/create-quote-denomination"
          }
        },
        "required": [
          "type",
          "origin",
          "destination",
          "denomination"
        ]
      },
      "create-quote-request": {
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "on-ramp": "#/components/schemas/create-quote-on-ramp-request",
            "off-ramp": "#/components/schemas/create-quote-off-ramp-request"
          }
        },
        "oneOf": [
          {
            "title": "On-ramp",
            "$ref": "#/components/schemas/create-quote-on-ramp-request"
          },
          {
            "title": "Off-ramp",
            "$ref": "#/components/schemas/create-quote-off-ramp-request"
          }
        ]
      },
      "quote-requirements": {
        "description": "The requirements the user must address when attempting to create the order with this quote.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "description": "The code of the requirement.",
              "type": "string",
              "enum": [
                "authorize:3ds",
                "authorize:apple-pay",
                "authorize:google-pay",
                "authorize:paypal",
                "authorize:venmo",
                "travel-rule"
              ]
            },
            "quoteId": {
              "description": "The id of the quote for which the requirement must be fulfilled (e.g., the deposit quote to authorize).",
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "name",
            "quoteId"
          ]
        }
      },
      "quote-base": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The id of the quote.",
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "$ref": "#/components/schemas/order-type"
          },
          "pricing": {
            "description": "The pricing mode of the quote.",
            "$ref": "#/components/schemas/order-pricing"
          },
          "origin": {
            "type": "object"
          },
          "destination": {
            "type": "object"
          },
          "denomination": {
            "description": "The denomination of the quote.",
            "$ref": "#/components/schemas/order-denomination"
          },
          "fees": {
            "description": "The fees of the quote.",
            "$ref": "#/components/schemas/order-fees"
          },
          "requirements": {
            "$ref": "#/components/schemas/quote-requirements"
          },
          "refreshAt": {
            "description": "The time at which the quote can be refreshed.",
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "description": "The time at which the quote expires.",
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "type",
          "origin",
          "destination",
          "denomination",
          "fees",
          "requirements",
          "expiresAt",
          "refreshAt"
        ]
      },
      "quote-on-ramp": {
        "allOf": [
          {
            "$ref": "#/components/schemas/quote-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "description": "The type of the quote.",
                "type": "string",
                "enum": [
                  "on-ramp"
                ]
              },
              "origin": {
                "description": "The origin of the quote.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "External account",
                            "type": "object",
                            "discriminator": {
                              "propertyName": "via",
                              "mapping": {
                                "card": "#/components/schemas/quote-node-external-account-card",
                                "apm": "#/components/schemas/quote-node-external-account-apm"
                              }
                            },
                            "oneOf": [
                              {
                                "title": "External Account - Card",
                                "$ref": "#/components/schemas/quote-node-external-account-card"
                              },
                              {
                                "title": "External Account - APM",
                                "$ref": "#/components/schemas/quote-node-external-account-apm"
                              }
                            ]
                          },
                          {
                            "title": "APM",
                            "$ref": "#/components/schemas/quote-node-apm-origin"
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              },
              "destination": {
                "description": "The destination of the quote.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "Crypto address",
                            "$ref": "#/components/schemas/order-node-crypto-address"
                          },
                          {
                            "title": "External Account - Crypto",
                            "$ref": "#/components/schemas/order-node-external-account-crypto"
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              }
            },
            "required": [
              "type",
              "pricing"
            ]
          }
        ]
      },
      "order-node-crypto-outpoint": {
        "type": "object",
        "properties": {
          "type": {
            "description": "The type of the node.",
            "type": "string",
            "enum": [
              "crypto-address"
            ]
          },
          "network": {
            "description": "The network that the crypto address is on.",
            "$ref": "#/components/schemas/string-no-edge-spaces"
          }
        },
        "required": [
          "type",
          "network"
        ]
      },
      "quote-off-ramp": {
        "allOf": [
          {
            "$ref": "#/components/schemas/quote-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "description": "The type of the quote.",
                "type": "string",
                "enum": [
                  "off-ramp"
                ]
              },
              "pricing": {
                "description": "The pricing mode of the quote.",
                "type": "string",
                "enum": [
                  "estimated"
                ]
              },
              "origin": {
                "description": "The origin of the quote.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "$ref": "#/components/schemas/order-node-crypto-outpoint"
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              },
              "destination": {
                "description": "The destination of the quote.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/order-endpoint-base"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "node": {
                        "description": "The node of the endpoint.",
                        "oneOf": [
                          {
                            "title": "External account",
                            "type": "object",
                            "discriminator": {
                              "propertyName": "via",
                              "mapping": {
                                "card": "#/components/schemas/quote-node-external-account-card"
                              }
                            },
                            "oneOf": [
                              {
                                "title": "External Account - Card",
                                "$ref": "#/components/schemas/quote-node-external-account-card"
                              }
                            ]
                          }
                        ]
                      }
                    },
                    "required": [
                      "node"
                    ]
                  }
                ]
              }
            },
            "required": [
              "type",
              "pricing"
            ]
          }
        ]
      },
      "quote": {
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "on-ramp": "#/components/schemas/quote-on-ramp",
            "off-ramp": "#/components/schemas/quote-off-ramp"
          }
        },
        "oneOf": [
          {
            "title": "On-ramp",
            "$ref": "#/components/schemas/quote-on-ramp"
          },
          {
            "title": "Off-ramp",
            "$ref": "#/components/schemas/quote-off-ramp"
          }
        ]
      },
      "json-patch-with-value": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add",
              "replace",
              "test"
            ]
          },
          "path": {
            "type": "string"
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "object"
              },
              {
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "op",
          "path",
          "value"
        ]
      },
      "json-patch-with-from": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "move",
              "copy"
            ]
          },
          "path": {
            "type": "string"
          },
          "from": {
            "type": "string"
          }
        },
        "required": [
          "op",
          "path",
          "from"
        ]
      },
      "json-patch-remove": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "op": {
            "type": "string",
            "const": "remove"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "op",
          "path"
        ]
      },
      "json-patch-operations": {
        "description": "An array of RFC 6902 JSON Patch operations.",
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object",
          "discriminator": {
            "propertyName": "op",
            "mapping": {
              "add": "#/components/schemas/json-patch-with-value",
              "copy": "#/components/schemas/json-patch-with-from",
              "move": "#/components/schemas/json-patch-with-from",
              "remove": "#/components/schemas/json-patch-remove",
              "replace": "#/components/schemas/json-patch-with-value",
              "test": "#/components/schemas/json-patch-with-value"
            }
          },
          "oneOf": [
            {
              "title": "Add/Replace/Test",
              "$ref": "#/components/schemas/json-patch-with-value"
            },
            {
              "title": "Move/Copy",
              "$ref": "#/components/schemas/json-patch-with-from"
            },
            {
              "title": "Remove",
              "$ref": "#/components/schemas/json-patch-remove"
            }
          ],
          "required": [
            "op"
          ]
        }
      },
      "rail-type": {
        "type": "string",
        "enum": [
          "crypto",
          "card",
          "bank",
          "apm"
        ]
      },
      "rail-method": {
        "type": "string",
        "enum": [
          "crypto-transaction",
          "credit-card",
          "debit-card",
          "bank-transfer",
          "apple-pay",
          "google-pay",
          "paypal",
          "venmo"
        ]
      },
      "rail-base": {
        "type": "object",
        "properties": {
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/rail-type"
              },
              {
                "description": "The type of the rail."
              }
            ]
          },
          "network": {
            "description": "The network code of the rail.",
            "type": "string"
          },
          "method": {
            "allOf": [
              {
                "$ref": "#/components/schemas/rail-method"
              },
              {
                "description": "The method through which operations are carried over the network."
              }
            ]
          },
          "asset": {
            "description": "The asset code of the rail.",
            "type": "string"
          },
          "decimals": {
            "description": "The number of decimal places for the asset within the network.",
            "type": "integer",
            "minimum": 0
          },
          "features": {
            "description": "The features of the asset within the network.",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "withdraw",
                "deposit"
              ]
            }
          }
        },
        "required": [
          "type",
          "network",
          "method",
          "asset",
          "decimals",
          "features"
        ]
      },
      "rail-crypto": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/rail-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "crypto"
                ]
              },
              "method": {
                "enum": [
                  "crypto-transaction"
                ]
              },
              "contractAddress": {
                "description": "The contract address for the asset within the network.",
                "type": "string"
              }
            }
          }
        ]
      },
      "rail-card": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/rail-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "card"
                ]
              },
              "method": {
                "enum": [
                  "credit-card",
                  "debit-card"
                ]
              }
            }
          }
        ]
      },
      "rail-bank-constraint-allowed-deposit-accounts": {
        "type": "object",
        "properties": {
          "rule": {
            "type": "string",
            "enum": [
              "allowed-deposit-accounts"
            ]
          },
          "allowed": {
            "type": "string",
            "enum": [
              "default-only"
            ]
          }
        },
        "required": [
          "rule",
          "allowed"
        ]
      },
      "rail-bank-constraint": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/rail-bank-constraint-allowed-deposit-accounts"
          }
        ],
        "discriminator": {
          "propertyName": "rule",
          "mapping": {
            "allowed-deposit-accounts": "#/components/schemas/rail-bank-constraint-allowed-deposit-accounts"
          }
        }
      },
      "rail-bank": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/rail-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "bank"
                ]
              },
              "method": {
                "enum": [
                  "bank-transfer"
                ]
              },
              "constraints": {
                "description": "The constraints for the rail.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/rail-bank-constraint"
                }
              }
            }
          }
        ]
      },
      "rail-apm": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/rail-base"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "apm"
                ]
              },
              "method": {
                "enum": [
                  "apple-pay",
                  "google-pay",
                  "paypal",
                  "venmo"
                ]
              }
            }
          }
        ]
      },
      "rail": {
        "type": "object",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "crypto": "#/components/schemas/rail-crypto",
            "card": "#/components/schemas/rail-card",
            "bank": "#/components/schemas/rail-bank",
            "apm": "#/components/schemas/rail-apm"
          }
        },
        "oneOf": [
          {
            "title": "Crypto",
            "$ref": "#/components/schemas/rail-crypto"
          },
          {
            "title": "Card",
            "$ref": "#/components/schemas/rail-card"
          },
          {
            "title": "Bank",
            "$ref": "#/components/schemas/rail-bank"
          },
          {
            "title": "Alternative payment method",
            "$ref": "#/components/schemas/rail-apm"
          }
        ]
      },
      "webhook-event": {
        "description": "The webhook event information.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The id of the event.",
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "description": "The type of event.",
            "type": "string"
          },
          "createdAt": {
            "description": "The date and time when the event was created.",
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "description": "The event payload.",
            "type": "object"
          }
        },
        "required": [
          "id",
          "type",
          "createdAt",
          "data"
        ]
      },
      "order-webhook-event": {
        "allOf": [
          {
            "$ref": "#/components/schemas/webhook-event"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "order": {
                    "$ref": "#/components/schemas/order"
                  }
                },
                "required": [
                  "order"
                ]
              }
            }
          }
        ]
      }
    },
    "parameters": {
      "list-orders-type-filter": {
        "name": "type",
        "description": "Filter orders by type.",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/order-type"
        },
        "examples": {
          "On-ramp": {
            "value": "on-ramp"
          },
          "Off-ramp": {
            "value": "off-ramp"
          }
        }
      },
      "pagination-per-page": {
        "name": "perPage",
        "description": "The number of items per page.",
        "in": "query",
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        },
        "examples": {
          "10 Items Per Page": {
            "value": 10
          }
        }
      },
      "x-on-behalf-of": {
        "name": "X-On-Behalf-Of",
        "description": "The subject on whose behalf the operation is being performed.",
        "in": "header",
        "schema": {
          "type": "string",
          "pattern": "^(user|client)\\s[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$"
        },
        "examples": {
          "User Identifier": {
            "value": "user cd21b26d-35d2-408a-9201-b8fdbef7a604"
          },
          "Client Identifier": {
            "value": "client 3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        }
      },
      "x-uphold-user-ip": {
        "name": "X-Uphold-User-Ip",
        "description": "Contains the IP of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "oneOf": [
            {
              "title": "IPv4",
              "type": "string",
              "format": "ipv4"
            },
            {
              "title": "IPv6",
              "type": "string",
              "format": "ipv6"
            }
          ]
        },
        "examples": {
          "User Ip": {
            "value": "47.174.97.164"
          }
        }
      },
      "x-uphold-user-agent": {
        "name": "X-Uphold-User-Agent",
        "description": "Contains the user agent of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "User Agent": {
            "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
          }
        }
      },
      "x-uphold-user-origin": {
        "name": "X-Uphold-User-Origin",
        "description": "Contains the origin of the request made by the end user.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "Origin": {
            "value": "https://uphold.com"
          }
        }
      },
      "x-uphold-user-country": {
        "name": "X-Uphold-User-Country",
        "description": "Contains the code of the country of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/country-code-for-request"
        },
        "examples": {
          "User Country": {
            "value": "US"
          }
        }
      },
      "x-uphold-user-subdivision": {
        "name": "X-Uphold-User-Subdivision",
        "description": "Contains the code of the subdivision of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/subdivision-code-for-request"
        },
        "examples": {
          "User Subdivision": {
            "value": "US-CA"
          }
        }
      },
      "x-uphold-user-city": {
        "name": "X-Uphold-User-City",
        "description": "Contains the name of the city of the end user that is requesting the operation.",
        "in": "header",
        "schema": {
          "$ref": "#/components/schemas/string-no-edge-spaces"
        },
        "examples": {
          "User City": {
            "value": "San Francisco"
          }
        }
      },
      "order-id": {
        "name": "orderId",
        "description": "The id of the order.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "examples": {
          "Order ID": {
            "value": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0"
          }
        }
      },
      "metadata-entity": {
        "name": "entity",
        "description": "The type of entity whose metadata is being accessed.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "orders"
          ]
        },
        "examples": {
          "Order Entity": {
            "value": "orders"
          }
        }
      },
      "metadata-entity-id": {
        "name": "entityId",
        "description": "The unique identifier of the entity whose metadata is being accessed.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "examples": {
          "Order ID": {
            "value": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0"
          }
        }
      },
      "metadata-if-none-match": {
        "name": "If-None-Match",
        "description": "Retrieves the entity metadata only if it does not match the given revision.",
        "in": "header",
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string",
          "pattern": "^(?:W\\/)?\"([A-Fa-f0-9]{64})\"$"
        },
        "examples": {
          "Metadata Revision": {
            "value": "\"b59c6960e8c802ec287f3892b398b7b58eb4790640414f2c2b048ff22f873d72\""
          }
        }
      },
      "metadata-if-match": {
        "name": "If-Match",
        "description": "Ensures conditional update by matching the current metadata revision.",
        "in": "header",
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string",
          "pattern": "^(?:W\\/)?\"([A-Fa-f0-9]{64})\"$"
        },
        "examples": {
          "Metadata Revision": {
            "value": "\"abc123def456789012345678901234567890123456789012345678901234abcd\""
          }
        }
      },
      "metadata-if-none-match-any": {
        "name": "If-None-Match",
        "description": "Prevents upsert operation if there is an existing metadata revision.",
        "in": "header",
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string",
          "enum": [
            "*"
          ]
        },
        "examples": {
          "Any Revision": {
            "value": "*"
          }
        }
      },
      "list-rails-ramp-type-filter": {
        "name": "rampType",
        "description": "Filter rails by ramp type. Without it, the rails of every ramp type are listed.",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/order-type"
        },
        "examples": {
          "On-ramp": {
            "value": "on-ramp"
          },
          "Off-ramp": {
            "value": "off-ramp"
          }
        }
      },
      "list-rails-type-filter": {
        "name": "type",
        "description": "Filter rails by type.",
        "in": "query",
        "explode": false,
        "required": false,
        "schema": {
          "type": "array",
          "maxItems": 25,
          "uniqueItems": true,
          "items": {
            "$ref": "#/components/schemas/rail-type"
          }
        },
        "examples": {
          "Crypto Rail Type": {
            "value": [
              "crypto"
            ]
          }
        }
      },
      "list-rails-network-code-filter": {
        "name": "network",
        "description": "Filter rails by network code.",
        "in": "query",
        "explode": false,
        "required": false,
        "schema": {
          "type": "array",
          "maxItems": 25,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "examples": {
          "Bitcoin Network": {
            "value": [
              "bitcoin"
            ]
          }
        }
      },
      "list-rails-method-filter": {
        "name": "method",
        "description": "Filter rails by method.",
        "in": "query",
        "style": "form",
        "explode": false,
        "required": false,
        "schema": {
          "type": "array",
          "maxItems": 25,
          "uniqueItems": true,
          "items": {
            "$ref": "#/components/schemas/rail-method"
          }
        },
        "examples": {
          "Debit Card Method": {
            "value": [
              "debit-card"
            ]
          }
        }
      },
      "list-rails-asset-code-filter": {
        "name": "asset",
        "description": "Filter rails by asset code.",
        "in": "query",
        "style": "form",
        "explode": false,
        "required": false,
        "schema": {
          "type": "array",
          "maxItems": 100,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "examples": {
          "BTC Asset": {
            "value": [
              "BTC"
            ]
          }
        }
      },
      "webhook-id": {
        "name": "webhook-id",
        "description": "The unique identifier of the webhook.",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "examples": {
          "Webhook ID": {
            "value": "msg_p5jXN8AQM9LWM0D4loKWxJek"
          }
        }
      },
      "webhook-timestamp": {
        "name": "webhook-timestamp",
        "description": "The timestamp of the webhook, in seconds after the Unix epoch.",
        "in": "header",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "examples": {
          "Webhook Timestamp": {
            "value": 1614265330
          }
        }
      },
      "webhook-signature": {
        "name": "webhook-signature",
        "description": "The signature of the webhook.",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string"
        },
        "examples": {
          "Webhook Signature": {
            "value": "v1,Hw8/adTzfYtjPGhuBahfmGhUROG3AvEKH3mvkeK791Q="
          }
        }
      }
    },
    "responses": {
      "list-orders-response": {
        "description": "Orders retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "orders": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/order"
                  }
                },
                "pagination": {
                  "$ref": "#/components/schemas/pagination"
                }
              },
              "required": [
                "orders",
                "pagination"
              ]
            },
            "examples": {
              "Orders Retrieved": {
                "value": {
                  "orders": [
                    {
                      "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                      "type": "on-ramp",
                      "pricing": "locked",
                      "origin": {
                        "asset": "USD",
                        "amount": "100.00",
                        "rate": "2.07021435361804542440",
                        "node": {
                          "type": "external-account",
                          "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                          "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                          "via": "card",
                          "network": "visa"
                        }
                      },
                      "destination": {
                        "asset": "XRP",
                        "amount": "46.125658",
                        "rate": "0.48304176727029881912",
                        "node": {
                          "type": "crypto-address",
                          "network": "xrp-ledger",
                          "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                          "reference": "67809592",
                          "execution": {
                            "mode": "onchain",
                            "transactionHash": "E3FE6EA3D48F0C2B639448020EA4F03D4F4F8FFDB243A852A44F5D14B4B4D6E2"
                          }
                        }
                      },
                      "denomination": {
                        "asset": "USD",
                        "amount": "100.00",
                        "rate": "1.00000000000000000000",
                        "target": "origin"
                      },
                      "fees": [
                        {
                          "type": "deposit",
                          "code": "credit-card-deposit",
                          "asset": "USD",
                          "amount": "1.00",
                          "percentage": "1",
                          "beneficiary": "uphold"
                        },
                        {
                          "type": "network",
                          "code": "crypto-network",
                          "asset": "USD",
                          "amount": "3.51"
                        }
                      ],
                      "status": "completed",
                      "timeline": [
                        {
                          "event": "deposit-processing",
                          "timestamp": "2024-07-24T15:22:39.000Z"
                        },
                        {
                          "event": "deposit-completed",
                          "timestamp": "2024-07-24T15:22:44.000Z"
                        },
                        {
                          "event": "withdrawal-processing",
                          "timestamp": "2024-07-24T15:22:45.000Z"
                        },
                        {
                          "event": "withdrawal-sent",
                          "timestamp": "2024-07-24T15:22:50.000Z"
                        },
                        {
                          "event": "withdrawal-completed",
                          "timestamp": "2024-07-24T15:33:08.000Z"
                        }
                      ],
                      "quotedAt": "2024-07-24T15:02:39.000Z",
                      "createdAt": "2024-07-24T15:22:39.000Z",
                      "updatedAt": "2024-07-24T15:33:08.000Z",
                      "completedAt": "2024-07-24T15:33:08.000Z"
                    },
                    {
                      "id": "eeb97ca0-41fb-46d0-a5e5-689e520ce267",
                      "type": "off-ramp",
                      "pricing": "locked",
                      "origin": {
                        "asset": "XRP",
                        "amount": "209.112561",
                        "rate": "2.07021435361804542440",
                        "node": {
                          "type": "crypto-address",
                          "network": "xrp-ledger",
                          "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                          "reference": "67809592",
                          "execution": {
                            "mode": "onchain",
                            "transactionHash": "B4D7E1A3C6F9028E5B7D1A4C8E2F6B9D3A7C1E5F9B2D6A8C4E0F3B7D1A5C9E2F"
                          }
                        }
                      },
                      "destination": {
                        "asset": "USD",
                        "amount": "100.00",
                        "rate": "0.48304176727029881912",
                        "node": {
                          "type": "external-account",
                          "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                          "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                          "via": "card",
                          "network": "visa"
                        }
                      },
                      "denomination": {
                        "asset": "USD",
                        "amount": "100.00",
                        "rate": "1.00000000000000000000",
                        "target": "destination"
                      },
                      "fees": [
                        {
                          "type": "withdrawal",
                          "code": "credit-card-withdrawal",
                          "asset": "XRP",
                          "amount": "2.091126",
                          "percentage": "1",
                          "beneficiary": "uphold"
                        }
                      ],
                      "status": "completed",
                      "timeline": [
                        {
                          "event": "deposit-processing",
                          "timestamp": "2024-07-23T10:14:30.000Z"
                        },
                        {
                          "event": "deposit-completed",
                          "timestamp": "2024-07-23T10:14:42.000Z"
                        },
                        {
                          "event": "withdrawal-processing",
                          "timestamp": "2024-07-23T10:14:43.000Z"
                        },
                        {
                          "event": "withdrawal-sent",
                          "timestamp": "2024-07-23T10:14:47.000Z"
                        },
                        {
                          "event": "withdrawal-completed",
                          "timestamp": "2024-07-23T10:20:02.000Z"
                        }
                      ],
                      "quotedAt": "2024-07-23T10:12:05.000Z",
                      "createdAt": "2024-07-23T10:12:11.000Z",
                      "updatedAt": "2024-07-23T10:20:02.000Z",
                      "completedAt": "2024-07-23T10:20:02.000Z"
                    }
                  ],
                  "pagination": {
                    "first": "https://api.enterprise.uphold.com/on-off-ramp/orders?perPage=2",
                    "next": "https://api.enterprise.uphold.com/on-off-ramp/orders?perPage=2&cursor=019f1d20-d9c0-7000-8000-000000000003"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "bad-request": {
        "description": "Bad Request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Invalid Request": {
                "value": {
                  "code": "request_invalid",
                  "message": "The request has missing or invalid parameters",
                  "details": {
                    "context": "<context>",
                    "violations": [
                      {
                        "property": "<property>",
                        "rule": "required"
                      },
                      {
                        "property": "<property>",
                        "rule": "type",
                        "ruleParams": {
                          "type": "string"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "unauthorized": {
        "description": "Unauthorized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Token Expired": {
                "value": {
                  "code": "token_expired",
                  "message": "The access token has expired"
                }
              },
              "Token Invalid": {
                "value": {
                  "code": "token_invalid",
                  "message": "The access token is invalid"
                }
              },
              "Token Revoked": {
                "value": {
                  "code": "token_revoked",
                  "message": "The access token has been revoked"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "forbidden": {
        "description": "Forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Token Insufficient Scopes": {
                "value": {
                  "code": "token_insufficient_scopes",
                  "message": "Authorization failed due to insufficient scopes",
                  "details": {
                    "security": [
                      {
                        "scheme": "OAuth",
                        "schemeScopes": [
                          "required:scope_1",
                          "required:scope_2"
                        ],
                        "tokenScopes": [
                          "token:scope"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "too-many-requests": {
        "description": "Too Many Requests.",
        "headers": {
          "Retry-After": {
            "description": "The number of seconds to wait before making a new request.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "examples": {
              "Retry After": {
                "value": 60
              }
            }
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Too Many Requests": {
                "value": {
                  "code": "too_many_requests",
                  "message": "Try again later"
                }
              }
            }
          }
        }
      },
      "create-order-response": {
        "description": "Order created.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/order"
                },
                "errors": {
                  "description": "Additional contextual errors that occurred while processing the request.",
                  "type": "object",
                  "properties": {
                    "metadata": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/error"
                        },
                        {
                          "description": "Error related to metadata processing."
                        }
                      ]
                    }
                  }
                }
              },
              "required": [
                "order"
              ]
            },
            "examples": {
              "On-ramp Order Created - Credit Card to XRP": {
                "value": {
                  "order": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "2.07021435361804542440",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa",
                        "confirmationUrl": "https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_zrih63pnk6ietkpuerqiyd5zga"
                      }
                    },
                    "destination": {
                      "asset": "XRP",
                      "amount": "46.125658",
                      "rate": "0.48304176727029881912",
                      "node": {
                        "type": "crypto-address",
                        "network": "xrp-ledger",
                        "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                        "reference": "67809592"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "status": "processing",
                    "timeline": [],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:03:39.000Z",
                    "updatedAt": "2024-07-24T15:03:39.000Z"
                  }
                }
              },
              "On-ramp Order Created - Credit Card to Crypto External Account": {
                "value": {
                  "order": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa",
                        "confirmationUrl": "https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_zrih63pnk6ietkpuerqiyd5zga"
                      }
                    },
                    "destination": {
                      "asset": "BTC",
                      "amount": "0.00106987",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "external-account",
                        "id": "5606d0a7-ff4d-ce4f-8675-dea65619122e",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "crypto",
                        "network": "bitcoin"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "status": "processing",
                    "timeline": [],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:03:39.000Z",
                    "updatedAt": "2024-07-24T15:03:39.000Z"
                  }
                }
              },
              "Off-ramp Order Created - BTC to Debit Card": {
                "value": {
                  "order": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "off-ramp",
                    "pricing": "estimated",
                    "origin": {
                      "asset": "BTC",
                      "amount": "0.00113173",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "crypto-address",
                        "network": "bitcoin"
                      }
                    },
                    "destination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "destination"
                    },
                    "fees": [
                      {
                        "type": "withdrawal",
                        "code": "credit-card-withdrawal",
                        "asset": "BTC",
                        "amount": "0.00001132",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      }
                    ],
                    "status": "pending",
                    "timeline": [],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:03:39.000Z",
                    "updatedAt": "2024-07-24T15:03:39.000Z"
                  }
                }
              },
              "Order Created With Metadata Error": {
                "value": {
                  "order": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "off-ramp",
                    "pricing": "estimated",
                    "origin": {
                      "asset": "BTC",
                      "amount": "0.00113173",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "crypto-address",
                        "network": "bitcoin"
                      }
                    },
                    "destination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "destination"
                    },
                    "fees": [
                      {
                        "type": "withdrawal",
                        "code": "credit-card-withdrawal",
                        "asset": "BTC",
                        "amount": "0.00001132",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      }
                    ],
                    "status": "pending",
                    "timeline": [],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:03:39.000Z",
                    "updatedAt": "2024-07-24T15:03:39.000Z"
                  },
                  "errors": {
                    "metadata": {
                      "code": "content_too_large",
                      "message": "The entity metadata size is greater than maximum size limit",
                      "details": {
                        "threshold": {
                          "unit": "characters",
                          "limit": 1024
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-order-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Quote Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The quote cannot be found",
                  "details": {
                    "entity": "quote"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-order-conflict-response": {
        "description": "Business logic error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Missing User Context": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Request not allowed due to missing user context",
                  "details": {
                    "reasons": [
                      "missing-user-ip-header",
                      "missing-user-agent-header"
                    ]
                  }
                }
              },
              "Missing Return URL": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to a missing return URL",
                  "details": {
                    "reasons": [
                      "missing-return-url"
                    ]
                  }
                }
              },
              "Duplicate Deposit": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to a duplicate deposit",
                  "details": {
                    "reasons": [
                      "duplicate-deposit"
                    ]
                  }
                }
              },
              "Quote Rate Variance Not Allowed": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to high quote rate variance",
                  "details": {
                    "reasons": [
                      "quote-rate-variance-not-allowed"
                    ]
                  }
                }
              },
              "Country Restricted Transaction": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to a country-restricted violation",
                  "details": {
                    "reasons": [
                      "country-restricted-transaction"
                    ]
                  }
                }
              },
              "Pending Requests For Information": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Order not allowed due to pending requests for information",
                  "details": {
                    "reasons": [
                      "pending-requests-for-information"
                    ]
                  }
                }
              },
              "User Tier Changed": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Order not allowed due to a change in the user tier",
                  "details": {
                    "reasons": [
                      "user-tier-changed"
                    ]
                  }
                }
              },
              "Card Declined": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to the card being declined",
                  "details": {
                    "reasons": [
                      "card-declined"
                    ]
                  }
                }
              },
              "Processing Failure": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to a processing failure",
                  "details": {
                    "reasons": [
                      "card-unauthorized"
                    ]
                  }
                }
              },
              "User Capability Failure - Requirements": {
                "value": {
                  "code": "user_capability_failure",
                  "message": "The user has capability constraints",
                  "details": {
                    "capability": {
                      "code": "on-ramp",
                      "requirements": [
                        "user-must-submit-identity"
                      ],
                      "restrictions": []
                    }
                  }
                }
              },
              "User Capability Failure - Restrictions": {
                "value": {
                  "code": "user_capability_failure",
                  "message": "The user has capability constraints",
                  "details": {
                    "capability": {
                      "code": "on-ramp",
                      "requirements": [],
                      "restrictions": [
                        "user-country-not-supported"
                      ]
                    }
                  }
                }
              },
              "Amount Exceeds Periodic Limit": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount exceeds the daily limit",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "amount-exceeds-daily-limit",
                    "limit": {
                      "maximumAmount": "100.00",
                      "remainingAmount": "80.00"
                    }
                  }
                }
              },
              "Amount Maximum Limit Exceeded": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount maximum limit was exceeded",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "maximum-limit-exceeded",
                    "limit": {
                      "maximumAmount": "150.00"
                    }
                  }
                }
              },
              "Amount Minimum Limit Not Met": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount minimum limit was not met",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "minimum-limit-not-met",
                    "limit": {
                      "minimumAmount": "0.85"
                    }
                  }
                }
              },
              "Unspecified Error": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to an unspecified error",
                  "details": {
                    "reasons": [
                      "unspecified-error"
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "get-order-response": {
        "description": "Order retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "order": {
                  "$ref": "#/components/schemas/order"
                }
              },
              "required": [
                "order"
              ]
            },
            "examples": {
              "Order Retrieved": {
                "value": {
                  "order": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "2.07021435361804542440",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "destination": {
                      "asset": "XRP",
                      "amount": "46.125658",
                      "rate": "0.48304176727029881912",
                      "node": {
                        "type": "crypto-address",
                        "network": "xrp-ledger",
                        "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                        "reference": "67809592",
                        "execution": {
                          "mode": "onchain",
                          "transactionHash": "E3FE6EA3D48F0C2B639448020EA4F03D4F4F8FFDB243A852A44F5D14B4B4D6E2"
                        }
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "status": "completed",
                    "timeline": [
                      {
                        "event": "deposit-processing",
                        "timestamp": "2024-07-24T15:22:39.000Z"
                      },
                      {
                        "event": "deposit-completed",
                        "timestamp": "2024-07-24T15:22:44.000Z"
                      },
                      {
                        "event": "withdrawal-processing",
                        "timestamp": "2024-07-24T15:22:45.000Z"
                      },
                      {
                        "event": "withdrawal-sent",
                        "timestamp": "2024-07-24T15:22:50.000Z"
                      },
                      {
                        "event": "withdrawal-completed",
                        "timestamp": "2024-07-24T15:33:08.000Z"
                      }
                    ],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:22:39.000Z",
                    "updatedAt": "2024-07-24T15:33:08.000Z",
                    "completedAt": "2024-07-24T15:33:08.000Z"
                  }
                }
              },
              "Order Retrieved - Alternative Payment Method to XRP": {
                "value": {
                  "order": {
                    "id": "c5e2a0d4-6b1f-4e8a-9d3c-2f7b8a1e4d60",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "2.07021435361804542440",
                      "node": {
                        "type": "apm",
                        "method": "paypal"
                      }
                    },
                    "destination": {
                      "asset": "XRP",
                      "amount": "46.125658",
                      "rate": "0.48304176727029881912",
                      "node": {
                        "type": "crypto-address",
                        "network": "xrp-ledger",
                        "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                        "reference": "67809592",
                        "execution": {
                          "mode": "onchain",
                          "transactionHash": "A91C3E5F7B2D4068E1F3A5C7B9D0E2F4A6C8E0B2D4F6A8C0E2B4D6F8A0C2E4F6"
                        }
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "alternative-payment-method-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "status": "completed",
                    "timeline": [
                      {
                        "event": "deposit-processing",
                        "timestamp": "2024-07-24T15:22:39.000Z"
                      },
                      {
                        "event": "deposit-completed",
                        "timestamp": "2024-07-24T15:22:44.000Z"
                      },
                      {
                        "event": "withdrawal-processing",
                        "timestamp": "2024-07-24T15:22:45.000Z"
                      },
                      {
                        "event": "withdrawal-sent",
                        "timestamp": "2024-07-24T15:22:50.000Z"
                      },
                      {
                        "event": "withdrawal-completed",
                        "timestamp": "2024-07-24T15:33:08.000Z"
                      }
                    ],
                    "quotedAt": "2024-07-24T15:02:39.000Z",
                    "createdAt": "2024-07-24T15:22:39.000Z",
                    "updatedAt": "2024-07-24T15:33:08.000Z",
                    "completedAt": "2024-07-24T15:33:08.000Z"
                  }
                }
              },
              "Order Retrieved - Credit Card to Crypto External Account": {
                "value": {
                  "order": {
                    "id": "aae7d753-6f05-4ec7-abc7-42d873af59b8",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "GBP",
                      "amount": "37.88",
                      "rate": "1.10650721",
                      "node": {
                        "type": "external-account",
                        "id": "7e19455d-4f37-470b-97c8-c3c46929afe8",
                        "ownerId": "0e09372e-e0e0-416b-a0af-9dd47f007389",
                        "via": "card",
                        "network": "mastercard"
                      }
                    },
                    "destination": {
                      "asset": "XRP",
                      "amount": "32.860156",
                      "rate": "0.90374467558689064494",
                      "node": {
                        "type": "external-account",
                        "id": "42812374-4beb-c271-9011-44eb9713b638",
                        "ownerId": "0e09372e-e0e0-416b-a0af-9dd47f007389",
                        "via": "crypto",
                        "network": "xrp-ledger",
                        "execution": {
                          "mode": "onchain",
                          "transactionHash": "7C2E9B4A1D6F8035E2B7C4A9D1F6E3B8A5C2D7F4E1B9A6C3D8F5E2B7A4C1D9E6"
                        }
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "50.00",
                      "rate": "0.75757101480937430355",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "GBP",
                        "amount": "1.51",
                        "percentage": "3.99",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "GBP",
                        "amount": "0.01"
                      }
                    ],
                    "status": "completed",
                    "timeline": [
                      {
                        "event": "deposit-processing",
                        "timestamp": "2026-09-26T14:54:05.112Z"
                      },
                      {
                        "event": "deposit-completed",
                        "timestamp": "2026-09-26T14:54:31.405Z"
                      },
                      {
                        "event": "withdrawal-processing",
                        "timestamp": "2026-09-26T14:54:32.018Z"
                      },
                      {
                        "event": "withdrawal-sent",
                        "timestamp": "2026-09-26T14:54:36.772Z"
                      },
                      {
                        "event": "withdrawal-completed",
                        "timestamp": "2026-09-26T14:54:41.209Z"
                      }
                    ],
                    "quotedAt": "2026-09-26T14:53:57.890Z",
                    "createdAt": "2026-09-26T14:54:05.112Z",
                    "updatedAt": "2026-09-26T14:54:41.209Z",
                    "completedAt": "2026-09-26T14:54:41.209Z"
                  }
                }
              },
              "Order Retrieved - BTC to Debit Card": {
                "value": {
                  "order": {
                    "id": "7bd2bbcb-52c5-4f03-bb8e-27829f9cfb65",
                    "type": "off-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "BTC",
                      "amount": "0.00114037",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "crypto-address",
                        "network": "bitcoin",
                        "address": "mt77MA2KBengxQa8txmGcVau9DSda12RHX",
                        "execution": {
                          "mode": "onchain",
                          "transactionHash": "3a1f2c9d8e7b6a5f4e3d2c1b0a9f8e7d6c5b4a39281706f5e4d3c2b1a0f9e8d7"
                        }
                      }
                    },
                    "destination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "destination"
                    },
                    "fees": [
                      {
                        "type": "withdrawal",
                        "code": "credit-card-withdrawal",
                        "asset": "BTC",
                        "amount": "0.00001996",
                        "percentage": "1.75",
                        "beneficiary": "uphold"
                      }
                    ],
                    "status": "completed",
                    "timeline": [
                      {
                        "event": "deposit-processing",
                        "timestamp": "2026-09-26T15:01:12.430Z"
                      },
                      {
                        "event": "deposit-completed",
                        "timestamp": "2026-09-26T15:31:48.902Z"
                      },
                      {
                        "event": "withdrawal-processing",
                        "timestamp": "2026-09-26T15:31:49.517Z"
                      },
                      {
                        "event": "withdrawal-sent",
                        "timestamp": "2026-09-26T15:31:53.284Z"
                      },
                      {
                        "event": "withdrawal-completed",
                        "timestamp": "2026-09-26T15:32:20.661Z"
                      }
                    ],
                    "quotedAt": "2026-09-26T14:53:57.890Z",
                    "createdAt": "2026-09-26T14:54:05.112Z",
                    "updatedAt": "2026-09-26T15:32:20.661Z",
                    "completedAt": "2026-09-26T15:32:20.661Z"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "get-order-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Order Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The order cannot be found",
                  "details": {
                    "entity": "order"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-quote-response": {
        "description": "Quote created.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "quote": {
                  "$ref": "#/components/schemas/quote"
                }
              },
              "required": [
                "quote"
              ]
            },
            "examples": {
              "On-ramp Quote Created": {
                "value": {
                  "quote": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "2.07021435361804542440",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "destination": {
                      "asset": "XRP",
                      "amount": "46.125658",
                      "rate": "0.48304176727029881912",
                      "node": {
                        "type": "crypto-address",
                        "network": "xrp-ledger",
                        "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                        "reference": "67809592"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "requirements": [
                      {
                        "name": "authorize:3ds",
                        "quoteId": "9f8a7c2e-1b3d-4e5f-8a6b-7c9d0e1f2a3b"
                      }
                    ],
                    "expiresAt": "2024-07-24T15:22:51.000Z",
                    "refreshAt": "2024-07-24T15:22:39.000Z"
                  }
                }
              },
              "On-ramp Quote Created - Credit Card to Crypto External Account": {
                "value": {
                  "quote": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "on-ramp",
                    "pricing": "locked",
                    "origin": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "destination": {
                      "asset": "BTC",
                      "amount": "0.00106987",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "external-account",
                        "id": "5606d0a7-ff4d-ce4f-8675-dea65619122e",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "crypto",
                        "network": "bitcoin"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "origin"
                    },
                    "fees": [
                      {
                        "type": "deposit",
                        "code": "credit-card-deposit",
                        "asset": "USD",
                        "amount": "1.00",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      },
                      {
                        "type": "network",
                        "code": "crypto-network",
                        "asset": "USD",
                        "amount": "3.51"
                      }
                    ],
                    "requirements": [
                      {
                        "name": "authorize:3ds",
                        "quoteId": "9f8a7c2e-1b3d-4e5f-8a6b-7c9d0e1f2a3b"
                      }
                    ],
                    "expiresAt": "2024-07-24T15:22:51.000Z",
                    "refreshAt": "2024-07-24T15:22:39.000Z"
                  }
                }
              },
              "Off-ramp Quote Created": {
                "value": {
                  "quote": {
                    "id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                    "type": "off-ramp",
                    "pricing": "estimated",
                    "origin": {
                      "asset": "BTC",
                      "amount": "0.00113173",
                      "rate": "0.00001120405708392375",
                      "node": {
                        "type": "crypto-address",
                        "network": "bitcoin"
                      }
                    },
                    "destination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "89253.38317267768950981583",
                      "node": {
                        "type": "external-account",
                        "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
                        "ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
                        "via": "card",
                        "network": "visa"
                      }
                    },
                    "denomination": {
                      "asset": "USD",
                      "amount": "100.00",
                      "rate": "1.00000000000000000000",
                      "target": "destination"
                    },
                    "fees": [
                      {
                        "type": "withdrawal",
                        "code": "credit-card-withdrawal",
                        "asset": "BTC",
                        "amount": "0.00001132",
                        "percentage": "1",
                        "beneficiary": "uphold"
                      }
                    ],
                    "requirements": [],
                    "expiresAt": "2024-07-24T15:22:51.000Z",
                    "refreshAt": "2024-07-24T15:22:39.000Z"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-quote-not-found-response": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Denomination Asset Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The denomination asset cannot be found",
                  "details": {
                    "entity": "asset",
                    "context": "body",
                    "property": "denomination.asset"
                  }
                }
              },
              "Origin Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The origin cannot be found",
                  "details": {
                    "entity": "external-account",
                    "context": "body",
                    "property": "origin"
                  }
                }
              },
              "Destination Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The destination cannot be found",
                  "details": {
                    "entity": "external-account",
                    "context": "body",
                    "property": "destination"
                  }
                }
              },
              "Rail For Destination Asset And Network Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "A rail for the specified destination asset and network cannot be found",
                  "details": {
                    "entity": "rail",
                    "context": "body",
                    "property": "destination"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "create-quote-conflict-response": {
        "description": "Business logic error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Transaction Node Invalid": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The origin node is invalid"
                }
              },
              "Origin External Account Status Invalid": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The origin external account status is invalid"
                }
              },
              "Destination External Account Status Invalid": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The destination external account status is invalid"
                }
              },
              "Origin External Account Type Not Allowed": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The origin external account type is not allowed"
                }
              },
              "Destination External Account Type Not Allowed": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The destination external account type is not allowed"
                }
              },
              "Destination External Account Missing Withdraw Feature": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The destination external account lacks 'withdraw' feature"
                }
              },
              "Destination External Account Network Not Supported": {
                "value": {
                  "code": "transaction_node_invalid",
                  "message": "The destination external account does not support the specified network"
                }
              },
              "Crypto Address Invalid": {
                "value": {
                  "code": "crypto_address_invalid",
                  "message": "The crypto address is invalid",
                  "details": {
                    "context": "body",
                    "property": "destination.address"
                  }
                }
              },
              "Crypto Address Reference Missing": {
                "value": {
                  "code": "crypto_address_invalid",
                  "message": "The crypto address reference is missing",
                  "details": {
                    "context": "body",
                    "property": "destination.reference"
                  }
                }
              },
              "Crypto Address Reference Invalid": {
                "value": {
                  "code": "crypto_address_invalid",
                  "message": "The crypto address reference is invalid",
                  "details": {
                    "context": "body",
                    "property": "destination.reference"
                  }
                }
              },
              "User Capability Failure - Requirements": {
                "value": {
                  "code": "user_capability_failure",
                  "message": "The user has capability constraints",
                  "details": {
                    "capability": {
                      "code": "on-ramp",
                      "requirements": [
                        "user-must-submit-identity"
                      ],
                      "restrictions": []
                    }
                  }
                }
              },
              "User Capability Failure - Restrictions": {
                "value": {
                  "code": "user_capability_failure",
                  "message": "The user has capability constraints",
                  "details": {
                    "capability": {
                      "code": "on-ramp",
                      "requirements": [],
                      "restrictions": [
                        "user-country-not-supported"
                      ]
                    }
                  }
                }
              },
              "Origin Asset Missing Sell Feature": {
                "value": {
                  "code": "asset_feature_not_available",
                  "message": "The 'sell' feature is not available for the origin asset",
                  "details": {
                    "context": "body",
                    "property": "origin",
                    "feature": "sell"
                  }
                }
              },
              "Destination Asset Missing Buy Feature": {
                "value": {
                  "code": "asset_feature_not_available",
                  "message": "The 'buy' feature is not available for the destination asset",
                  "details": {
                    "context": "body",
                    "property": "destination",
                    "feature": "buy"
                  }
                }
              },
              "Amount Maximum Limit Exceeded": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount maximum limit was exceeded",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "maximum-limit-exceeded",
                    "limit": {
                      "maximumAmount": "150.00"
                    }
                  }
                }
              },
              "Amount Minimum Limit Not Met": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount minimum limit was not met",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "minimum-limit-not-met",
                    "limit": {
                      "minimumAmount": "0.85"
                    }
                  }
                }
              },
              "Amount Exceeds Periodic Limit": {
                "value": {
                  "code": "transaction_amount_invalid",
                  "message": "The amount exceeds the daily limit",
                  "details": {
                    "context": "body",
                    "property": "denomination",
                    "rule": "amount-exceeds-daily-limit",
                    "limit": {
                      "maximumAmount": "100.00",
                      "remainingAmount": "80.00"
                    }
                  }
                }
              },
              "Country Restricted Transaction": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to a country-restricted violation",
                  "details": {
                    "reasons": [
                      "country-restricted-transaction"
                    ]
                  }
                }
              },
              "Unspecified Error": {
                "value": {
                  "code": "operation_not_allowed",
                  "message": "Transaction not allowed due to an unspecified error",
                  "details": {
                    "reasons": [
                      "unspecified-error"
                    ]
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "get-metadata-response": {
        "description": "Metadata retrieved.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/metadata-etag"
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                }
              },
              "required": [
                "metadata"
              ]
            },
            "examples": {
              "Metadata Retrieved": {
                "value": {
                  "metadata": {
                    "externalId": 123
                  }
                }
              }
            }
          }
        }
      },
      "get-metadata-not-modified-response": {
        "description": "Metadata not modified.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/metadata-etag"
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "metadata-not-found": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Metadata Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The entity metadata cannot be found",
                  "details": {
                    "entity": "metadata"
                  }
                }
              },
              "Entity Not Found": {
                "value": {
                  "code": "entity_not_found",
                  "message": "The <entity> cannot be found",
                  "details": {
                    "entity": "<entity>"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "set-metadata-replaced-response": {
        "description": "Metadata replaced.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/metadata-etag"
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                }
              },
              "required": [
                "metadata"
              ]
            },
            "examples": {
              "Metadata Replaced": {
                "value": {
                  "metadata": {
                    "externalId": 123
                  }
                }
              }
            }
          }
        }
      },
      "set-metadata-created-response": {
        "description": "Metadata created.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/metadata-etag"
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                }
              },
              "required": [
                "metadata"
              ]
            },
            "examples": {
              "Metadata Created": {
                "value": {
                  "metadata": {
                    "externalId": 123
                  }
                }
              }
            }
          }
        }
      },
      "set-metadata-conflict-response": {
        "description": "Business logic error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Metadata Already Exists": {
                "value": {
                  "code": "duplicate",
                  "message": "The entity metadata already exists"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "metadata-precondition-failed": {
        "description": "Precondition failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Metadata Precondition Failed": {
                "value": {
                  "code": "precondition_failed",
                  "message": "The If-Match header value does not match the current metadata"
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "metadata-payload-too-large": {
        "description": "Payload too large.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Metadata Payload Too Large": {
                "value": {
                  "code": "content_too_large",
                  "message": "The entity metadata size is greater than maximum size limit",
                  "details": {
                    "threshold": {
                      "unit": "characters",
                      "limit": 1024
                    }
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "delete-metadata-response": {
        "description": "Metadata deleted.",
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "update-metadata-response": {
        "description": "Metadata updated.",
        "headers": {
          "ETag": {
            "$ref": "#/components/headers/metadata-etag"
          },
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "metadata": {
                  "$ref": "#/components/schemas/metadata"
                }
              },
              "required": [
                "metadata"
              ]
            },
            "examples": {
              "Metadata Patched": {
                "value": {
                  "metadata": {
                    "externalId": 123
                  }
                }
              }
            }
          }
        }
      },
      "update-metadata-unprocessable-entity-response": {
        "description": "Unprocessable entity.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error"
            },
            "examples": {
              "Replace Operation Path Not Found": {
                "value": {
                  "code": "json_patch_failed",
                  "message": "The entity metadata patch operation failed to apply",
                  "details": {
                    "operation": {
                      "index": 0,
                      "op": "replace",
                      "path": "/items/10"
                    },
                    "reason": "replace operation does not apply: doc is missing path: /items/10: missing value"
                  }
                }
              },
              "Remove Operation Path Not Found": {
                "value": {
                  "code": "json_patch_failed",
                  "message": "The entity metadata patch operation failed to apply",
                  "details": {
                    "operation": {
                      "index": 0,
                      "op": "remove",
                      "path": "/region"
                    },
                    "reason": "remove operation does not apply: doc is missing path: /region: missing value"
                  }
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      },
      "list-rails-response": {
        "description": "Rails retrieved.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "rails": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "rampType": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/order-type"
                              },
                              {
                                "description": "The ramp type the rail is listed for."
                              }
                            ]
                          }
                        },
                        "required": [
                          "rampType"
                        ]
                      },
                      {
                        "$ref": "#/components/schemas/rail"
                      }
                    ]
                  }
                }
              }
            },
            "examples": {
              "On-ramp Rails Retrieved": {
                "value": {
                  "rails": [
                    {
                      "rampType": "on-ramp",
                      "type": "crypto",
                      "network": "bitcoin",
                      "method": "crypto-transaction",
                      "asset": "BTC",
                      "decimals": 8,
                      "features": [
                        "withdraw"
                      ]
                    },
                    {
                      "rampType": "on-ramp",
                      "type": "card",
                      "network": "visa",
                      "method": "debit-card",
                      "asset": "USD",
                      "decimals": 2,
                      "features": [
                        "deposit"
                      ]
                    },
                    {
                      "rampType": "on-ramp",
                      "type": "apm",
                      "network": "paypal",
                      "method": "paypal",
                      "asset": "USD",
                      "decimals": 2,
                      "features": [
                        "deposit"
                      ]
                    }
                  ]
                }
              },
              "Off-ramp Rails Retrieved": {
                "value": {
                  "rails": [
                    {
                      "rampType": "off-ramp",
                      "type": "crypto",
                      "network": "bitcoin",
                      "method": "crypto-transaction",
                      "asset": "BTC",
                      "decimals": 8,
                      "features": [
                        "deposit"
                      ]
                    },
                    {
                      "rampType": "off-ramp",
                      "type": "card",
                      "network": "visa",
                      "method": "debit-card",
                      "asset": "USD",
                      "decimals": 2,
                      "features": [
                        "withdraw"
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "headers": {
          "x-uphold-request-id": {
            "description": "A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "Request ID": {
                "value": "a4e390583b3ac581-MRS"
              }
            }
          }
        }
      }
    },
    "requestBodies": {
      "create-order-request-body": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/create-order-request"
            },
            "examples": {
              "Create Order": {
                "value": {
                  "quoteId": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                  "metadata": {
                    "externalId": 123
                  }
                }
              },
              "Create Card Deposit Order": {
                "value": {
                  "quoteId": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
                  "params": {
                    "requirements": [
                      {
                        "name": "authorize:3ds",
                        "returnUrl": "https://example.com/redirect"
                      }
                    ]
                  },
                  "metadata": {
                    "externalId": 123
                  }
                }
              }
            }
          }
        }
      },
      "create-quote-request-body": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/create-quote-request"
            },
            "examples": {
              "On-ramp - 100 USD from an external account to XRP": {
                "value": {
                  "type": "on-ramp",
                  "origin": {
                    "type": "external-account",
                    "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017"
                  },
                  "destination": {
                    "type": "crypto-address",
                    "asset": "XRP",
                    "network": "xrp-ledger",
                    "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                    "reference": "67809592"
                  },
                  "denomination": {
                    "asset": "USD",
                    "amount": "100.00",
                    "target": "origin"
                  }
                }
              },
              "On-ramp - 100 USD from an external account to a crypto external account": {
                "value": {
                  "type": "on-ramp",
                  "origin": {
                    "type": "external-account",
                    "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017"
                  },
                  "destination": {
                    "type": "external-account",
                    "id": "5606d0a7-ff4d-ce4f-8675-dea65619122e"
                  },
                  "denomination": {
                    "asset": "USD",
                    "amount": "100.00",
                    "target": "origin"
                  }
                }
              },
              "On-ramp - 100 USD from an alternative payment method to XRP": {
                "value": {
                  "type": "on-ramp",
                  "origin": {
                    "type": "apm",
                    "method": "paypal"
                  },
                  "destination": {
                    "type": "crypto-address",
                    "asset": "XRP",
                    "network": "xrp-ledger",
                    "address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
                    "reference": "67809592"
                  },
                  "denomination": {
                    "asset": "USD",
                    "amount": "100.00",
                    "target": "origin"
                  }
                }
              },
              "Off-ramp - BTC to 100 USD in an external account": {
                "value": {
                  "type": "off-ramp",
                  "origin": {
                    "type": "crypto-address",
                    "asset": "BTC",
                    "network": "bitcoin"
                  },
                  "destination": {
                    "type": "external-account",
                    "id": "7dc5c846-5ac2-4853-b67f-005cb83d4017"
                  },
                  "denomination": {
                    "asset": "USD",
                    "amount": "100.00",
                    "target": "destination"
                  }
                }
              }
            }
          }
        }
      },
      "set-metadata-request-body": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/metadata"
            },
            "examples": {
              "Set Metadata": {
                "value": {
                  "externalId": 123
                }
              }
            }
          }
        }
      },
      "update-metadata-request-body": {
        "required": true,
        "content": {
          "application/json-patch+json": {
            "schema": {
              "$ref": "#/components/schemas/json-patch-operations"
            },
            "examples": {
              "Add Property": {
                "value": [
                  {
                    "op": "add",
                    "path": "/status",
                    "value": "active"
                  }
                ]
              },
              "Update Property": {
                "value": [
                  {
                    "op": "replace",
                    "path": "/tier",
                    "value": "gold"
                  }
                ]
              },
              "Remove Property": {
                "value": [
                  {
                    "op": "remove",
                    "path": "/region"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "headers": {
      "metadata-etag": {
        "description": "The entity metadata revision.",
        "schema": {
          "type": "string",
          "pattern": "^\"[A-Fa-f0-9]{64}\"$"
        },
        "examples": {
          "ETag": {
            "value": "\"9ff2666faa58fabfc282eb90016e7182fe785d37dcdb861c6469cccaec13c876\""
          }
        }
      }
    }
  }
}