Search

Are you looking for test card numbers?

Would you like to contact support?

Dotpay for iOS

Learn how to add Dotpay to an existing iOS Drop-in or Components integration.

Drop-in integration

Our iOS Drop-in solution supports Dotpay online banking payments without any additional configuration. To know whether a payment is successful, you need to set up notifications.

Components integration

To complete a Dotpay online banking payment on your iOS app, you can use the following iOS Components:

  • Dotpay Component: Presents the list of issuers (banks) and collects the issuer that the shopper selected.
  • Redirect Component: Redirects the shopper to the issuer's website or to another app.

It is also possible to handle one or both of these steps on your own, without using the Component. In that case, you'd follow the corresponding steps for adding Dotpay to an API-only integration.

The steps for integrating iOS Components are similar for all supported payment methods, as described on the iOS Components integration page. Below you will find links to these general steps, and for each step the details that are specific for adding Dotpay to your existing iOS Components integration.

Step 1: Get available payment methods

  1. Refer to the general instructions for step 1.

  2. For Dotpay, use the following specifics:

    • When you make a POST request to the /paymentMethods endpoint, specify:

      • countryCode: PL.
      • amount.currency: PLN.

      The response should now include type: dotpay.

Step 2: Initialize Components

  1. Refer to the general instructions for step 2.

  2. For Dotpay, use the following specifics:

    • When you decode the /paymentMethods response, find the IssuerListPaymentMethod with type dotpay.

    • To initialize the Dotpay Component, use the following example.

      let dotpayComponent = DotpayComponent(paymentMethod: dotpayPaymentMethod)
      dotpayComponent.delegate = self
      dotpayComponent.environment = .test
      present(dotpayComponent.viewController, animated: true)

      When you're ready to go live, change the environment to live or to other environment values described in the class reference.

Step 3: Make a payment

  1. Refer to the general instructions for step 3.

  2. For Dotpay, use the following specifics:

    • In the POST request to the /payments endpoint specify:

      • data.paymentMethod
      • The returnUrl to your website or app where the shopper should be taken back to after the redirect.
    • In the /payments response, note the following:

      • resultCode: RedirectShopper and action.redirect: Indicate you need to redirect the shopper to the issuer's website or app to complete the payment.
      • action.url: Redirect URL to the website or app of the shopper's bank. You need to specify this URL in the next step.
      • paymentData: Keep a copy, because you will submit it later.

Step 4: Perform additional actions on your client app

  1. Refer to the general instructions for step 4.

  2. For Dotpay, use the following specifics:

Step 5: Submit additional payment details

  1. Refer to the general instructions for step 5.

  2. For Dotpay, use the following specifics:

    • When you make a POST request to the /payments/details endpoint, provide the payment details:

      • If you used the Redirect Component, pass the data.details from the didProvide method from your client app.
      • If you handled the redirect on your own, pass the paymentData object you received in the /payments response, and pass details.payload containing the URL decoded payload that was appended to the return URL. Refer to [step 6 of adding Dotpay to an API-only integration]((/payment-methods/dotpay/dotpay-api-only#step-6-submit-additional-details).

Step 6: Present the payment result

If you do not receive an action object from your last API request, this means that the payment has been completed.
Refer to Dotpay result codes to see what resultCode values you can receive for Dotpay and how you can communicate the result to the shopper.

Dotpay result codes

Dotpay is a redirect payment flow. At the end of this flow, we send you a response with a resultCode to inform you of the current state of the payment.

The resultCode values you can receive for Dotpay are:

  • Authorised: The payment was authorised. You will receive the funds in 2-3 days. Inform the shopper that the payment was successful.
  • Cancelled: The shopper cancelled the payment before it was completed, for example while on their bank's website or app. Ask the shopper whether they want to continue with the order, or request that they select a different payment method.
  • Refused: The payment was refused by the shopper's bank. Ask the shopper to try the payment again using a different payment method or card.
  • Pending: The shopper has completed the payment but the final result is not yet known. It may take minutes or hours to confirm this. Inform the shopper that you've received their order, and are waiting for the payment to be completed.

To find out more about result codes and how you can action them, see Result codes.

Dotpay notifications

Our notifications are webhooks informing you of important events related to your account. Accepting notifications is required for Dotpay online banking. In most cases, the resultCode you receive at the end of the redirect payment flow already indicates whether the payment was authorised. In other cases, we can only inform you of the outcome of a payment by means of a notification. You'll need to rely on notifications when:

  • The resultCode is Pending or Received.
  • You didn't receive a resultCode, for example because the shopper failed to return to your website or app after completing the payment.
  • The shopper cancelled the payment while on their bank's website or app, but we didn't receive this information. This happens sometimes with Dotpay.

To inform you of the outcome of a payment, we send you a notification with:

  • eventCode: AUTHORISATION.
  • pspReference: Adyen's unique reference associated with the payment request.
  • success: Indicates the outcome of the payment. Possible values:

    • true: The payment was authorised.
    • false: The payment failed.

AUTHORISATION is just one of the events that trigger a notification. Refer to Notification webhooks to accept notifications and learn about their structure and content.

Testing Dotpay payments

Before accepting live Dotpay online banking payments, test your integration using test.adyen.com endpoints. You won't need specific test credentials to do test payments.

Check the status of the test payments in your Customer Area > Transactions > Payments.

See also