You can add Wero to your existing integration. The following instructions show only what you must add to your integration specifically for Wero.
If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.
Requirements
| Requirement | Description | |
|---|---|---|
| Integration type | Make sure that you have an existing API-only integration. | |
| Redirect handling | Make sure that your existing integration is set up to handle the redirect. action.type: redirect. |
|
| Setup steps | Before you begin, add Wero in your Customer Area. |
How it works
- The shopper selects Wero as the payment method.
- The shopper enters their details in the payment form that you build, if applicable.
- When you make the payment request, you include additional information about the items that the shopper intends to purchase.
- Your existing integration setup will handle the redirect.
Build your payment form
Include Wero in the list of available payment methods. You do not need to collect any additional information from the shopper in your payment form.
You can download the logo for Wero to use in your form.
Get Wero as an available payment method
When you make the /paymentMethods to get available payment methods, specify the following so that Wero is included in the response.
| Parameter | Values |
|---|---|
| countryCode | BE, DE, FR, NL |
| amount.currency | EUR |
Add additional parameters to your /payments request
You do not need to add any parameters when you make a payment.
Handle the redirect
-
To complete the payment, redirect the shopper to the
action.urlreturned in the /payments response, taking into account the following recommendations:-
When using the HTTP GET method:
For security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView. -
Redirection for mobile integrations:
For mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.
-
-
After the shopper is redirected back to your website, check the payment result by making a POST /payments/details request, specifying:
details: object that contains the URL-decodedredirectResultreturned when the shopper was redirected back to your site.
-
In the response note the following:
resultCode: use this to present the result to your shopper.pspReference: our unique identifier for the transaction.
Test and go live
From your checkout page, you are always redirected to a test payment page where you can simulate different Wero result codes.
- AUTHORIZED : Successful payment
- REFUSED : Refused payment
- CANCELLED : Cancelled payment
- ERROR : Technical failure
The test payment page redirects you back to your checkout page after selecting a result code.