Open haimat opened 1 year ago
Might be not implemented, at least I haven't used it yet.
Seems so, I haven't found anything like <Strd>
in the code.
Just wondering - isn't that something, which is used very often?
🤷♂️ I have not noticed it in the wild yet, but I haven't specifically looked either
Interesting, at least here in Austria we use it a lot :-)
Did you close this on purpose? it might be a valid addition to the library (even though I unlikely have time for it)
I am not very good with XML, so I might not be of much help here. But after talking to our bank and testing it with various examples, I can at least describe how it should be. So with an unstructured reference, using the description
field for a payment in python-sepaxml, we end up with this:
<RmtInf>
<Ustrd>This is an unstructured reference</Ustrd>
</RmtInf>
And for a structured reference we instead need this:
<RmtInf>
<Strd>
<CdtrRefInf>
<Tp>
<CdOrPrtry>
<Cd>SCOR</Cd>
</CdOrPrtry>
</Tp>
<Ref>617094556122022</Ref>
</CdtrRefInf>
</Strd>
</RmtInf>
The <Cd>
is always this value of "SCOR", and the reference number should be in the <Ref>
element. If you just replace the former with the latter, everything works fine. Note, however, that you are not allowed to use both structured and unstructured references for the same payment by SEPA standard.
Hope this helps!
closed by accident
I developed a little soft based on your code that could generate a xml sepa file with the fields payment references sepaxml.com available in multi-language
In SEPA PAIN.001 standard there are two fields for payment references - structured (
<Strd>
) and unstructured (<Ustrd>
). Here inpython-sepaxml
one can use thedescription
field in the payment information for the latter. But how can I fill the structured reference?