After creating a callback request as explained here:
https://doc.bunq.com/#/notification-filter-url

I notice that for mutations Bunq calls my endpoint and sends json as the raw body of its request.

The json array has one top level key "NotificationUrl" inside which there is an "object" array with one key "Payment".

Is this "Payment" key always available for all types of payments:
(paying a Request, iDEAL, Sofort or Invoice) or are there other keys for these payment types?

    7 days later

    Hi Bastiaan,
    Thanks for the reply.
    In the section about callbacks it says that Bunq has a "retry mechanism" and that a callback will fail if "the response contains an error".
    What is required in the response for the callback not to fail?

      @Nigel-Purple-Penguin#199222 I’m always returning response code 200, with the text “OK”.

      But I think it also works with an empty page 🙂

        HI Bastiaan,
        Thanks for the quick reply but in sandbox mode it keeps retrying. Tried adding "X-Bunq-Client-Authentication" header and then also Content-type application/json but no luck unfortunately. As well as Cache-Control: no-cache & User-Agent:

          @Nigel-Purple-Penguin#199244 So you receive the callback POST 6 times per transaction?

            Yes, I receive the callback 6 times at 60 second intervals.

              Hi Bastiaan,
              Yes. So that helped solve it. Turns out that the problem was the 3 second timeout on bunq server side.

              Switched to my (faster) home computer, upped the ram in the docker container and changed my script so that it sent an immediate response before doing any processing. These changes got the response time to less than a second. Now only receiving one post from Bunq and no retry.

              Thanks for you help.

                7 months later
                Write a Reply...