
https://checkout.rocka.live/buffet?...) which will send the customer directly to their bank’s payment form.
There are two ways to integrate direct payments. You can implement either of these or both:
- Add bank buttons to your site. You can decide which banks you want to offer and add their buttons to the checkout page. Your customer will be redirected straight to their bank app or website.
- Add a button for a bank your customer has already paid through. For returning customers that have already paid through Rocka, you can add a button that will automatically offer their most recent payment method.
Set up a custom bank layout
Step 1. Complete your onboarding
Complete your onboarding in Rocka Hub and get your API keys. For more details, see Get your API key and Authorisation.
Step 2. Get the data
Collect all the required data, some of which might be from your customer. At the very least, you will need to provide the payment
amount and currency, as well as your customer’s country (for personalised checkout).Step 3. Retrieve major banks in your customer's country
Use the
GET /providers/top endpoint to retrieve a list of the major banks in your customer’s country. You will need to provide the ISO 3166 code of the country and optionally, the number of banks you want to retrieve. You will get a list of banks with all the required metadata, including each bank’s id and logoUrl. Sample request and response retrieving the list of France’s top banks:Sample request
Sample request
Sample response
Sample response
Step 4. Add payment buttons
You can use either the bank logos returned by
GET /providers/top or your own custom assets. Step 5. Initiate payments
Design a payment form on your site (using either Rocka’s buttons or your own layout).
- To initiate a payment, you will need to pass the bank’s
providerId(which was returned asidby theGET /providers/topmethod). You can also include the customer’s IBAN to streamline the checkout process for them. If you don’t include the IBAN, most providers will ask the customer for it on the payment form. - For returning customers, include their
customerIdoremail. Rocka will preselect their bank automatically.
customerId or email parameters is required. Sample request and response generating a new payment through La Banque Postale:Sample request
Sample request
Sample response
Sample response
Retrieve payment status
When creating the payment, you can specify thereturnUrl the customer will be redirected to once the payment is completed or the webhookUrl for payment status updates: