API/CSE tokenisation

Tokenise your payment details as per details below per payment type.

Card

Store credit card details for a shopper by calling the storeToken action in the Recurring service.

Request

{
    "card" : {
        "expiryMonth" : "06",
        "expiryYear" : 2016,
        "holderName" : "Adyen Test",
        "number" : "4111111111111111"
    },

    "merchantAccount" : "TestMerchant",
    
    "recurring" : {
        "contract" : "PAYOUT"
    },
 
    "shopperEmail" : "shopper@email.com",    
    "shopperReference" : "TheShopperReference"
}
<?xml version="1.0"?>
<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:storeToken xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:request>
        <card xmlns="http://recurring.services.adyen.com"> 
          <expiryMonth xmlns="http://payment.services.adyen.com">12</expiryMonth> 
          <expiryYear xmlns="http://payment.services.adyen.com">2012</expiryYear> 
          <holderName xmlns="http://payment.services.adyen.com">Adyen Test</holderName> 
          <number xmlns="http://payment.services.adyen.com">4111111111111111</number> 
        </card> 
        <merchantAccount xmlns="http://recurring.services.adyen.com">TestMerchant</merchantAccount> 
        <recurring xmlns="http://recurring.services.adyen.com"> 
          <contract xmlns="http://payment.services.adyen.com">RECURRING</contract> 
          <recurringDetailName xmlns="http://payment.services.adyen.com" xsi:nil="true"/> 
        </recurring> 
        <shopperEmail xmlns="http://recurring.services.adyen.com">email@shopper.com</shopperEmail> 
        <shopperReference xmlns="http://recurring.services.adyen.com">TheShopperReference</shopperReference>
      </ns1:request>
    </ns1:storeToken>
  </soap:Body>
</soap:Envelope>

Response

{
    "alias" : "A136717858767217",
    "aliasType" : "Default",
    "pspReference" : "9913134956610005",
    "recurringDetailReference" : "9914346339770053",
    "result" : "Success"
}
<?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:storeTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
            <ns1:result>
                <alias xmlns="http://recurring.services.adyen.com">A136717858767217</alias>
                <aliasType xmlns="http://recurring.services.adyen.com">Default</aliasType>
                <pspReference xmlns="http://recurring.services.adyen.com">9914346353939535</pspReference>
                <recurringDetailReference xmlns="http://recurring.services.adyen.com">9914346353940079</recurringDetailReference>
                <result xmlns="http://recurring.services.adyen.com">Success</result>
            </ns1:result>
        </ns1:storeTokenResponse>
    </soap:Body>
</soap:Envelope>


Bank payment

You can store bank account details for a shopper by calling the storeToken action in the Recurring service.

Request

{  
  "bank":{  
    "countryCode":"NL",
    "iban":"NL48RABO0132394782",
    "ownerName":"Test Shopper"
  },
  "merchantAccount":"TestMerchant",
  "recurring":{  
    "contract":"PAYOUT"
  },
  "shopperEmail":"shopper@email.com",
  "shopperReference":"TheShopperReference"
}
<?xml version="1.0"?>
<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:storeToken xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:request>
        <bank xmlns="http://recurring.services.adyen.com"> 
          <countryCode xmlns="http://payment.services.adyen.com">NL</countryCode> 
          <iban xmlns="http://payment.services.adyen.com">NL48RABO0132394782</iban> 
          <ownerName xmlns="http://payment.services.adyen.com">Test Shopper</ownerName> 
        </bank> 
        <merchantAccount xmlns="http://recurring.services.adyen.com">TestMerchant</merchantAccount> 
        <recurring xmlns="http://recurring.services.adyen.com"> 
          <contract xmlns="http://payment.services.adyen.com">RECURRING</contract> 
          <recurringDetailName xmlns="http://payment.services.adyen.com" xsi:nil="true"/> 
        </recurring> 
        <shopperEmail xmlns="http://recurring.services.adyen.com">email@shopper.com</shopperEmail> 
        <shopperReference xmlns="http://recurring.services.adyen.com">TheShopperReference</shopperReference>
      </ns1:request>
    </ns1:storeToken>
  </soap:Body>
</soap:Envelope>

Response

{
    "pspReference" : "9914346379262037",
    "recurringDetailReference" : "9914346379260098",
    "result" : "Success"
}
<?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:storeTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
            <ns1:result>
                <pspReference xmlns="http://recurring.services.adyen.com">9914346379262037</pspReference>
                <recurringDetailReference xmlns="http://recurring.services.adyen.com">9914346379260098</recurringDetailReference>
                <result xmlns="http://recurring.services.adyen.com">Success</result>
            </ns1:result>
        </ns1:storeTokenResponse>
    </soap:Body>
</soap:Envelope>

Alipay

The tokenisation of the payment details for Alipay requires to calls to the API:

  • prepareStoreToken: The prepareStoreToken API call includes the shopper data that needs to be submitted to initiate tokenisation, the shoppers mobile phone number and the shoppers Alipay account. The successful submission of this request results in an SMS Text sent to the shopper by Alipay. This message contains a PIN verification code which needs to be submitted by the shopper to complete the transaction.
  • storeToken: The shopper must provide the PIN they have received by way of SMS Text message. In the second step, this PIN needs to be entered and then submitted to the Adyen payments platform. After you submit the storeToken call, the Adyen payments platform generates and subsequently returns a 16 digit token to the merchant. You can then use this Adyen token for recurring transactions. From this point onwards Adyen's standard recurring functionality can be used to process recurring payments.

prepareStoreToken for Alipay

Request

{  
  "additionalData":{  
    "alipay.mobile":"15101111111",
    "alipay.alipayAccount":"email@address.com"
  },
  "merchantAccount":"TestMerchant",
  "recurring":{  
    "contract":"RECURRING"
  },
  "selectedBrand":"alipay",
  "shopperEmail":"shopper@email.com",
  "shopperReference":"alipay-API-001"
}
<?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
      <prepareStoreToken xmlns="http://recurring.services.adyen.com">
         <request>
            <additionalData>
               <entry>
                  <key xsi:type="xsd:string">alipay.mobile</key>
                  <value xsi:type="xsd:string">15101111111</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">alipay.alipayAccount</key>
                  <value xsi:type="xsd:string">email@address.com</value>
               </entry>
            </additionalData>
            <merchantAccount>TestMerchant</merchantAccount>
            <pspEchoData xsi:nil="true"/>
            <recurring>
               <contract xmlns="http://payment.services.adyen.com">RECURRING</contract>
            </recurring>
            <selectedBrand>alipay</selectedBrand>
            <shopperEmail>shopper@email.com</shopperEmail>
            <shopperReference>alipay-API-001</shopperReference>
            <shopperStatement xsi:nil="true"/>
         </request>
      </prepareStoreToken>
   </soap:Body>
</soap:Envelope>

Response

{  
  "additionalData":{  
    "refusalReasonRaw":"OK"
  },
  "pspEchoData":"AgABAQB7dE.....0MRp1x5rc=",
  "pspReference":"9914038668704635",
  "result":"ProvideDetails"
}
<?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:prepareStoreTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:result>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">refusalReasonRaw</key>
            <value xsi:type="xsd:string">OK</value>
          </entry>
        </additionalData>
        <params xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <pspEchoData xmlns="http://recurring.services.adyen.com">AgABAQB7dE.....0MRp1x5rc=</pspEchoData>
        <pspReference xmlns="http://recurring.services.adyen.com">9914038668704635</pspReference>
        <recurringDetailReference xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <redirectType xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <redirectUrl xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <result xmlns="http://recurring.services.adyen.com">ProvideDetails</result>
      </ns1:result>
    </ns1:prepareStoreTokenResponse>
  </soap:Body>
</soap:Envelope>

storeToken for Alipay

Request

{
    "additionalData" : {
        "alipay.verificationCode" : "123456"
    },
    
    "merchantAccount" : "YourMerchantAccount",
    "pspEchoData" : "AgABAQB7dE.....0MRp1x5rc="
}
<?xml version="1.0"?>
<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:storeToken xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:request>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">alipay.verificationCode</key>
            <value xsi:type="xsd:string">123456</value>
          </entry>
        </additionalData>
        <merchantAccount xmlns="http://recurring.services.adyen.com">YourMerchantAccount</merchantAccount>
        <pspEchoData xmlns="http://recurring.services.adyen.com">AgABAQB7dE.....0MRp1x5rc=</pspEchoData>
      </ns1:request>
    </ns1:storeToken>
  </soap:Body>
