{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/assembly-payments/main/json-schema/assembly-payments-supplementary-data-schema.json",
  "title": "supplementaryData",
  "x-generated": "2026-10-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assembly-payments-supplementary-data-apis-api-openapi.yml#/components/schemas/supplementaryData",
  "allOf": [
    {
      "$ref": "#/$defs/base"
    },
    {
      "type": "object",
      "required": [
        "npp_details",
        "links"
      ],
      "properties": {
        "npp_details": {
          "type": "object",
          "$ref": "#/$defs/nppDetails"
        },
        "links": {
          "type": "object",
          "$ref": "#/$defs/links"
        }
      }
    }
  ],
  "$defs": {
    "base": {
      "type": "object",
      "required": [
        "id",
        "debtor_name",
        "debtor_bsb",
        "debtor_account",
        "creditor_account",
        "creditor_name",
        "remittance_information",
        "type",
        "type_method"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "debtor_name": {
          "type": "string"
        },
        "debtor_bsb": {
          "type": "string"
        },
        "debtor_account": {
          "type": "string"
        },
        "creditor_account": {
          "type": "string"
        },
        "creditor_name": {
          "type": "string"
        },
        "remittance_information": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "type_method": {
          "type": "string"
        }
      }
    },
    "links": {
      "type": "object",
      "required": [
        "self",
        "users",
        "wallet_accounts",
        "virtual_accounts",
        "marketplaces",
        "transactions"
      ],
      "properties": {
        "self": {
          "type": "string"
        },
        "users": {
          "type": "string"
        },
        "wallet_accounts": {
          "type": "string"
        },
        "marketplaces": {
          "type": "string"
        },
        "transactions": {
          "type": "string"
        },
        "agreements": {
          "type": "string",
          "description": "Only available for PayTo Payments!"
        }
      }
    },
    "nppDetails": {
      "description": "Details for the NPP payment. `npp_details` will only be present when `type_method` is `npp_payin`",
      "type": "object",
      "required": [
        "pay_id",
        "pay_id_type",
        "clearing_system_transaction_id",
        "end_to_end_id",
        "npp_payin_internal_id",
        "cdtr_ref_inf",
        "ultm_cdtr_id",
        "ultmt_cdtr_schme_nm",
        "ctgy_purp",
        "debtor_legal_name"
      ],
      "properties": {
        "pay_id": {
          "type": "string"
        },
        "pay_id_type": {
          "type": "string"
        },
        "clearing_system_transaction_id": {
          "type": "string"
        },
        "end_to_end_id": {
          "type": "string"
        },
        "cdtr_ref_inf": {
          "type": "string"
        },
        "ultm_cdtr_id": {
          "type": "string"
        },
        "ultmt_cdtr_schme_nm": {
          "type": "string"
        },
        "ultm_cdtr_nm": {
          "type": "string",
          "minLength": 0,
          "maxLength": 140
        },
        "ctgy_purp": {
          "type": "string"
        },
        "debtor_legal_name": {
          "type": "string"
        },
        "instruction_id": {
          "type": "string",
          "maxLength": 35,
          "minLength": 1,
          "description": "Unique identifier for the payment request generated as per NPPA guidelines. Only available for PayTo Payments"
        },
        "agreement_id": {
          "type": "string",
          "description": "Unique agreement identifier generated by NPPA. Only available for PayTo Payments"
        },
        "agreement_uuid": {
          "type": "string",
          "description": "Unique agreement identifier generated by Zai. Only available for PayTo Payments",
          "format": "uuid"
        }
      }
    }
  }
}