You can add PaySafeCard to your existing integration. The following instructions show only what you must add to your integration specifically for PaySafeCard.
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 PaySafeCard in your Customer Area. |
How it works
- The shopper selects PaySafeCard as the payment method.
- The shopper enters their details in the payment form that you build.
- 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 PaySafeCard in the list of available payment methods. You do not need to collect any information from the shopper in your payment form.
You can download the logo for PaySafeCard to use in your form.
Get PaySafeCard as an available payment method
When you make the /paymentMethods to get available payment methods, specify the following so that PaySafeCard is included in the response.
| Parameter | Values |
|---|---|
| countryCode | AE, AT, AU, BE, BR, CA, HR, CY, CZ, DK, FI, FR, DE, GE, GB, GIB, HU, IS, IT, IE, LV, LT, LU, LI, MT, MX, MD, ME, NL, NZ, NO, PY, PE, PL, PT, RO, SRB, SK, SI, ES, SE, CH, TR, UY, US |
| amount.currency | AED, AUD, BRL, CAD, CHF, CZK, DKK, EUR, GBP, HUF, ISK, MXN, NOK, NZD, PEN, PLN, RON, RSD, SEK, TRY, USD, UYU, GEL, GIP, MDL, PYG |
Add additional parameters to your /payments request
When you make a payment, add the following parameters:
| Parameter | Required | Description |
|---|---|---|
| shopperReference | ![]() |
Your reference to uniquely identify this shopper, for example user ID or account ID. |
The response includes action.type: redirect.
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
Before you go live, test your integration using the following credentials:
- 16-digit code: 0000 0000 0990 3417
Check the status of test payments in your Customer Area > Transactions > Payments.
Before you can accept live payments, contact our Support Team to add PaySafeCard in your live Customer Area.
