{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-process-payment-response-schema.json",
  "title": "ProcessPaymentResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-payments-api-openapi.yml#/components/schemas/ProcessPaymentResponse",
  "type": "object",
  "properties": {
    "processPaymentId": {
      "type": "string",
      "description": "The unique identifier of the processed payment."
    },
    "paymentManagerArn": {
      "type": "string",
      "description": "The ARN of the payment manager."
    },
    "paymentSessionId": {
      "type": "string",
      "description": "The ID of the payment session used."
    },
    "paymentInstrumentId": {
      "type": "string",
      "description": "The ID of the payment instrument used."
    },
    "paymentType": {
      "type": "string",
      "enum": [
        "CRYPTO_X402",
        "MPP"
      ],
      "description": "The type of payment processed."
    },
    "status": {
      "type": "string",
      "enum": [
        "PROOF_GENERATED"
      ],
      "description": "The status of the payment."
    },
    "paymentOutput": {
      "$ref": "#/$defs/PaymentOutput"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the payment was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the payment was last updated."
    }
  },
  "required": [
    "processPaymentId",
    "paymentManagerArn",
    "paymentSessionId",
    "paymentInstrumentId",
    "paymentType",
    "status",
    "paymentOutput",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "CryptoX402PaymentOutput": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "The version of the X402 protocol."
        },
        "payload": {
          "type": "object",
          "description": "The X402 payment response payload."
        }
      },
      "required": [
        "version",
        "payload"
      ]
    },
    "MppPaymentOutput": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "description": "The MPP protocol version, for example \"1\" or \"2\"."
        },
        "selectedPaymentId": {
          "type": "string",
          "description": "The id of the challenge that was paid, echoed from the input challenge so you can correlate the result without decoding the credential."
        },
        "paymentCredential": {
          "type": "string",
          "description": "Ready-to-send value for the Authorization header, in the form \"Payment &lt;base64url-token&gt;\". Attach this header and retry the original request. To inspect the full credential, base64url-decode the token."
        }
      },
      "required": [
        "version",
        "selectedPaymentId",
        "paymentCredential"
      ]
    },
    "PaymentOutput": {
      "type": "object",
      "properties": {
        "cryptoX402": {
          "$ref": "#/$defs/CryptoX402PaymentOutput"
        },
        "mpp": {
          "$ref": "#/$defs/MppPaymentOutput"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}