{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/synci-io/json-schema/synci-io-create-transaction-request-schema.json",
  "title": "CreateTransactionRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/synci-io-openapi.yml#/components/schemas/CreateTransactionRequest",
  "type": "object",
  "properties": {
    "financial_account_id": {
      "type": "integer",
      "description": "The ID of the financial account this transaction belongs to."
    },
    "amount": {
      "type": "number",
      "description": "The amount of the transaction as billed to the account."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "minLength": 3,
      "maxLength": 3
    },
    "booking_date": {
      "type": "string",
      "format": "date-time",
      "description": "The date when an entry is posted to an account on the financial institutions books. **Booking date is required if value date is not provided.**"
    },
    "booking_datetime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time when an entry is posted to an account on the financial institutions books."
    },
    "value_date": {
      "type": "string",
      "format": "date-time",
      "description": "The date at which assets become available to the account owner in case of a credit. **Value date is required if booking date is not provided.**"
    },
    "value_datetime": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time at which assets become available to the account owner in case of a credit."
    },
    "booked": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the transaction is booked (cleared) or not. If false, the transaction is pending."
    },
    "debtor": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the debtor if a \"Credited\" transaction."
        },
        "bban": {
          "type": [
            "string",
            "null"
          ]
        },
        "iban": {
          "type": [
            "string",
            "null"
          ]
        },
        "pan": {
          "type": [
            "string",
            "null"
          ]
        },
        "masked_pan": {
          "type": [
            "string",
            "null"
          ]
        },
        "msisdn": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "agent": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "creditor": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the creditor if a \"Debited\" transaction."
        },
        "bban": {
          "type": [
            "string",
            "null"
          ]
        },
        "iban": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Identification of creditor, e.g. a SEPA Creditor ID."
        },
        "pan": {
          "type": [
            "string",
            "null"
          ]
        },
        "masked_pan": {
          "type": [
            "string",
            "null"
          ]
        },
        "msisdn": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "agent": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "ultimate_debtor": {
      "type": [
        "string",
        "null"
      ]
    },
    "ultimate_creditor": {
      "type": [
        "string",
        "null"
      ]
    },
    "remittance_information": {
      "type": "object",
      "properties": {
        "structured": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference as contained in the structured remittance reference structure."
        },
        "structured_array": {
          "type": [
            "array",
            "null"
          ],
          "description": "Array of reference as contained in the structured remittance reference structure.",
          "items": {
            "type": "string"
          }
        },
        "unstructured": {
          "type": [
            "string",
            "null"
          ]
        },
        "unstructured_array": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      }
    },
    "additional_data_structured": {
      "type": [
        "string",
        "null"
      ],
      "description": "An umbrella datapoint used for information that is outside of Berlin Group specification, such as bank- or country-specific fields."
    },
    "additional_information": {
      "type": [
        "string",
        "null"
      ],
      "description": "Might be used by the financial institution to transport additional transaction related information."
    },
    "additional_information_structured": {
      "type": [
        "string",
        "null"
      ]
    },
    "balance_after_transaction": {
      "type": [
        "number",
        "null"
      ],
      "description": "The account balance after this transaction. Recommended balance type is INTERIM_BOOKED."
    },
    "codes": {
      "type": "object",
      "properties": {
        "bank_transaction_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Institution transaction code as used by the financial institution and using the sub elements of this structured code defined by ISO20022. For standing order reports the following codes are applicable: \"PMNT-ICDT-STDO\" for credit transfers, \"PMNT-IRCT-STDO\" for instant credit transfers, \"PMNT-ICDT-XBST\" for cross-border credit transfers, \"PMNT-IRCT-XBST\" for cross-border real time credit transfers, \"PMNT-MCOP-OTHR\" for specific standing orders which have a dynamical amount to move left funds e.g. on month end to a saving account."
        },
        "merchant_category_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Merchant category code as defined by card issuer."
        },
        "proprietary_bank_transaction_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Proprietary bank transaction code as used within a community or within a financial institution."
        },
        "purpose_code": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "currency_exchange": {
      "type": "object",
      "properties": {
        "source_currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "exchange_rate": {
          "type": [
            "number",
            "null"
          ]
        },
        "unit_currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "target_currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "quotation_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "contract_identification": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "external_identifiers": {
      "type": "object",
      "properties": {
        "integrator_transaction_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Transaction identifier given by the bank integrator."
        },
        "institution_transaction_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Transaction identifier provided by the bank/financial institution."
        },
        "end_to_end_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique end to end ID."
        },
        "entry_reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identification of the transaction as used for reference given by the financial institution."
        },
        "check_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Identification of a cheque."
        },
        "mandate_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Identification of mandates, e.g. a SEPA Mandate ID."
        }
      }
    }
  },
  "required": [
    "financial_account_id",
    "amount",
    "currency"
  ]
}