There are two types of implementation in the checkout:
- Raw credit card fields (in this case, your business needs to be PCI compliant).
- Use the drop-in checkout components of Adyen.
POST /woocommerce/adyen/stores/{store_id}/payments
Key fields:
channel: usually "web".returnUrl: where the shopper comes back to after any redirect (for example your order-received page).amount: an object with currency and value. Important: value is in minor units, the smallest unit of the currency. For euros that means cents. So 28.00 EUR is written as "value": 2800, not 28.paymentMethod: the method-specific data. For cards this contains the encrypted card fields produced by Adyen's Web Component (recommended way) or JWE (merchants with custom requirements).
Plus optional but commonly used fields: shopperReference (a stable id for the customer, needed if you want to save their method), shopperEmail, billingAddress, lineItems (required for methods like Klarna), browserInfo (needed for card security checks), and storePaymentMethod: true if you want to save the method for next time.
A trimmed iDEAL example:
"returnUrl": "https://myshop.example.com/checkout/order-received/592/",
"amount": { "currency": "EUR", "value": 2800 },
"paymentMethod": { "type": "ideal" },
"metadata": { "wc_order_id": 592 }
Tip: put your own order id in metadata (for example wc_order_id). Woosa echoes metadata back to you later, so this is how you match a payment to the right order in your system.
The response always includes a resultCode. The two cases to handle:
resultCode: "Authorised" and no action: you are done. The payment succeeded. Save the pspReference (the unique payment id). You will need it for capturing, refunding, or cancelling later.- A response with an
action object (often with resultCode: "RedirectShopper" or similar): the shopper has one more step. Hand that action object, unchanged, to Adyen's Web Component. It knows how to run the redirect or challenge. Do not try to interpret the action yourself, just pass it through.
Because the exact response shape varies by payment method, treat resultCode as your primary signal, and lean on Adyen's own documentation for method-specific fields.
After the shopper completes the redirect or challenge, the frontend gives you back some details. Send them here to finalise:
POST /woocommerce/adyen/stores/{store_id}/payment-details
"details": { "redirectResult": "X3XtfGC9!H4sIAAAAAAAA..." },
"metadata": { "wc_order_id": 593 }
Now you get a final resultCode (for example Authorised) with the confirmed amount and pspReference. This time the payment really is settled at the authorisation stage.