salesking / sepa_king

Ruby gem for creating SEPA XML files
MIT License
150 stars 117 forks source link

Requested Date: Today should also be valid #18

Closed tobischo closed 8 years ago

tobischo commented 10 years ago

We are using sepa_king to generate SEPA Transfer files in order to tell our bank to transfer money to our customers. We noticed that it sets the requested_date for CreditTransfers to the date after creation as default

The default seems ok - however, it is also not possible to pass in today as a date.

Is there a particular reason that it has to be the next day and today is specifically not allowed? I couldn't find any documentation about it and our bank says setting the date to today is fine for them. (We generate the files in the morning and give them to the bank to execute some time during the day)

schorsch commented 10 years ago

Also talked to two german banks: Sparkasse, Commerzbank they can process credit transfers the same day. I'll push something in a branch

schorsch commented 10 years ago

Created a merge request, lets see if @ledermann knows about debit constraints. https://github.com/salesking/sepa_king/pull/19

ledermann commented 10 years ago

A DirectDebit can be requested at least one day before (COR1), for CreditTransfer seems to be no limit, so same day should be possible. Will check it out tomorrow in detail.

ledermann commented 10 years ago

I didn't find any information about the minimum ReqdExctnDt in the specification, so it seems to be allowed to request execution on the same day. I have merged the commit a5dcf0c2d6dcc5cb2f22db28aea10d2718c14a91 from @tobischo, because it makes a differences between CreditTransfer and DirectDebit.Remember: DirectDebit on the same day is not possible.

Strange: There are some discussions about using the magic date 1999-01-01 instead of the current date to force immediate execution: https://www.google.de/search?q=ReqdExctnDt+1999 Maybe this is required for submitting via HBCI/FinTS only...

tobischo commented 10 years ago

Well, I hadn't created a pull request yet because I wanted to see what you had to say about the requested_date for Debits.

Anyways, 1999-01-01 seems to be a bit of a random specification to me. The requirement for submitting via HBCI/FinTS may be correct - but I assume only the developers of programs like StarMoney actually stick to the specifications since the banks do not really seem to care...

To also stick to it the validation for CreditTransfers would have to be changed to accept dates in the future or 1999-01-01 but I don't really see the point if it is fine for the banks to execute it immediately with the current date.

phillipp commented 8 years ago

My bank doesn't accept the XML with ReqdExctnDt set to today (via HBCI) but is happy to accept the XML and executes the transfer on the same day when the ReqdExctnDt is set to 1999-01-1, so I would appreciate if this magic value could be set. Can we go forward with this?

If yes: should I add a pull request or would you like to add it?

ledermann commented 8 years ago

@phillipp: While not described in the specification, it seems that 1999-01-01 is allowed for CreditTransfers to define same day execution, so a PR would be nice.

phillipp commented 8 years ago

I could find it in the specs of the Bundesbank and ZK (Zentraler Kreditausschuss (https://www.bundesbank.de/Redaktion/DE/Downloads/Aufgaben/Unbarer_Zahlungsverkehr/verfahrensregeln_sepa_ueberweisungen_november_2014.pdf?__blob=publicationFile and https://www.hbci-zka.de/dokumente/aenderungen/V3.0/GV_SEPA_Uebertrag.pdf), both say that the field MUST be 1999-01-01.

The spec 2.2 of the Bundesbank says the the ReqdExctnDt should be used as "entweder mit dem Standardwert „1999-01-01“ oder dem Buchungstag des jeweiligen Einlieferungsfensters (für das 1. Einlieferungsfenster der aktuelle Geschäftstag und für das 2. Einlieferungsfenster der nächste Geschäftstag) zu belegen. "

As you normally don't want to calculate which window you are about to hit with your XML you would normally want the bank to execute the transfer "on sight" (Überweisung auf Sicht).

Another guide of the VR banking group (https://www.dkm.de/content/dam/webbankplus/downloads/checklisten-wissen/sepa-leitfaden-firmenkunden.pdf) says that all credit transfers with ReqdExctnDt "1999-01-01" are "bei Sicht fällige Überweisungen" (credits to be transferred on sight).

So I would actually want to propose the bold move to make 1999-01-01 the default. I can understand that this may break compatibility but I think the cance is very small as there are quite a lot of specs and documents that talk about that magic value from a lot of major and minor banks.

Would that be acceptable? I would then craft a pull request.

ledermann commented 8 years ago

@phillipp Thanks for you detailed proposal. I agree to make 1999-01-01 as default for <ReqdExctnDt> (for CreditTransfer, not DirectDebit). I'm looking forward to your Pull Request.

phillipp commented 8 years ago

Looks like merging #49 finished this too, right (because the default is now for the bank to execute the credit transfer ASAP)?

ledermann commented 8 years ago

Yes, I think so too.