Skip to main content

Return [accepted] or Adyen
retries your webhook indefinitely.

Adyen returns a resultCode on every payment. Six possible values. Most integrations only handle AUTHORISED and break silently on the other five.

6

resultCodes

Sessions API

recommended

0

credentials

Adyen offers two integration paths: the Sessions API and the Payments API. The Sessions API is simpler — one server call creates a payment session, you pass sessionId and sessionData to the Drop-in UI, and it handles card collection, 3DS challenges, and redirect payment methods automatically. The Payments API gives full control but requires you to handle every step including 3DS redirects manually.

Every Adyen payment returns a resultCode. AUTHORISED is a clean approval. REFUSED means the bank declined. ERROR is a technical fault, safe to retry. CANCELLED means the customer stopped. PENDING and RECEIVED mean the result is not final — this happens with bank transfers, SEPA, and voucher methods. You must wait for the AUTHORISATION webhook event before fulfilling.

Adyen's webhook format is different from most gateways. Notifications arrive as a JSON body with a notificationItems array. Each item has an eventCode and a success boolean. The response your server sends back must contain the literal string [accepted] — or Adyen will retry delivery.

6 result codes. All 6 matter.

Only one means you can fulfill. The other five need explicit handling or your orders will silently break.

AUTHORISEDPayment confirmed

Fulfill now. The bank approved the charge. This is the only status where you should fulfill the order.

REFUSEDBank declined

Show a retry message. The issuer refused the charge — wrong card, insufficient funds, or a fraud block.

ERRORTechnical fault

Safe to retry. Something went wrong in the processing chain — not the customer's fault. Try again.

CANCELLEDCustomer cancelled

The shopper closed the payment flow before completing it. No charge was attempted.

PENDINGResult unknown — wait

Bank transfer or voucher method. Adyen will send an AUTHORISATION webhook when the payment settles.

RECEIVEDMethod accepted

The payment method was submitted successfully and is being processed. Wait for the async result.

Sessions API or Payments API?

Two paths to the same resultCode. Choose based on how much you want to own.

RecommendedSessions API

One server call creates a session. You pass sessionId and sessionData to the Drop-in UI. 3DS challenges, method redirects, and retries are handled inside the UI component automatically.

  • + 3DS is automatic — no redirect logic in your code
  • + One endpoint to call server-side
  • + Drop-in UI handles all payment methods uniformly
AdvancedPayments API

POST to /payments, read the action object, handle action.type for 3DS redirects, then POST to /payments/details with the customer's result. You own every step.

  • You handle 3DS redirects manually
  • More endpoints, more error surface
  • + Fine-grained control over each payment step

Use Sessions API unless you specifically need to inspect and route each step of the payment flow yourself.

Integration code

curl -X POST https://mockgateway.com/api/base/adyen/v71/payments \
  -H "Authorization: Bearer YOUR_MOCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "merchantAccount": "MockMerchantECOM",
    "amount": {
      "value": 4999,
      "currency": "EUR"
    },
    "reference": "ORD-ADY-00123",
    "returnUrl": "https://yourapp.com/checkout/return",
    "countryCode": "NL"
  }'

New to testing webhooks locally? Read how webhook delivery and retries work →

Request parameters

Sent to POST /api/base/adyen/v71/payments

Request parameters
ParameterTypeRequiredDescription
amountintegerrequired

Amount in minor units

e.g. 1000
currencystringrequired

ISO 4217 currency

e.g. USD
referencestringoptional

Your unique reference

e.g. ORDER-001

Response fields

Response fields
FieldTypeDescription
pspReferencestringAdyen PSP reference
statusenumPayment result
created_atdatetime

Questions about Adyen

Other gateway templates

Looking for a different provider?