Skip to main content

SEPA

Use the SEPA (Single Euro Payments Area) tool's XML File Generator function to convert JSON into XML for SEPA payment data. The function returns the XML as text and as a Base64-encoded string.

The generator creates an XML document from the structure you supply. It does not submit payments, save a file, or check that the document meets a bank's payment requirements.

Before you start​

  • Open a project where SEPA is available in Apps and in the flow designer's Tools palette.
  • Make sure you have access to configure apps and edit the flow. Testing an individual App requires access to that action. See Roles and restrictions.
  • Set up your Data Schema and a nonempty example data record before testing an individual App. See Variables.
  • Prepare the payment structure required by the receiving bank. The generator supplies a Document root with the namespace urn:iso:std:iso:20022:tech:xsd:pain.001.001.03; there is no format-version selector.

For general parameter defaults and visibility settings, see Tools.

Configure XML File Generator​

  1. In your project, open Apps and open SEPA.
  2. In Setup, select XML File Generator and open Parameters.
  3. Under General, enter the payload in JSON. The field's help text is Place here the JSON payload to convert it to XML.
  4. Select Save and Test.
  5. In Response data, inspect Response body. Check that status is OK, error is empty, and xml contains the expected elements and values.
  6. Close the test window and complete the configuration wizard.

JSON is required and has no preset payment template. If the tool's settings hide the field in the flow, configure its value in the tool's Parameters step.

Prepare the JSON structure​

Use a nonempty JSON object whose keys match the XML elements you need. Supply the children of Document; do not add another Document wrapper to your JSON.

JSON contentXML result
A key with a text value, such as "MsgId": "DEMO-001"An element containing that text: <MsgId>DEMO-001</MsgId>.
A nested objectNested XML elements.
An array of objects under an element nameRepeated elements with that name, in array order.
_attributes inside an objectAttributes on that object's element.
_value inside an objectText inside that object's element. Use a JSON string for this value.

For example, this JSON produces an amount with a currency attribute:

{
"InstdAmt": {
"_attributes": { "Ccy": "EUR" },
"_value": "10.00"
}
}

The corresponding element is:

<InstdAmt Ccy="EUR">10.00</InstdAmt>

Keep element names and their order consistent with the required payment structure. Spaces in element names become underscores; the generator does not correct names to match a payment schema. Supply amounts and identifiers as strings when their exact formatting matters.

You can use variables in JSON. Make sure the payload remains valid JSON after Flowize replaces them with their values.

Worked conversion example​

This example demonstrates nesting, repeated transactions, and amount attributes. It is an incomplete payment document for testing the conversion, not a file to submit to a bank. It omits payment details such as accounts, parties, and execution dates.

Enter this payload in JSON:

{
"CstmrCdtTrfInitn": {
"GrpHdr": {
"MsgId": "DEMO-001",
"NbOfTxs": "2",
"CtrlSum": "30.00"
},
"PmtInf": {
"PmtInfId": "DEMO-PAYMENTS",
"PmtMtd": "TRF",
"CdtTrfTxInf": [
{
"PmtId": { "EndToEndId": "DEMO-1" },
"Amt": {
"InstdAmt": {
"_attributes": { "Ccy": "EUR" },
"_value": "10.00"
}
}
},
{
"PmtId": { "EndToEndId": "DEMO-2" },
"Amt": {
"InstdAmt": {
"_attributes": { "Ccy": "EUR" },
"_value": "20.00"
}
}
}
]
}
}
}

On successful conversion, xml contains the following structure. Line breaks and indentation are added here for readability:

<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CstmrCdtTrfInitn>
<GrpHdr>
<MsgId>DEMO-001</MsgId>
<NbOfTxs>2</NbOfTxs>
<CtrlSum>30.00</CtrlSum>
</GrpHdr>
<PmtInf>
<PmtInfId>DEMO-PAYMENTS</PmtInfId>
<PmtMtd>TRF</PmtMtd>
<CdtTrfTxInf>
<PmtId><EndToEndId>DEMO-1</EndToEndId></PmtId>
<Amt><InstdAmt Ccy="EUR">10.00</InstdAmt></Amt>
</CdtTrfTxInf>
<CdtTrfTxInf>
<PmtId><EndToEndId>DEMO-2</EndToEndId></PmtId>
<Amt><InstdAmt Ccy="EUR">20.00</InstdAmt></Amt>
</CdtTrfTxInf>
</PmtInf>
</CstmrCdtTrfInitn>
</Document>

The generator copies NbOfTxs and CtrlSum from the input. It does not calculate them or check them against the transactions.

Use the response in a flow​

  1. Open a Draft flow that you can edit.
  2. Find SEPA in the Tools palette and add XML File Generator to the canvas. Connect it to the relevant steps. See Create a flow.
  3. Open the object and review JSON in Parameters, if the field is shown. Select Test and inspect Response body.
  4. Return to the object's settings and open Incoming response.
  5. Copy the variable under Where it is saved for the response field you need. To store a field in the data record, enter its data-variable destination under Saved to Data Schema.
  6. Select Apply, then save and test the flow.

Copy the variables shown for your object rather than assuming a fixed variable path.

The response contains these fields:

FieldOn successOn failure
statusOKNOK
xmlXML text, with an XML 1.0 declaration and UTF-8 encoding.Empty string.
xml_base64A Base64 encoding of the same XML text.Empty string.
errorEmpty string.An explanation of the conversion failure.

Use xml when a later step expects XML text, or xml_base64 when it expects Base64 content. Neither field is a saved-file path. Check status before using either value.

Validation and errors​

Message or resultWhat to check
JSON input is malformedCheck JSON syntax and variable values. An empty object ({}), empty array ([]), or null also produces this error. Supply a nonempty object with the intended XML structure.
Invalid Character ErrorCheck element and attribute names. A nonempty top-level array also causes this error; place repeated items in an array under their element name inside an object.
Your example data record is empty. Please create one to test the object.Add example data to the project's Data Schema before testing the App. If no schema exists, the test prompts you to set one up.
status is NOK with another error valueRead the error, correct the input, and test again. Do not use the empty XML fields as a successful result.
status is OK, but the document does not meet the receiving bank's requirementsReview the complete payment structure, required values, element order, and accepted format with the receiving bank. Successful conversion does not validate a payment schema.

A successful conversion reports HTTP code 200. On failure, inspect status and error in Response body as well as the displayed code.

Was this article helpful?