Generate pacs XML from records
generate_messageProduce a validated ISO 20022 pacs XML string from payment records stored in memory. No files are created; returns the XML directly.
Instructions
Generate a validated ISO 20022 pacs XML message from in-memory records.
This is the primary generation tool: pass payment records you already hold
in memory and receive an XSD-validated XML document; no file is written.
Run ``validate_records`` first to surface record-level errors, and
``list_message_types`` to confirm the ``message_type`` string.
Returns the validated XML document as a string, or an ``{"error": ...}``
payload (serialized) if generation fails.
Args:
message_type: A supported ISO 20022 pacs message type.
records: One or more flat payment records.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | One or more flat payment records, each a dict of field name -> value, from which the pacs XML is generated; run validate_records first to surface record-level errors. | |
| message_type | Yes | A supported ISO 20022 pacs message type, e.g. 'pacs.008.001.08' FI-to-FI Customer Credit Transfer. Must be exactly one of: 'pacs.002.001.12', 'pacs.003.001.09', 'pacs.004.001.11', 'pacs.007.001.11', 'pacs.008.001.01', 'pacs.008.001.02', 'pacs.008.001.03', 'pacs.008.001.04', 'pacs.008.001.05', 'pacs.008.001.06', 'pacs.008.001.07', 'pacs.008.001.08', 'pacs.008.001.09', 'pacs.008.001.10', 'pacs.008.001.11', 'pacs.008.001.12', 'pacs.008.001.13', 'pacs.009.001.10', 'pacs.010.001.05', 'pacs.028.001.05' (see list_message_types). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |