Pay By Bank#
In order to request a Pay By Bank, we'll need to initiate a payment_request. In this instance, we are going to set the currency to GBP and will need to link the Billing Request with Actions to the creditor we wish to pay out to, CR123.
The required actions of the Billing Request will be different from those of a mandate_request.
In order to generate the payment request url for the customer, we will also need to provide the institution as well as a bank_authorisation_redirect_uri. Setting the create_bank_authorisation to true allows us to retrieve the redirect url in the API response.
The list of available institution IDs can be obtained from the Institutions API.
We will now be able to grab the url parameter and send it to our customer.
- In a mobile-to-mobile flow we'd ideally use a call-to-action so that the customer is immediately redirected to this link after they clicked on a button.
- In a desktop-to-mobile flow, we could use the
qr_code_urlinstead. This will allow the customer to scan the qr code on your website using their mobile device in order to then authorise the Pay By Bank request via their banking app.
Listening to the bank_authorisation_authorised webhook allows us to make sure that the customer has approved the payment request.
Listening to the payment_confirmed webhook notifies us that the payment has been successfully collected.
Once the customer has approved the payment request and the funds were collected from their bank account, the status of the Billing Request will then move from pending to fulfilled.