Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the structured reference field for a SEPA payment? #52

Open
haimat opened this issue Dec 22, 2022 · 8 comments
Open

How to use the structured reference field for a SEPA payment? #52

haimat opened this issue Dec 22, 2022 · 8 comments

Comments

@haimat
Copy link

haimat commented Dec 22, 2022

In SEPA PAIN.001 standard there are two fields for payment references - structured (<Strd>) and unstructured (<Ustrd>). Here in python-sepaxml one can use the description field in the payment information for the latter. But how can I fill the structured reference?

@raphaelm
Copy link
Owner

Might be not implemented, at least I haven't used it yet.

@haimat
Copy link
Author

haimat commented Dec 22, 2022

Seems so, I haven't found anything like <Strd> in the code.
Just wondering - isn't that something, which is used very often?

@raphaelm
Copy link
Owner

🤷‍♂️ I have not noticed it in the wild yet, but I haven't specifically looked either

@haimat
Copy link
Author

haimat commented Dec 22, 2022

Interesting, at least here in Austria we use it a lot :-)

@haimat haimat closed this as completed Dec 22, 2022
@raphaelm
Copy link
Owner

Did you close this on purpose? it might be a valid addition to the library (even though I unlikely have time for it)

@haimat haimat reopened this Dec 23, 2022
@haimat
Copy link
Author

haimat commented Dec 23, 2022

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!

@raphaelm raphaelm reopened this Apr 8, 2023
@raphaelm
Copy link
Owner

raphaelm commented Apr 8, 2023

closed by accident

@BenjoNX
Copy link

BenjoNX commented Oct 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants