--- title: "Embedded Commerce integration" description: "Initiate transactions in your own AI agent interface and process payments with Adyen." url: "https://docs.adyen.com/online-payments/agentic-commerce/merchant/embedded-commerce-integration" source_url: "https://docs.adyen.com/online-payments/agentic-commerce/merchant/embedded-commerce-integration.md" canonical: "https://docs.adyen.com/online-payments/agentic-commerce/merchant/embedded-commerce-integration" last_modified: "2026-06-19T12:56:19+02:00" language: "en" --- # Embedded Commerce integration Initiate transactions in your own AI agent interface and process payments with Adyen. [View source](/online-payments/agentic-commerce/merchant/embedded-commerce-integration.md) 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](/online-payments/build-your-integration) 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](https://github.com/Adyen/adyen-web) 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](/online-payments/build-your-integration#choose-your-server-side-implementation) 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](/online-payments/build-your-integration/sessions-flow/?platform=Web\&integration=Drop-in#create-payment-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](/online-payments/build-your-integration/sessions-flow/?platform=Web\&integration=Drop-in#create-instance) 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](/online-payments/build-your-integration/sessions-flow/?platform=Web\&integration=Drop-in#inform-the-shopper). 10. Your AI agent shows the order confirmation or payment outcome to the shopper. ```mermaid sequenceDiagram participant S as Shopper participant A as Your AI agent participant P as Your payment server participant D as Adyen S->>A: 1. Instruct to initiate a transaction A->>P: 2. Request a payment session P->>D: 3. Make request to create a session (POST /sessions) D-->>P: 4. Return session data P-->>A: 5. Return session data A->>A: 6. Render Drop-in payment form S->>A: 7. Enter payment details and submit A->>D: 8. Drop-in sends payment data D-->>A: 9. Return payment outcome A->>S: 10. Show order confirmation or payment outcome ``` ### AI chat interfact that collects the shopper's payment details through a dialogue In this example: * Your AI agent interface is an AI chat window. * Your online payments integration uses [Web Components with Advanced flow](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components). 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](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components#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](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components#pm-config) 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](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components#make-a-payment) 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](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components\&version=6.36.0#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. ```mermaid sequenceDiagram participant S as Shopper participant A as Your AI agent participant P as Your payment server participant D as Adyen S->>A: 1. Ask for help with shopping A->>S: 2. Handle product discovery and selection S->>A: 3. Instruct to initiate a transaction A->>P: 4. Request available payment methods P->>D: 5. Make request to get available payment methods (POST /paymentMethods) D-->>P: 6. Return available payment methods P-->>A: 7. Return available payment methods A->>S: 8. Show available payment methods S->>A: 9. Choose payment method A->>A: 10. Render Component payment form S->>A: 11. Enter payment details and submit A->>P: 12. Component passes payment data P->>D: 13. Make payment request (POST /payments) D-->>P: 14. Return payment status or additional action opt Additional action required P->>A: 15. Return additional action A->>S: Component shows UI or redirects shopper for additional action S->>A: Finish additional action A->>P: Pass additonal action data from Component P->>D: Make request to send additional data (POST /payments/details) end P-->>A: 16. Return payment status A->>S: 17. Show order confirmation or payment outcome ``` ## 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. | ```mermaid flowchart LR A[AI agent interface] <--> B[Your online payments integration] <--> C[Adyen] ``` ## Security and PCI compliance guidelines Use the following guidelines to ensure your integration is secure and complies with [PCI DSS requirements](/online-payments/pci-dss-compliance): ### 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](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other). ### Verify webhook events with HMAC signatures Use [HMAC signatures to verify that webhook events](/development-resources/webhooks/secure-webhooks/verify-hmac-signatures) 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](/development-resources/testing/test-card-numbers). * Handling different payment statuses in your AI agent interface. For example, if you receive the [error result code](/online-payments/build-your-integration/payment-result-codes#final-payment-status), 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](/online-payments/go-live-checklist) for your online payments integration. ## See also * [Build your online payments integration](/online-payments/build-your-integration) * [Web Drop-in integration with Sessions flow](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Drop-in) * [Web Components integration with Advanced flow](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components) * [PCI DSS compliance](/online-payments/pci-dss-compliance)