Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

PaySafeCard Drop-in integration

Add PaySafeCard to your existing iOS Drop-in integration.

Our iOS Drop-in renders PaySafeCard in your payment form, and redirects the shopper to the PaySafeCard page to complete the payment.

When making an PaySafeCard payment, you additionally need to:

Before you begin

This page explains how to add PaySafeCard to your existing iOS Drop-in integration. The iOS Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.

Before starting your PaySafeCard integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payment form.
  2. Add PaySafeCard in your test Customer Area.

Show PaySafeCard in your payment form

  1. In your /paymentMethods request, specify:

  2. After the shopper selects PaySafeCard, Drop-in invokes the didSubmit method which contains data.paymentMethod. Pass data.paymentMethod to your server and make a payment request.

Make a payment

When the shopper proceeds to pay, Drop-in invokes the didSubmit method which contains data.paymentMethod.

  1. Pass data.paymentMethod to your server.
  2. From your server, make a /payments request, specifying:

    • paymentMethod: The data.paymentMethod from the didSubmit event from your client app.
    • shopperReference: Your reference to uniquely identify this shopper, for example user ID or account ID.
    curl \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "reference": "YOUR_ORDER_NUMBER",
      "paymentMethod": {
        "type": "paysafecard"
      "amount": {
        "currency": "EUR",
        "value": "1000"
      "shopperLocale": "de_DE",
      "countryCode": "DE",
      "shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
      "returnUrl": "my-app://"

    The /payments response contains an action object with the information needed to redirect the shopper.

    /payments response
  1. Pass the action object to your client app. Drop-in needs this to redirect the shopper to complete the payment.

Handle the redirect result

Drop-in redirects to complete the payment.  

  1. To inform Drop-in when the shopper returns to your app, implement the following in your UIApplicationDelegate:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -> Bool {
    RedirectComponent.applicationDidOpen(from: url)
    return true

After Drop-in completes the action, it invokes the didProvide method.

  1. From your server, make a POST /payments/details request providing the data from the didProvide method from your client app.

/payments/details request
  curl \
  -H "x-API-key: YOUR_X-API-KEY" \
  -H "content-type: application/json" \
  -d '{
       "details": {
         "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ=="

You receive a response containing:

  • resultCode: Use this to present the result to your shopper.
  • pspReference: Our unique identifier for the transaction.
    /payments/details response
       "resultCode": "Authorised",
       "pspReference": "FJM726V375BV9D82"

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.

See also