Checkout icon

Embedded Commerce integration

Initiate transactions in your own AI agent interface and process payments with Adyen.

View source

You can build your own AI agent interface that shoppers interact with to initiate transactions. Your AI agent interface connects with your Adyen online payments integration to process payments, so that shoppers can make complete transactions without leaving the interaction with your AI agent.

Requirements

Requirement Description
Integration type An existing online payments integration.
Setup steps Before you begin, make sure that your online payments integration works as expected, end-to-end.
Limitations Your AI agent interface must use Web Drop-in/Components for a secure payment form that encrypts payment details.

How it works

Your AI agent interface handles the interaction with the shopper. When the shopper initiates checkout, your interface uses your existing online payments integration to start checkout and complete the payment.

The following examples show how you can integrate your AI agent with your existing online payments integration, depending on which server-side flow it uses.

Sessions flow

In this example:

  • Your AI agent interface is an AI chat window.
  • Your online payments integration uses Web Drop-in with Sessions flow.

The following shows the process of a shopper using your AI agent to make a transaction:

  1. The shopper instructs your AI agent to initiate a transaction.
  2. Your AI agent communicates with your payment server to initiate a payment session.
  3. Your payment server makes a request to create a session to Adyen.
  4. Adyen's server returns session data to your payment server.
  5. Your payment server returns the session data to your AI agent.
  6. Your AI agent renders the Drop-in payment form in the AI chat window.
  7. The shopper enters their payment details and submits their payment using the Drop-in payment form.
  8. Drop-in handles the payment, passing payment data to Adyen.
  9. Adyen returns the payment outcome to Drop-in.
  10. Your AI agent shows the order confirmation or payment outcome to the shopper.
CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIFlvdXIgQUkgYWdlbnQKICAgIHBhcnRpY2lwYW50IFAgYXMgWW91ciBwYXltZW50IHNlcnZlcgogICAgcGFydGljaXBhbnQgRCBhcyBBZHllbgoKICAgIFMtPj5BOiAxLiBJbnN0cnVjdCB0byBpbml0aWF0ZSBhIHRyYW5zYWN0aW9uCiAgICBBLT4+UDogMi4gUmVxdWVzdCBhIHBheW1lbnQgc2Vzc2lvbgogICAgUC0+PkQ6IDMuIE1ha2UgcmVxdWVzdCB0byBjcmVhdGUgYSBzZXNzaW9uIChQT1NUIC9zZXNzaW9ucykKICAgIEQtLT4+UDogNC4gUmV0dXJuIHNlc3Npb24gZGF0YQogICAgUC0tPj5BOiA1LiBSZXR1cm4gc2Vzc2lvbiBkYXRhCiAgICBBLT4+QTogNi4gUmVuZGVyIERyb3AtaW4gcGF5bWVudCBmb3JtCiAgICBTLT4+QTogNy4gRW50ZXIgcGF5bWVudCBkZXRhaWxzIGFuZCBzdWJtaXQKICAgIEEtPj5EOiA4LiBEcm9wLWluIHNlbmRzIHBheW1lbnQgZGF0YQogICAgRC0tPj5BOiA5LiBSZXR1cm4gcGF5bWVudCBvdXRjb21lCiAgICBBLT4+UzogMTAuIFNob3cgb3JkZXIgY29uZmlybWF0aW9uIG9yIHBheW1lbnQgb3V0Y29tZQo=

AI chat interfact that collects the shopper's payment details through a dialogue

In this example:

The following shows the process of a shopper using your AI agent to make a transaction:

  1. The shopper instructs your agent for help with shopping.
  2. Your AI agent handles product discovery, selection, and order details within the conversation.
  3. The shopper instructs your AI agent to initiate a transaction.
  4. Your AI agent communicates with your payment server to get a list of available payment methods, based on the payment amount and the shopper's location.
  5. Your payment server makes a request to Adyen to get available payment methods to Adyen.
  6. Adyen returns the list of available payment methods to your payment server.
  7. Your payment server returns the list of available payment methods to your AI agent.
  8. Your AI agent shows the available payment methods to the shopper.
  9. The shopper indicates the payment method they choose to your AI agent.
  10. Your AI agent renders the corresponding payment method Component with the payment form.
  11. The shopper enters their payment details and submits their payment using the Component payment form.
  12. The Component passes the required payment data from your AI agent interface to your server.
  13. Your payment server makes a payment request to Adyen.
  14. Adyen returns to your payment server one of the following:
    • The payment status.
    • An additional action to complete the payment.
  15. If the response from Adyen includes an additional action, your online payments integration handles the additional action.
  16. Your payment server returns the payment status to your AI agent.
  17. Your AI agent shows the order confirmation or payment outcome to the shopper.
CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgUyBhcyBTaG9wcGVyCiAgICBwYXJ0aWNpcGFudCBBIGFzIFlvdX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0+PkE6IDE1LiBSZXR1cm4gYWRkaXRpb25hbCBhY3Rpb24KICAgICAgICBBLT4+UzogQ29tcG9uZW50IHNob3dzIFVJIG9yIHJlZGlyZWN0cyBzaG9wcGVyIGZvciBhZGRpdGlvbmFsIGFjdGlvbgogICAgICAgIFMtPj5BOiBGaW5pc2ggYWRkaXRpb25hbCBhY3Rpb24KICAgICAgICBBLT4+UDogUGFzcyBhZGRpdG9uYWwgYWN0aW9uIGRhdGEgZnJvbSBDb21wb25lbnQKICAgICAgICBQLT4+RDogTWFrZSByZXF1ZXN0IHRvIHNlbmQgYWRkaXRpb25hbCBkYXRhIChQT1NUIC9wYXltZW50cy9kZXRhaWxzKQogICAgZW5kCiAgICBQLS0+PkE6IDE2LiBSZXR1cm4gcGF5bWVudCBzdGF0dXMKICAgIEEtPj5TOiAxNy4gU2hvdyBvcmRlciBjb25maXJtYXRpb24gb3IgcGF5bWVudCBvdXRjb21lCg==

Recommended integration architecture

We recommend an agentic payment integration that handles communication with the following components:

Component Description
Your AI agent interface Your AI agent interface that the shopper interacts with. When the shopper communicates the intention to pay, this interface renders Adyen Web Drop-in/Components inside the interaction window to collect the shopper's payment details.
Your online payments integration Your online payments integration that includes:
  • Web Drop-in/Components with your configuration.
  • Your payment server that communicates with Adyen's Checkout API.
  • Your webhook server that handles webhook messages from Adyen.
This handles communication with Adyen, so your shopper does not communicate with Adyen directly
Adyen Communicates with your payment server to processes payments, handles 3D Secure authentication, and sends webhook messages to your webhook server.
CmZsb3djaGFydCBMUgogICAgQVtBSSBhZ2VudCBpbnRlcmZhY2VdIDwtLT4gQltZb3VyIG9ubGluZSBwYXltZW50cyBpbnRlZ3JhdGlvbl0gPC0tPiBDW0FkeWVuXQo=

Security and PCI compliance guidelines

Use the following guidelines to ensure your integration is secure and complies with PCI DSS requirements:

Use Adyen Web Drop-in/Components

Payment details are encrypted by Drop-in/Components, so that the shopper's data remains secure when passing information between your system and Adyen. You never handle raw card data, reducing your scope of PCI DSS compliance requirements.

Do not collect card data in chat messages

Chat message inputs do not comply with PCI DSS requirements, because they are plain-text inputs. Do not store card numbers or other secure payment information.

Store only the PSP reference

Adyen returns a pspReference for each payment. Use this as your reference for payment modifications like captures and refunds, and for questions to our Support Team.

Verify webhook events with HMAC signatures

Use HMAC signatures to verify that webhook events are from Adyen. Reject all webhook events that fail HMAC verification, and do not process transactions based on unverified webhook events.

Test and go live

Test your integration end-to-end before going live.

Test

In the test environment, test the following:

  • Communication between your AI agent interface and your payment server.
  • Communication between your payment server and Adyen.
  • Rendering Drop-in/Components in your AI agent interface.
  • The end-to-end payment flow initiated by your AI agent, using test cards.
  • Handling different payment statuses in your AI agent interface. For example, if you receive the error result code, inform the shopper in your chat interface and ask the shopper to attempt the payment again.
  • Receiving webhook messages for payments initiated by your AI agent.

Go live

Make sure that you have completed the Go-live checklist for your online payments integration.

See also