{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nacelle/json-schema/nacelle-payment-update-schema.json",
  "title": "PaymentUpdate contains information about an order payment.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nacelle-payment-api-openapi.yml#/components/schemas/PaymentUpdate",
  "properties": {
    "card_brand": {
      "description": "Brand of the card used for payment",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "CardBrand"
    },
    "external_id": {
      "description": "External ID associated with the payment",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "ExternalID"
    },
    "id": {
      "description": "Unique identifier for the Payment.",
      "format": "uuid",
      "type": "string",
      "x-go-name": "ID"
    },
    "merchant_modified_at": {
      "description": "Merchant Specified Timestamp of the last modification to the Payment.",
      "format": "date-time",
      "type": "string",
      "x-go-name": "MerchantModifiedAt"
    },
    "payment_data": {
      "additionalProperties": {},
      "description": "Additional payment data as key-value pairs",
      "type": "object",
      "x-go-name": "PaymentData"
    },
    "payment_method_id": {
      "description": "ID of the payment method",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "PaymentMethodID"
    },
    "payment_type": {
      "description": "Type of payment, e.g., Credit Card",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "PaymentType"
    },
    "processor_name": {
      "description": "Name of the payment processor",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "ProcessorName"
    },
    "processor_status": {
      "description": "Status returned by the payment processor",
      "maximum": 100,
      "minimum": 1,
      "type": "string",
      "x-go-name": "ProcessorStatus"
    },
    "status": {
      "description": "Status of the payment",
      "enum": [
        "created",
        "pending",
        "succeeded",
        "failed",
        "requires_confirmation",
        "balance_due",
        "credit_owed"
      ],
      "type": "string",
      "x-go-name": "Status"
    },
    "transactions": {
      "description": "Transactions associated with the payment",
      "items": {
        "$ref": "#/$defs/Transaction"
      },
      "type": "array",
      "x-go-name": "Transactions"
    }
  },
  "required": [
    "id"
  ],
  "type": "object",
  "x-go-package": "github.com/getnacelle/noms/docs",
  "$defs": {
    "Transaction": {
      "properties": {
        "amount": {
          "description": "The Amount of the Transaction",
          "type": "string",
          "x-go-name": "Amount"
        },
        "error": {
          "description": "Error encountered during the Transaction",
          "type": "string",
          "x-go-name": "Error"
        },
        "id": {
          "description": "Unique identifier for the Transaction.",
          "format": "uuid",
          "type": "string",
          "x-go-name": "ID"
        },
        "metadata": {
          "additionalProperties": {},
          "description": "Metadata for the Transaction",
          "type": "object",
          "x-go-name": "Metadata"
        },
        "operation": {
          "description": "Operation of the Transaction",
          "enum": [
            "authorization",
            "authorization_release",
            "charge",
            "refund"
          ],
          "type": "string",
          "x-go-name": "Operation"
        },
        "status": {
          "description": "Status code for the Transaction.",
          "enum": [
            "pending",
            "succeeded",
            "failed"
          ],
          "type": "string",
          "x-go-name": "Status"
        }
      },
      "title": "Transaction contains information about an payments transactions.",
      "type": "object",
      "x-go-package": "github.com/getnacelle/noms/pkg/dto"
    }
  }
}