{"title":"Add cost contract","category":"default","creationDate":1776961629,"content":"<h2 id=\"addcostcontract-request-fields\">Request parameters<\/h2>\n<p>To add a new cost contract entry associated with an account key, make a POST <code>\/addCostContract<\/code> request specifying:  <\/p>\n<table><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>accountKey<\/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>\n<p>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=\"addcostcontract-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 the response is successful and a new contract is created.<\/td><\/tr><tr><td>\n<p><code>warnings<\/code><\/p>\n<\/td><td>\n<p>Array<\/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>List containing one or more warning messages.<br \/>\nReturned when the request is not correctly processed.<\/p>\n<\/td><\/tr><tr><td>\n<p><code>errors<\/code><\/p>\n<\/td><td>\n<p>Array<\/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>List containing one or more error messages.<br \/>\nReturned when the request fails.<\/p>\n<\/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=\"'214761486'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n   \\\"accountKey\\\":\\\"MerchantAccount.TestMerchant\\\",\\n   \\\"costContractName\\\":\\\"merchantDemoContract\\\",\\n   \\\"startMonth\\\":3,\\n   \\\"startYear\\\":2016\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"\\u00a0&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;\\n  &lt;soap:Body&gt;\\n    &lt;addCostContract xmlns=\\\"http:\\\/\\\/caaccount.services.adyen.com\\\"&gt;\\n      &lt;request&gt;\\n        &lt;accountKey&gt;MerchantAccount.TestMerchant&lt;\\\/accountKey&gt;\\n        &lt;costContractName&gt;merchantDemoContract&lt;\\\/costContractName&gt;\\n        &lt;startMonth&gt;3&lt;\\\/startMonth&gt;\\n        &lt;startYear&gt;2016&lt;\\\/startYear&gt;\\n      &lt;\\\/request&gt;\\n    &lt;\\\/addCostContract&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=\"'1989102402'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{ \\n   \\\"pspReference\\\":\\\"9914527653010792\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&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:addCostContractResponse&gt;\\n      &lt;ns0:response&gt;\\n        &lt;ns0:pspReference&gt;9914527653010792&lt;\\\/ns0:pspReference&gt;\\n      &lt;\\\/ns0:response&gt;\\n    &lt;\\\/ns0:addCostContractResponse&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\\u00a0\"}]' :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\">Response in case of an error<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'1818680747'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{  \\n  \\\"pspReference\\\":\\\"9914140627430128\\\",\\n  \\\"errors\\\":[  \\n    \\\"failed: startMonth should be at least next month\\\"\\n  ]\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&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:addCostContractResponse&gt;\\n      &lt;ns0:response&gt;\\n        &lt;ns0:errors&gt;\\n          &lt;ns0:string&gt;failed: startMonth should be at least next month&lt;\\\/ns0:string&gt;\\n        &lt;\\\/ns0:errors&gt;\\n        &lt;ns0:pspReference&gt;9914140627430128&lt;\\\/ns0:pspReference&gt;\\n      &lt;\\\/ns0:response&gt;\\n    &lt;\\\/ns0:addCostContractResponse&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>","url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/addcostcontract","articleFields":{"id":"25134957","type":"page","description":"Create a new cost contract for an account key.","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/addcostcontract","title":"Add cost contract","content":"Request parameters\nTo add a new cost contract entry associated with an account key, make a POST \/addCostContract request specifying:  \nNameTypeRequiredDescriptionNotes\naccountKey\n\nString\n\n\n\nUnique 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 the response is successful and a new contract is created.\nwarnings\n\nArray\n\n\n\nList containing one or more warning messages.\nReturned when the request is not correctly processed.\n\nerrors\n\nArray\n\n\n\nList containing one or more error messages.\nReturned when the request fails.\n\nExamples\nRequest\n\n    \n\nResponse\n\n    \n\nResponse 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 contract"},"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\/addcostcontract"},"levels":4,"category":"","category_color":"","tags":["contract"]},"articleFiles":{"214761486.json":"<p alt=\"\">214761486.json<\/p>","1818680747.json":"<p alt=\"\">1818680747.json<\/p>","1989102402.json":"<p alt=\"\">1989102402.json<\/p>"}}