</soap:Envelope>

Response

{
    "additionalData" : {
        "refusalReasonRaw" : "OK",
        "alipay.subscriptionId" : "1122334455667788",
        "alipay.mobile" : "15101111111",
        "tokenDataType" : "AliPay",
        "alipay.userLogonId" : "email@address.com",
        "alipay.signedAliPayAccountId" : "2088111122223333"
    },
    
    "pspReference" : "9914038669734680",
    "recurringDetailReference" : "9914038669760073",
    "result" : "Success"
}
<?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:storeTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:result>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">refusalReasonRaw</key>
            <value xsi:type="xsd:string">OK</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">alipay.subscriptionId</key>
            <value xsi:type="xsd:string">1122334455667788</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">alipay.mobile</key>
            <value xsi:type="xsd:string">15101111111</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">tokenDataType</key>
            <value xsi:type="xsd:string">AliPay</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">alipay.userLogonId</key>
            <value xsi:type="xsd:string">email@address.com</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">alipay.signedAliPayAccountId</key>
            <value xsi:type="xsd:string">2088111122223333</value>
          </entry>
        </additionalData>
        <pspReference xmlns="http://recurring.services.adyen.com">9914038669734680</pspReference>
        <recurringDetailReference xmlns="http://recurring.services.adyen.com">9914038669760073</recurringDetailReference>
        <result xmlns="http://recurring.services.adyen.com">Success</result>
      </ns1:result>
    </ns1:storeTokenResponse>
  </soap:Body>
</soap:Envelope>

QIWI

There are two steps required to store QIWI account details as Token for recurring payments. The below API calls represent the two calls:

  • prepareStoreToken. The prepareStoreToken API call includes the shopper data that you submit to initiate Tokenisation, the shopper's mobile phone number (including country code) (=QIWI account) and the shoppers QIWI account password. The successful submission of this request results in an SMS text sent to the shopper. This text contains a 6-digit PIN verification code which needs to be submitted by the shopper to complete the transaction.
  • storeToken. The shopper must provide the PIN they have received by way of SMS Text message. This PIN needs to be entered and then submitted to the Adyen payments platform. On successfully submitting the storeToken call, the Adyen payments platform will generate and subsequently return a 16 digit token to the merchant. You can then use this Adyen token for recurring transactions. From this point onwards Adyen's standard Recurring functionality can be used to process recurring payments.

prepareStoreToken for QIWI

Request

{
    "additionalData" : {
        "qiwiwallet.telephoneNumber" : "+79111111111",
        "qiwiwallet.password" : "MyPassword"    
    },
    "merchantAccount" : "YourMerchantAccount",
    "recurring" : {
        "contract" : "RECURRING"
    },
    "selectedBrand" : "qiwiwallet",
    "shopperEmail" : "shopper@email.com",
    "shopperReference" : "qiwiwallet-API-001"
}
<?xml version="1.0"?>
<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:prepareStoreToken xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:request>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">qiwiwallet.telephoneNumber</key>
            <value xsi:type="xsd:string">+79111111111</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">qiwiwallet.password</key>
            <value xsi:type="xsd:string">MyPassword</value>
          </entry>
        </additionalData>
        <merchantAccount xmlns="http://recurring.services.adyen.com">YourMerchantAccount</merchantAccount>
        <recurring xmlns="http://recurring.services.adyen.com">
          <contract xmlns="http://payment.services.adyen.com">RECURRING</contract>
        </recurring>
        <selectedBrand xmlns="http://recurring.services.adyen.com">qiwiwallet</selectedBrand>
        <shopperEmail xmlns="http://recurring.services.adyen.com">shopper@email.com</shopperEmail>
        <shopperReference xmlns="http://recurring.services.adyen.com">qiwiwallet-API-001</shopperReference>
      </ns1:request>
    </ns1:prepareStoreToken>
  </soap:Body>
