Update stored details

For credit cards, you can update the previously stored payment details. This may be required, for example, when the card expiry date or the billing/delivery address changes.

Request

You can update stored payment details when you initiate a new recurring payment. For this, pass new payment details along with an /authorise call and specify the selectedRecurringDetailReference value of the details that you want to update.

The details will only update if the /authorise request is successful.

For information on all available fields, see PaymentRequest.

The following example demonstrates how to update the expiry month and year for the previously stored card details with an /authorise call:

{
   "amount":{
      "value":"100",
      "currency":"EUR"
   },
   "card":{
      "expiryMonth":"11",
      "expiryYear":"2018"
   },
   "merchantAccount":"TestMerchant",
   "recurring":{
      "contract":"RECURRING"
   },
   "reference":"RecurringPayment-0001",
   "shopperEmail":"gras.shopper77@somewhere.org",
   "shopperIP":"1.1.1.1",
   "shopperInteraction":"ContAuth",
   "shopperReference":"grasshopper77",
   "selectedRecurringDetailReference":"RecurringDetailReference1"
}
<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">100</value>
         </amount>
         <ns1:card>
           <ns1:expiryMonth>11</ns1:expiryMonth>
           <ns1:expiryYear>2018</ns1:expiryYear>
         </ns1:card>
         <ns1:merchantAccount>TestMerchant</ns1:merchantAccount>
         <ns1:recurring>
           <ns1:contract>RECURRING</ns1:contract>
         </ns1:recurring>
         <ns1:reference>RecurringPayment-0001</ns1:reference>
         <ns1:shopperEmail>gras.shopper77@somewhere.org</ns1:shopperEmail>
         <ns1:shopperIP>1.1.1.1</ns1:shopperIP>
         <ns1:shopperInteraction>ContAuth</ns1:shopperInteraction>
         <ns1:shopperReference>grasshopper77</ns1:shopperReference> 
         <ns1:selectedRecurringDetailReference>RecurringDetailReference1</ns1:selectedRecurringDetailReference>
       </ns1:paymentRequest>
     </ns1:authorise>
   </soap:Body> 
</soap:Envelope>
curl https://pal-test.adyen.com/pal/servlet/Payment/v25/authorise \
 -d amount.value=10 \
 -d amount.currency=EUR \
 -d card.expiryMonth=11 \
 -d card.expiryYear=2018 \
 -d merchantAccount=TestMerchant \
 -d recurring.contract=RECURRING \
 -d reference=RecurringPayment-0001 \
 -d shopperEmail=gras.shopper77@somewhere.org \
 -d shopperIP=1.1.1.1 \
 -d shopperInteraction=ContAuth \
 -d shopperReference=gras.shopper77 \
 -d selectedRecurringDetailReference=RecurringDetailReference1

Response

If a recurring payment is successfully authorised, payment details are also updated during this call. In this case, the old recurringDetailReference becomes invalid, and a new reference is created.

A new recurringDetailReference value isn't returned in the /authorisation response. To learn how to obtain a new recurringDetailReference value, refer to this document.

For information on all available fields, refer to the PaymentResult topic.

The following example shows the response in case of successful authorisation:

{
   "pspReference":"8535034809517607",
   "resultCode":"Authorised",
   "authCode":"32486"
}
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
               xmlns:ns1="http://payment.services.adyen.com" 
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <ns1:authoriseResponse>
         <ns1:paymentResult>
            <ns1:pspReference>9914713344211235</ns1:pspReference>
            <ns1:resultCode>Authorised</ns1:resultCode>
            <ns1:authCode>32486</ns1:authCode>
         </ns1:paymentResult>
      </ns1:authoriseResponse>
   </soap:Body>
</soap:Envelope>

Next steps