First Payments
In the previous chapter you already made a request to Sugar Daddy to get money on your sandbox account and you made API calls to retrieve the balance on your accounts. If you have that implemented in your application you're already well on your way to manipulate the majority of objects in the bunq API. We highly recommend you take a look at API Reference to see all the endpoints we offer.
But before we let you go we have to get to the good stuff: making a payment. The reason we make it a separate topic is that we got quite some feedback that people get stuck on something called 'signing'.
What is signing and why does it matter
In short: if you use our API to make a payment you don't want a man-in-the-middle to be able to meddle with your request. If you made a payment for let's say €10, then you don't want anyone to hijack that request and make the payment €12. Signing prevents that from happening as we create a signature that allows the bunq backend to validate that the content of the request has not been tampered with. You can read much more about signing here Signing. In this tutorial we'll just show you how.
Making a Payment
The API call for making a payment is nothing special (except for the signing) so you can just make a call using the method described below.
Some points of attention:
The counterparty is a pointer towards a user bunq API Objects
You can construct your own using json
Signing
Now one of the things we need to do before we can actually make the API call is to generate a signature and add it to our `'X-Bunq-Client-Signature' in the header of the API call.
The specifics on how to do that are in Signing on that page you'll also find some coding examples. For instance in python Full signing.py
From there it's nothing different than a normal API call and you just post to the endpoint and will receive a ID of the generated payment.
Last updated
Was this helpful?