Search

Are you looking for test card numbers?

Would you like to contact support?

Default icon

Add cost contract

Create a new cost contract for an account key.

Request parameters

To add a new cost contract entry associated with an account key, make a POST /addCostContract request specifying:

Name Type Required Description Notes
accountKey String
-white_check_mark-
Unique reference to identify an account.
  • Company account key format: Company.COMPANY_CODE
  • Merchant account key format: Merchant.MERCHANT_CODE
 
billable Boolean
-x-

  • true: the cost contract is billable.
  • false: the cost contract is not billable.
If the specified account key refers to a merchant account, leave this field empty/do not assign a value to this field.
costContractName String
-white_check_mark-

The name identifying the cost contract.
The specified name needs to be a valid one, i.e. it needs to be on the cost contract list assigned to the company or merchant.

 
minimumAmount int
(Long)
-x-
The minimum chargeable amount per invoice.
The value is represented using the euro currency and minor units (i.e. 1000 = 10 EUR).
If the specified account key refers to a merchant account, leave this field empty/do not assign a value to this field.
minimumTxs int
-x-
The minimum number of transactions per month. If the specified account key refers to a merchant account, leave this field empty/do not assign a value to this field.
remark String
-x-
Free text comment or remark about the cost contract. If the specified account key refers to a merchant account, leave this field empty/do not assign a value to this field.
startYear int
-white_check_mark-
The starting year when the cost contract becomes effective. Start date = startMonth + startYear
The starting date needs to be set not earlier than a month, and not later than two years in the future.
startMonth int
-white_check_mark-
The starting month when the cost contract becomes effective. Start date = startMonth + startYear
The starting date needs to be set not earlier than a month, and not later than two years in the future.

Response parameters

If there are no errors in the request, the call returns a pspReference.If any issues occur during the process, the call returns one or more warning or error messages.

Name Type Returned by default Description
pspReference String
-white_check_mark-
A reference to uniquely identify the request.
Returned when the response is successful and a new contract is created.
warnings Array
-x-
List containing one or more warning messages.
Returned when the request is not correctly processed.
errors Array
-x-
List containing one or more error messages.
Returned when the request fails.

Examples

Request

{
   "accountKey":"MerchantAccount.TestMerchant",
   "costContractName":"merchantDemoContract",
   "startMonth":3,
   "startYear":2016
}
 <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>
    <addCostContract xmlns="http://caaccount.services.adyen.com">
      <request>
        <accountKey>MerchantAccount.TestMerchant</accountKey>
        <costContractName>merchantDemoContract</costContractName>
        <startMonth>3</startMonth>
        <startYear>2016</startYear>
      </request>
    </addCostContract>
  </soap:Body>
</soap:Envelope>

Response

{ 
   "pspReference":"9914527653010792"
}
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://caaccount.services.adyen.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <ns0:addCostContractResponse>
      <ns0:response>
        <ns0:pspReference>9914527653010792</ns0:pspReference>
      </ns0:response>
    </ns0:addCostContractResponse>
  </soap:Body>
</soap:Envelope> 

Response in case of an error

{  
  "pspReference":"9914140627430128",
  "errors":[  
    "failed: startMonth should be at least next month"
  ]
}
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://caaccount.services.adyen.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <ns0:addCostContractResponse>
      <ns0:response>
        <ns0:errors>
          <ns0:string>failed: startMonth should be at least next month</ns0:string>
        </ns0:errors>
        <ns0:pspReference>9914140627430128</ns0:pspReference>
      </ns0:response>
    </ns0:addCostContractResponse>
  </soap:Body>
</soap:Envelope>