{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-ucpupdate-checkout-session-request-schema.json",
  "title": "UCPUpdateCheckoutSessionRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-ucp-api-openapi.yml#/components/schemas/UCPUpdateCheckoutSessionRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "buyer": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "payment": {
      "type": "object",
      "properties": {
        "selected_instrument_id": {
          "type": "string"
        },
        "instruments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "handler_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "card",
                  "wallet",
                  "bank_account"
                ]
              },
              "brand": {
                "type": "string"
              },
              "last_digits": {
                "type": "string"
              },
              "rich_text_description": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "handler_id",
              "type"
            ],
            "additionalProperties": false
          }
        },
        "handlers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "config": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "api_version": {
                        "type": "number"
                      },
                      "api_version_minor": {
                        "type": "number"
                      },
                      "allowed_payment_methods": {
                        "type": "array"
                      },
                      "merchant_info": {
                        "type": "object",
                        "properties": {
                          "merchant_id": {
                            "type": "string"
                          },
                          "merchant_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "merchant_id",
                          "merchant_name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "api_version",
                      "api_version_minor",
                      "allowed_payment_methods",
                      "merchant_info"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "additionalProperties": {}
                  }
                ]
              }
            },
            "required": [
              "id",
              "name"
            ],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "fulfillment": {
      "type": "object",
      "properties": {
        "methods": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "selected_destination_id": {
                "type": "string"
              },
              "selected_option_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "shipping",
                  "pickup",
                  "digital"
                ]
              },
              "line_item_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "amount",
                    "title"
                  ],
                  "additionalProperties": false
                }
              },
              "destinations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "address_country": {
                      "type": "string"
                    },
                    "address_locality": {
                      "type": "string"
                    },
                    "address_region": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "postal_code": {
                      "type": "string"
                    },
                    "street_address": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type"
            ],
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    }
  }
}