Are you looking for test card numbers?

Would you like to contact support?

Default icon

Confirm an additional action on your server

Confirm the result of an additional action on your server.

Some payment methods require the shopper to complete additional actions. For example, they must scan a QR code, authenticate a payment with 3D Secure, or go to an external app to complete the payment. After the shopper completes the additional action, you can synchronously get the payment result.

You always receive a notification webhook with the payment result asynchronously. We recommend that you use this to accurately update your order management system.

Before you begin

This page assumes you've already built a Drop-in integration.

Step 1. Implement the method to submit additional details

The Components session calls handlerForAdditionalDetails.
The following example shows an implementation that handles, for example, the 3D Secure 2 action:

  1. If the component type is ThreeDS2Component, the method returns an instance of AdyenSessionPaymentDetailsHandler.
  2. The session calls didProvide from myPaymentDetailsHandlerInstance to submit additional data from the ThreeDS2Component in a /payments/details request.

An implementation of handlerForAdditionalDetails for the 3D Secure 2 action
// Create a type that conforms to AdyenSessionPaymentDetailsHandler.

// Implement this in AdyenSessionDelegate.
func handlerForAdditionalDetails(in component: ActionComponent,
     session: AdyenSession) -> AdyenSessionPaymentDetailsHandler? {
        if component is ThreeDS2Component {
            // This instance has the didProvide method that the AdyenSession calls.
            return myPaymentDetailsHandlerInstance
        }
     // AdyenSession handles the flow. No additional API request.
     return nil
     }

Step 2. Implement the method of the payment details handler to make the API request

The Components session calls didProvide from AdyenSessionPaymentDetailsHandler, making a /payments/details request from your server with required data:

An implementation of didProvide
// Implement this in AdyenSessionDelegate.
func didProvide(_ actionComponentData: ActionComponentData,
     from component: ActionComponent,
     session: AdyenSession) {
        // Make a /payments/details request with actionComponentData.
     }

Sample /payments/details request with redirect data
curl https://checkout-test.adyen.com/v69/payments/details \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
     "details": {
       "redirectResult": "eyJ0cmFuc1N0YXR1cyI6IlkifQ=="
   }
}'

Step 3: Show the payment result

Use the resultCode from the /payments or /payments/details response to show the payment result to the shopper.