Search

Are you looking for test card numbers?

Would you like to contact support?

Dotpay for Web

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

Drop-in integration

Our Web 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

The steps for integrating Web Components are similar for all supported payment methods, as described on the Web 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 Web Components integration.

Step 1: Get available payment methods

  1. Refer to the general instructions for step 1.

  2. For the Dotpay Web Component use the following specifics:

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

      • countryCode: PL.
      • amount.currency: PLN.
    • From the response, store the object with type: dotpay. For example, store it as dotpayData.

Step 2: Add Components to your payments form

  1. Refer to the general instructions for step 2.

  2. For the Dotpay Web Component use the following specifics:

    • When you add Components for the payment methods you want to accept, create a DOM element for Dotpay, placing it where you want the form to be rendered:

      <div id=”dotpay”></div>
    • When you create an instance of the Dotpay Component and mount it, specify:

      • dotpayData.details: The contents of the details array of the object that you stored in the previous step. Alternatively, you can pass the entire paymentMethodsResponse object in AdyenCheckout.
      
      const dotpay = checkout.create("dotpay", {
       details: dotpayData.details
       // If you pass the full paymentMethodsResponse in the AdyenCheckout configuration,
       // then you don't need to pass the details separately per Component
      }).mount("#dotpay");
    • Optionally change how the Dotpay Component renders in your payment form. You can configure whether to display a list of bank logos on your payments form, and whether to preselect a specific bank:

      • showImage: To remove the bank logos from the Dotpay form, set this to false.
      • issuer: To preselect an issuer, set this to the id of the issuer.
      const dotpay = checkout.create("dotpay", {
       details: dotpayData.details,
       showImage: false,
       issuer: "73"
      }).mount("#dotpay");
    • Either define an onChange event on the Dotpay Component level, or use this function on the core AdyenCheckout instance.

Step 3: Make a payment

  1. Refer to the general instructions for step 3.

  2. For the Dotpay Web Component use the following specifics:

    • Because this is a redirect payment flow, in the POST request to the /payments endpoint specify 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.
      • paymentData: Keep a copy, because you will submit it later.
      • action.url from API v49 or redirect.url earlier versions: Redirect URL to the website or app of the shopper's bank. You need to specify this URL in the next step.

Step 4: Perform additional front-end actions

  1. Refer to the general instructions for step 4.

  2. For the Dotpay Web Component use the following specifics:

    • Using the URL specified at action.url from API v49 or redirect.url earlier versions, redirect the shopper to their bank's website or app.

    • When the shopper has completed the payment and returns to your website or app, the returnURL is appended with a URL-encoded payload query parameter which you will need in the next step. If any other parameters are appended, ignore them.

Step 5: Submit additional payment details

  1. Refer to the general instructions for step 5.

  2. For the Dotpay Web Component use the following specifics:

    • URL decode the payload.

    • Make a POST request to the /payments/details endpoint, specifying:

      • paymentData: The object you received in the /payments response.
      • details.payload: The URL decoded payload that was appended to the return URL.

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