Merchant Acquirer request and response

Adyen will replace the received card alias with the card number, and submit the request to the Merchant Acquirer URL you configured during setup. The format of this request can be SOAP or JSON, depending on your choice during setup.

Adyen provides a WSDL file with specifications of the structure of a payment request and response for handling and responding to the request.

Besides the card.number, the request also contains the payment pspReference in the additionalData. The value must be returned in the pspReference field of the response.

{  
   "additionalData":{  
      "pspReference":"9114836116075054"
   },
   "amount":{  
      "currency":"EUR",
      "value":0
   },
   "merchantAccount":"TestMerchant",
   "reference":"Test",
   "shopperIP":"127.0.1.1",
   "card":{  
      "expiryMonth":"8",
      "expiryYear":"2018",
      "holderName":"Test",
      "number":"4111111111111111"
   }
}
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <ns1:authorise xmlns:ns1="http://payment.services.adyen.com">
         <ns1:paymentRequest>
            <amount xmlns="http://payment.services.adyen.com">
               <currency xmlns="http://common.services.adyen.com">EUR</currency>
               <value xmlns="http://common.services.adyen.com">0</value>
            </amount>
            <card xmlns="http://payment.services.adyen.com">
               <expiryMonth>06</expiryMonth>
               <expiryYear>2016</expiryYear>
               <holderName>Adyen Test</holderName>
               <number>4111111111111111</number>
            </card>
            <merchantAccount xmlns="http://payment.services.adyen.com">SupportAdyenTest</merchantAccount>
            <reference xmlns="http://payment.services.adyen.com">Your Reference Here</reference>
            <shopperEmail xmlns="http://payment.services.adyen.com">s.hopper@test.com</shopperEmail>
            <shopperIP xmlns="http://payment.services.adyen.com">61.294.12.12</shopperIP>
            <shopperReference xmlns="http://payment.services.adyen.com">Simon Hopper</shopperReference>
         </ns1:paymentRequest>
      </ns1:authorise>
   </soap:Body>
</soap:Envelope>

 

Merchant Acquirer API response

 

The merchant acquirer will reply with a Payment Response. The format of the response must be the same as the request (SOAP or JSON).
The resultCode of the response can be:
  • Authorised
  • Refused

This will also be the payment status in the Adyen payments platform.
You will have the option, in case when the resultCode is Refused, to return a refusalReason. In case the resultCode is Authorised, you can return an authCode. Both are optional. 

Response with an Authorised resultCode

{  
   "pspReference":"8624845699108872",
   "resultCode":"Authorised",
   "authCode":"41026"
}
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <ns1:authoriseResponse xmlns:ns1="http://payment.services.adyen.com">
         <ns1:paymentResult>
            <authCode xmlns="http://payment.services.adyen.com">64158</authCode>
            <pspReference xmlns="http://payment.services.adyen.com">8313547924770610</pspReference>
            <resultCode xmlns="http://payment.services.adyen.com">Authorised</resultCode>
         </ns1:paymentResult>
      </ns1:authoriseResponse>
   </soap:Body>
</soap:Envelope>

Response with a Refused resultCode

{
   "pspReference": "8624845699108872",
   "resultCode": "Refused",
   "refusalReason": "Network error"
} 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <ns1:authoriseResponse xmlns:ns1="http://payment.services.adyen.com">
      <ns1:paymentResult>
        <pspReference xmlns="http://payment.services.adyen.com">8624845699108872</pspReference>
        <resultCode xmlns="http://payment.services.adyen.com">Refused</resultCode>
        <refusalReason xmlns="http://payment.services.adyen.com">Network error</refusalReason>
      </ns1:paymentResult>
    </ns1:authoriseResponse>
  </soap:Body>
</soap:Envelope>

The Merchant Acquirer response will be returned in a  PaymentResult. The status received in the Merchant Acquirer response will be the status of the Payment.

In case of a timeout, or other errors, the resultCode of the PaymentResult will be Error (instead of Authorised/Refused).