{"title":"Add cost contracts","category":"default","creationDate":1776961629,"content":"<p>The <code>\/addCostContracts<\/code> endpoint works like\u00a0<a href=\"\/pt\/account-management-api\/manage-cost-contracts\/addcostcontract\">addCostContract<\/a>, the only difference being the ability to create contracts for multiple account keys.<\/p>\n<h2 id=\"addcostcontracts-request-fields\">\u00a0Request parameters<\/h2>\n<p>To add new cost contract entries for multiple account keys, make a POST <code>\/addCostContracts<\/code> request specifying:  <\/p>\n<table style=\"width:100%;\"><thead><tr class=\"header\"><th>Name<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>accountKeys<\/code><\/p>\n<\/td><td>\n<p>List<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td>\n<p>A list holding account key value stringsEach string in the list holds an account key value.Account key: Unique reference to identify an account.<\/p>\n<ul>\n<li>Company account key format: <code>Company.COMPANY_CODE<\/code><\/li>\n<li>Merchant account key format:\u00a0<code>Merchant.MERCHANT_CODE<\/code><\/li>\n<\/ul>\n<\/td><td>\n<p>\u00a0<\/p>\n<\/td><\/tr><tr><td>\n<p><code>billable<\/code><\/p>\n<\/td><td>\n<p>Boolean<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>\n<ul>\n<li><code>true<\/code>: the cost contract is billable.<\/li>\n<li><code>false<\/code>: the cost contract is not billable.<\/li>\n<\/ul>\n<\/td><td>\n<p>If the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>costContractName<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td><p>The name identifying the cost contract.<br>\nThe 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.<\/p><\/td><td>\n<p>\u00a0<\/p>\n<\/td><\/tr><tr><td>\n<p><code>minimumAmount<\/code><\/p>\n<\/td><td>int<br>\n(Long)<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>\n<p>The minimum chargeable amount per invoice.<br \/>\nThe value is represented using the euro currency and minor units (i.e. <em>1000<\/em> = EUR\u00a010).<\/p>\n<\/td><td>\n<p>If the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>minimumTxs<\/code><\/p>\n<\/td><td>\n<p>int<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>\n<p>The minimum number of transactions per month.  <\/p>\n<\/td><td>\n<p>If the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>remark<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>\n<p>Free text comment or remark about the cost contract.<\/p>\n<\/td><td>\n<p>If the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>startYear<\/code><\/p>\n<\/td><td>\n<p>int<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td>\n<p>The starting year when the cost contract becomes effective.<\/p>\n<\/td><td>\n<p><em>Start date = startMonth + startYear<br \/>\n<\/em>The starting date needs to be set not earlier than a month, and not later than two years in the future.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>startMonth<\/code><\/p>\n<\/td><td>\n<p>int<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td>\n<p>The starting month when the cost contract becomes effective.<\/p>\n<\/td><td>\n<p><em>Start date = startMonth + startYear<br \/>\n<\/em>The starting date needs to be set not earlier than a month, and not later than two years in the future.<\/p>\n<\/td><\/tr><\/tbody><\/table>\n<h2 id=\"addcostcontracts-response-fields\">Response parameters<\/h2>\n<p>If there are no errors in the request, the call returns\u00a0a\u00a0<code>pspReference.<\/code>If any issues occur during the process, the call returns one or more warning or error messages.<\/p>\n<table><thead><tr class=\"header\"><th>Name<\/th><th>Type<\/th><th>Returned by default<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>pspReference<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td>A reference to uniquely identify the request.<br>\nReturned when a new contract is created for the specified account keys in the\u00a0<code>accountKeys<\/code> list.<\/td><\/tr><tr><td>\n<p><code>warnings<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>List containing one or more warning messages about one or more cost contract creations with problems.<br>\nReturned when the new contract creation for the specified account keys in the\u00a0<code>accountKeys<\/code> list does not work as expected.<\/td><\/tr><tr><td>\n<p><code>errors<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td><p>List containing one or more error messages about one or more failed cost contract creations.<br>\nReturned when the new contract creation for the specified account keys in the\u00a0<code>accountKeys<\/code> list fails.<\/p><\/td><\/tr><\/tbody><\/table>\n<h2>Examples<\/h2>\n<h3 id=\"request\">Request<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'625361236'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{  \\n  \\\"accountKeys\\\":[  \\n    \\\"MerchantAccount.TestMerchant\\\",\\n    \\\"MerchantAccount.TestMerchantNotExists\\\",\\n    \\\"MerchantAccount.TestMerchantOwnedByOthers\\\",\\n    \\\"TestMerchant\\\",\\n    \\\"MerchantAccount.TestMerchant\\\"\\n  ],\\n  \\\"costContractName\\\":\\\"merchantDemoContract\\\",\\n  \\\"startMonth\\\":\\\"10\\\",\\n  \\\"startYear\\\":\\\"2015\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&lt;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\\\"&gt;  &lt;soap:Body&gt;\\n    &lt;addCostContracts xmlns=\\\"http:\\\/\\\/caaccount.services.adyen.com\\\"&gt;\\n      &lt;request&gt;\\n        &lt;accountKeys&gt;\\n          &lt;string&gt;MerchantAccount.TestMerchant&lt;\\\/string&gt;\\n          &lt;string&gt;MerchantAccount.TestMerchantNotExists&lt;\\\/string&gt;\\n          &lt;string&gt;MerchantAccount.TestMerchantOwnedByOthers&lt;\\\/string&gt;\\n          &lt;string&gt;TestMerchant&lt;\\\/string&gt;\\n          &lt;string&gt;MerchantAccount.TestMerchant&lt;\\\/string&gt;\\n        &lt;\\\/accountKeys&gt;\\n        &lt;costContractName&gt;merchantDemoContract&lt;\\\/costContractName&gt;\\n        &lt;startMonth&gt;10&lt;\\\/startMonth&gt;\\n        &lt;startYear&gt;2015&lt;\\\/startYear&gt;\\n      &lt;\\\/request&gt;\\n    &lt;\\\/addCostContracts&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"response\">Response<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'2130906226'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{  \\n   \\\"pspReference\\\":\\\"9914526910170142\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"\\u00a0&lt;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\\\"&gt;\\n  &lt;soap:Body&gt;\\n    &lt;ns0:addCostContractsResponse&gt;\\n      &lt;ns0:response&gt;\\n        &lt;ns0:pspReference&gt;9914526910170142&lt;\\\/ns0:pspReference&gt;\\n      &lt;\\\/ns0:response&gt;\\n    &lt;\\\/ns0:addCostContractsResponse&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"response-in-case-of-an-error\">\u00a0Response in case of an error<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'1810172725'\" :code-data=\"[{&quot;language&quot;:&quot;json&quot;,&quot;tabTitle&quot;:&quot;JSON&quot;,&quot;content&quot;:&quot;{  \\n   \\&quot;pspReference\\&quot;:\\&quot;9914386732540034\\&quot;\\n}&quot;},{&quot;language&quot;:&quot;xml&quot;,&quot;tabTitle&quot;:&quot;Soap&quot;,&quot;content&quot;:&quot;&lt;soap:Envelope xmlns:soap=\\&quot;http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\&quot; xmlns:ns0=\\&quot;http:\\\/\\\/caaccount.services.adyen.com\\&quot; xmlns:xsd=\\&quot;http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\&quot; xmlns:xsi=\\&quot;http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema-instance\\&quot;&gt;\\n   &lt;soap:Body&gt;\\n      &lt;ns0:addCostContractsResponse&gt;\\n         &lt;ns0:response&gt;\\n            &lt;ns0:errors&gt;\\n               &lt;ns0:string&gt;8_009 incorrect accountKey '', should be in the form of 'Company.companyCode' or 'MerchantAccount.merchantCode'&lt;\\\/ns0:string&gt;\\n               &lt;ns0:string&gt;failed 'MerchantAccount.TestMerchantNotExists': could not retrieve account 'MerchantAccount.TestMerchantNotExists'&lt;\\\/ns0:string&gt;\\n               &lt;ns0:string&gt;8_007 lacks permission to account 'MerchantAccount.TestMerchantOwnedByOthers'&lt;\\\/ns0:string&gt;\\n               &lt;ns0:string&gt;8_009 incorrect accountKey 'TestMerchant', should be in the form of 'Company.companyCode' or 'MerchantAccount.merchantCode'&lt;\\\/ns0:string&gt;\\n            &lt;\\\/ns0:errors&gt;\\n            &lt;ns0:pspReference&gt;9914386732540034&lt;\\\/ns0:pspReference&gt;\\n         &lt;\\\/ns0:response&gt;\\n      &lt;\\\/ns0:addCostContractsResponse&gt;\\n   &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>","url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/addcostcontracts","articleFields":{"id":"25134961","type":"page","description":"Create a new cost contract for multiple account keys.","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/addcostcontracts","title":"Add cost contracts","content":"The \/addCostContracts endpoint works like\u00a0addCostContract, the only difference being the ability to create contracts for multiple account keys.\n\u00a0Request parameters\nTo add new cost contract entries for multiple account keys, make a POST \/addCostContracts request specifying:  \nNameTypeRequiredDescriptionNotes\naccountKeys\n\nList\n\n\n\nA list holding account key value stringsEach string in the list holds an account key value.Account key: Unique reference to identify an account.\n\nCompany account key format: Company.COMPANY_CODE\nMerchant account key format:\u00a0Merchant.MERCHANT_CODE\n\n\n\u00a0\n\nbillable\n\nBoolean\n\n\n\n\ntrue: the cost contract is billable.\nfalse: the cost contract is not billable.\n\n\nIf the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.\n\ncostContractName\n\nString\n\n\nThe name identifying the cost contract.\nThe 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.\n\u00a0\n\nminimumAmount\nint\n(Long)\n\n\nThe minimum chargeable amount per invoice.\nThe value is represented using the euro currency and minor units (i.e. 1000 = EUR\u00a010).\n\nIf the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.\n\nminimumTxs\n\nint\n\n\n\nThe minimum number of transactions per month.  \n\nIf the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.\n\nremark\n\nString\n\n\n\nFree text comment or remark about the cost contract.\n\nIf the specified account key refers to a merchant account, leave this field empty\/do not assign a value to this field.\n\nstartYear\n\nint\n\n\n\nThe starting year when the cost contract becomes effective.\n\nStart date = startMonth + startYear\nThe starting date needs to be set not earlier than a month, and not later than two years in the future.\n\nstartMonth\n\nint\n\n\n\nThe starting month when the cost contract becomes effective.\n\nStart date = startMonth + startYear\nThe starting date needs to be set not earlier than a month, and not later than two years in the future.\n\nResponse parameters\nIf there are no errors in the request, the call returns\u00a0a\u00a0pspReference.If any issues occur during the process, the call returns one or more warning or error messages.\nNameTypeReturned by defaultDescription\npspReference\n\nString\n\n\nA reference to uniquely identify the request.\nReturned when a new contract is created for the specified account keys in the\u00a0accountKeys list.\nwarnings\n\nString\n\n\nList containing one or more warning messages about one or more cost contract creations with problems.\nReturned when the new contract creation for the specified account keys in the\u00a0accountKeys list does not work as expected.\nerrors\n\nString\n\n\nList containing one or more error messages about one or more failed cost contract creations.\nReturned when the new contract creation for the specified account keys in the\u00a0accountKeys list fails.\nExamples\nRequest\n\n    \n\nResponse\n\n    \n\n\u00a0Response in case of an error\n\n    \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Account management API","lvl2":"Manage cost contracts","lvl3":"Add cost contracts"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/account-management-api","lvl2":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts","lvl3":"\/pt\/account-management-api\/manage-cost-contracts\/addcostcontracts"},"levels":4,"category":"","category_color":"","tags":["contracts"]},"articleFiles":{"625361236.json":"<p alt=\"\">625361236.json<\/p>","1810172725.json":"<p alt=\"\">1810172725.json<\/p>","2130906226.json":"<p alt=\"\">2130906226.json<\/p>"}}
