{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/woolworths-group/json-schema/woolworths-group-cnp-capture-response-schema.json",
  "title": "CnpCaptureResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woolworths-group-capture-api-openapi.yml#/components/schemas/CnpCaptureResponse",
  "required": [
    "browserViewLink",
    "capture",
    "permittedActionHints",
    "reconciliationId",
    "transactionId"
  ],
  "type": "object",
  "properties": {
    "transactionId": {
      "type": "string",
      "description": "The unique identifier of the transaction passed during the authorization request"
    },
    "reconciliationId": {
      "type": "string",
      "description": "Reconciliation id passed during the authorization request"
    },
    "permittedActionHints": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PermittedTransactionOperationHint"
      },
      "description": "Provides hints of permitted actions based on the state of the transaction"
    },
    "browserViewLink": {
      "type": [
        "string",
        "null"
      ],
      "description": "A direct link for viewing the transaction in the Cards Connect Portal for end-users."
    },
    "capture": {
      "$ref": "#/$defs/CaptureResponse"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CaptureResponse": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of the capture operation, as passed during the capture request."
        },
        "amount": {
          "type": "integer",
          "description": "Amount of the capture operation in cents as it was provided in the request.",
          "format": "int32"
        },
        "outcome": {
          "$ref": "#/$defs/TransactionOutcome"
        },
        "responseCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null for capture operation."
        },
        "responseDescription": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null for capture operation."
        },
        "createdAt": {
          "type": "string",
          "description": "Date and time when this capture was created in our system.",
          "format": "date-time"
        },
        "schemeExtendedResponseData": {
          "$ref": "#/$defs/SchemeExtendedResponseData"
        }
      },
      "additionalProperties": false
    },
    "PermittedTransactionOperationHint": {
      "enum": [
        "Capture",
        "Void",
        "Refund"
      ],
      "type": "string",
      "description": "Hints for transaction operation permitted for the given transaction state "
    },
    "SchemeExtendedResponseData": {
      "type": "object",
      "properties": {
        "mastercardTransactionLinkId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Mastercard Transaction Link Identifier (TLID) used by Mastercard to link different events in the lifecycle of a transaction."
        }
      },
      "additionalProperties": false
    },
    "TransactionOutcome": {
      "enum": [
        "Accepted",
        "InProgress",
        "InProgressDelayed",
        "Succeeded",
        "Declined",
        "BusyFailing",
        "BusyFailingDelayed",
        "Failed",
        "Ruined"
      ],
      "type": "string"
    }
  }
}