</soap:Envelope>

Response

{
    "additionalData" : {
        "refusalReasonRaw" : "OK"
    },
    "pspEchoData" : "AgABAQBhhS.....hjZLmK0GU=",
    "pspReference" : "9914038697700000",
    "result" : "ProvideDetails"
}
<?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:prepareStoreTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:result>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">refusalReasonRaw</key>
            <value xsi:type="xsd:string">OK</value>
          </entry>
        </additionalData>
        <params xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <pspEchoData xmlns="http://recurring.services.adyen.com">AgABAQBhhS.....hjZLmK0GU=</pspEchoData>
        <pspReference xmlns="http://recurring.services.adyen.com">9914038697700000</pspReference>
        <recurringDetailReference xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <redirectType xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <redirectUrl xmlns="http://recurring.services.adyen.com" xsi:nil="true"/>
        <result xmlns="http://recurring.services.adyen.com">ProvideDetails</result>
      </ns1:result>
    </ns1:prepareStoreTokenResponse>
  </soap:Body>
</soap:Envelope>

storeToken for QIWI

Request

{
    "additionalData" : {
        "qiwiwallet.verificationCode" : "555177"
    },
    "merchantAccount" : "YourMerchantAccount",
    "pspEchoData" : "AgABAQBhhS.....hjZLmK0GU="
}
<?xml version="1.0"?>
<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:storeToken xmlns:ns1="http://recurring.services.adyen.com">
      <ns1:request>
        <additionalData xmlns="http://recurring.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">qiwiwallet.verificationCode</key>
            <value xsi:type="xsd:string">555177</value>
          </entry>
        </additionalData>
        <merchantAccount xmlns="http://recurring.services.adyen.com">YourMerchantAccount</merchantAccount>
        <pspEchoData xmlns="http://recurring.services.adyen.com">AgABAQBhhS.....hjZLmK0GU=</pspEchoData>
      </ns1:request>
    </ns1:storeToken>
  </soap:Body>
</soap:Envelope>

Response

{  
   "additionalData":{  
      "qiwiwallet.accessToken":"abe......0fd",
      "refusalReasonRaw":"OK",
      "qiwiwallet.telephoneNumber":"+79111111111",
      "rechargeReference":"2914678884915989",
      "tokenDataType":"QiwiInternational",
      "qiwiwallet.expiresAt":"2014-12-29T16:23:17.15Z",
      "qiwiwallet.refreshToken":"a9......68",
      "qiwiwallet.tokenType":"bearer"
   },
   "pspReference":"9914038701960145",
   "recurringDetailReference":"9914038701970011",
   "result":"Success"
}
<?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:storeTokenResponse xmlns:ns1="http://recurring.services.adyen.com">
         <ns1:result>
            <additionalData xmlns="http://recurring.services.adyen.com">
               <entry>
                  <key xsi:type="xsd:string">qiwiwallet.accessToken</key>
                  <value xsi:type="xsd:string">abe......0fd</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">refusalReasonRaw</key>
                  <value xsi:type="xsd:string">OK</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">qiwiwallet.telephoneNumber</key>
                  <value xsi:type="xsd:string">+79111111111</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">rechargeReference</key>
                  <value xsi:type="xsd:string">2914678884915989</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">tokenDataType</key>
                  <value xsi:type="xsd:string">QiwiInternational</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">qiwiwallet.expiresAt</key>
                  <value xsi:type="xsd:string">2014-12-29T16:23:17.15Z</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">qiwiwallet.refreshToken</key>
                  <value xsi:type="xsd:string">a9......68</value>
               </entry>
               <entry>
                  <key xsi:type="xsd:string">qiwiwallet.tokenType</key>
                  <value xsi:type="xsd:string">bearer</value>
               </entry>
            </additionalData>
            <pspReference xmlns="http://recurring.services.adyen.com">9914038701960145</pspReference>
            <recurringDetailReference xmlns="http://recurring.services.adyen.com">9914038701970011</recurringDetailReference>
            <result xmlns="http://recurring.services.adyen.com">Success</result>
         </ns1:result>
      </ns1:storeTokenResponse>
   </soap:Body>
</soap:Envelope>