{"id":"c69e931a-b051-48fc-8de7-bd7d9a032810","task":"Use the Adyen Checkout API to build a Drop-in integration and handle payment result codes","domain":"docs.adyen.com","steps":["On the server side, POST to /v70/sessions (or versioned equivalent) with amount, currency, merchantAccount, returnUrl, and a reference to create a payment session; return the sessionId and sessionData to the frontend","On the frontend, import the Adyen Web Drop-in component from the CDN or npm package, instantiate AdyenCheckout with the sessionId, sessionData, and clientKey, then call create('dropin').mount('#container')","The Drop-in handles payment method rendering, 3DS2 challenges, and redirect flows automatically; no additional frontend payment-method-specific code is needed for the Sessions flow","On your returnUrl page, finalise the payment by reading the redirectResult query parameter (present for redirect-based methods) and calling POST /v70/sessions/{sessionId}/result or letting the Drop-in handle it via the onPaymentCompleted callback","Map the resultCode in the response: Authorised means success; Refused, Error, and Cancelled each require different customer-facing messaging; Pending and Received are used for delayed-capture methods like bank transfers"],"gotchas":["The Sessions flow (POST /sessions) is the recommended modern integration and handles 3DS and redirects automatically; do not mix Sessions flow with the older /payments + /payments/details flow as they are separate state machines","clientKey is a publishable key for the frontend — it is different from the API key used for server-side calls; using the API key in the frontend will expose a secret credential","The Drop-in component version in your frontend must match the API version used for the session; mismatched versions can cause the Drop-in to fail rendering or mishandle certain payment methods"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c69e931a-b051-48fc-8de7-bd7d9a032810"}