{"id":191,"date":"2020-08-10T18:43:45","date_gmt":"2020-08-10T18:43:45","guid":{"rendered":""},"modified":"2021-06-09T15:09:31","modified_gmt":"2021-06-09T15:09:31","slug":"ccbill-api-direct-discount-api","status":"publish","type":"post","link":"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api","title":{"rendered":"CCBill API: Direct Discount\u00a0API"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"Introduction\">Introduction<\/h2>\n\n\n\n<p>This document is issued as an addendum to the CCBill API documentation and discusses subscription discounting functionality. This document is written for developers, technicians, and others with advanced coding skills.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Overview\">Overview<\/h2>\n\n\n\n<p>CCBill has added calls to the CCBill API that allow users to discount subscriptions as an additional tool for consumer retention. The same functionality has been added to the CCBill Admin Portal for those who cannot access the system via the API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Exclusions\">Exclusions<\/h2>\n\n\n\n<p>Parameters that are always required (such as clientAccnum, username, password, etc.) are excluded from this chart and are discussed in the main <a href=\"https:\/\/ccbill.com\/doc\/ccbill-api-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">CCBill API<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"discountSubscription\">discountSubscription<\/h2>\n\n\n\n<p>The discountSubscription call allows you to discount the subscription by a set amount or an entirely new recurring price, depending on the parameters sent with the call.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Discount_by_Amount\">Discount by&nbsp;Amount<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"Required_X_and_Optional_O_Parameters\">Required (X) and Optional (O)&nbsp;Parameters<\/h4>\n\n\n\n<figure id=\"wpfancytable1\" class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>discountSubscription<\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\">clientSubacc<\/th><th class=\"has-text-align-center\" data-align=\"center\">usingSubacc<\/th><th class=\"has-text-align-center\" data-align=\"center\">subscriptionId<\/th><th class=\"has-text-align-center\" data-align=\"center\">returnXML<\/th><th class=\"has-text-align-center\" data-align=\"center\">dicsountAmount<\/th><\/tr><\/thead><tbody><tr><td>Main Account<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Main Account w\/XML<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Subaccount<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Subaccount w\/XML<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"CSV_VERSION_EXAMPLE\">CSV VERSION&nbsp;EXAMPLE<\/h3>\n\n\n\n<p><strong>Request String<\/strong><\/p>\n\n\n\n<pre id=\"codebox1\" class=\"wp-block-preformatted\">https:\/\/datalink.ccbill.com\/utils\/subscriptionManagement.cgi?clientAccnum=900112&amp;clientSubacc=0000&amp;username=yourUsername&amp;password=yourPassword&amp;discountAmount=2.00&amp;action=discountSubscription&amp;subscriptionId=1113346401000000080<\/pre>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<pre id=\"codebox2\" class=\"wp-block-preformatted\">\"results\" \n\"-10\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"XML_VERSION_EXAMPLE\">XML VERSION&nbsp;EXAMPLE<\/h3>\n\n\n\n<p><strong>Request String<\/strong><\/p>\n\n\n\n<pre id=\"codebox3\" class=\"wp-block-preformatted\">https:\/\/datalink.ccbill.com\/utils\/subscriptionManagement.cgi?clientAccnum=900112&amp;clientSubacc=0000&amp;username=yourUsername&amp;password=yourPassword&amp;discountAmount=2.00&amp;action=discountSubscription&amp;subscriptionId=1113346401000000080&amp;returnXML=1<\/pre>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<pre id=\"codebox4\" class=\"wp-block-preformatted\">&lt;?xml version=\"1.0\" standalone=\"true\"?&gt;\n&lt;results&gt;-10&lt;\/results&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Set_New_Recurring_Price\">Set New Recurring&nbsp;Price<\/h2>\n\n\n\n<figure id=\"wpfancytable2\" class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>discountSubscription<\/strong><\/th><th class=\"has-text-align-center\" data-align=\"center\">clientSubacc<\/th><th class=\"has-text-align-center\" data-align=\"center\">usingSubacc<\/th><th class=\"has-text-align-center\" data-align=\"center\">subscriptionId<\/th><th class=\"has-text-align-center\" data-align=\"center\">returnXML<\/th><th class=\"has-text-align-center\" data-align=\"center\">newRecurringPrice<\/th><\/tr><\/thead><tbody><tr><td>Main Account<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Main Account w\/XML<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Subaccount<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\"><\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><tr><td>Subaccount w\/XML<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">O<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><td class=\"has-text-align-center\" data-align=\"center\">X<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"CSV_VERSION_EXAMPLE_2\">CSV VERSION&nbsp;EXAMPLE<\/h3>\n\n\n\n<p><strong>Request String<\/strong><\/p>\n\n\n\n<pre id=\"codebox5\" class=\"wp-block-preformatted\">https:\/\/datalink.ccbill.com\/utils\/subscriptionManagement.cgi?clientAccnum=900112&amp;clientSubacc=0000&amp;username=yourUsername&amp;password=yourPassword&amp;newRecurringPrice=18.95&amp;action=discountSubscription&amp;subscriptionId=1113346401000000080<\/pre>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<pre id=\"codebox6\" class=\"wp-block-preformatted\">\"results\" \n\"-10\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"XML_VERSION_EXAMPLE_2\">XML VERSION&nbsp;EXAMPLE<\/h3>\n\n\n\n<p><strong>Request String<\/strong><\/p>\n\n\n\n<pre id=\"codebox7\" class=\"wp-block-preformatted\">https:\/\/datalink.ccbill.com\/utils\/subscriptionManagement.cgi?clientAccnum=900112&amp;clientSubacc=0000&amp;username=yourUsername&amp;password=yourPassword&amp;newRecurringPrice=18.95&amp;action=discountSubscription&amp;subscriptionId=1113346401000000080&amp;returnXML=1<\/pre>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<pre id=\"codebox8\" class=\"wp-block-preformatted\">&lt;?xml version=\"1.0\" standalone=\"true\"?&gt;\n&lt;results&gt;-10&lt;\/results&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Information_Returned\">Information Returned<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Error_Codes\">Error Codes<\/h3>\n\n\n\n<figure id=\"wpfancytable3\" class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>Code<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>More Information<\/strong><\/th><\/tr><\/thead><tbody><tr><td>-2<\/td><td>The subscription ID provided was invalid or the subscription type is not supported by the requested action.<\/td><td>A new recurring price cannot be passed in for a non-recurring subscription.<\/td><\/tr><tr><td>-18<\/td><td>Recurring price is less than the minimum allowable.<\/td><td>A discount cannot be added to any subscription that will result in a price lower than 5.00 units (currency notwithstanding).<\/td><\/tr><tr><td>-19<\/td><td>Discount amount is less than the minimum allowable.<\/td><td>The discount amount cannot be less than 0.01 units (currency notwithstanding).<\/td><\/tr><tr><td>-20<\/td><td>The New recurring price is greater than the subscription recurring price.<\/td><td>The system cannot process a discount that results in a higher price than the current subscription.<\/td><\/tr><tr><td>-21<\/td><td>Cannot replace cancel discount with a smaller amount.<\/td><td>The system cannot process a discount with this function that DOES NOT result in a lower subscription price than an already existing cancel discount.<\/td><\/tr><tr><td>-22<\/td><td>This subscription is not eliigible for a discount.<\/td><td>Discounts can only be applied to an Active trial or an Active recurring subscription.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Version_History\">Version History<\/h2>\n\n\n\n<figure id=\"wpfancytable4\" class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Version<\/th><th>Date<\/th><th>Change Log<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>1.16.2014<\/td><td>New CCBill API Call Documentation.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This document is issued as an addendum to the CCBill API documentation and discusses...<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"kk_blocks_editor_width":"","_kiokenblocks_attr":"","_kiokenblocks_dimensions":"","footnotes":""},"categories":[29],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-api-documentation"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CCBill Merchant Knowledge Base | CCBill API: Direct Discount API<\/title>\n<meta name=\"description\" content=\"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CCBill Merchant Knowledge Base | CCBill API: Direct Discount API\" \/>\n<meta property=\"og:description\" content=\"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api\" \/>\n<meta property=\"og:site_name\" content=\"CCBill Doc\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-10T18:43:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-09T15:09:31+00:00\" \/>\n<meta name=\"author\" content=\"Goran Jevtic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Goran Jevtic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api\",\"url\":\"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api\",\"name\":\"CCBill Merchant Knowledge Base | CCBill API: Direct Discount API\",\"isPartOf\":{\"@id\":\"https:\/\/ccbill.com\/doc\/#website\"},\"datePublished\":\"2020-08-10T18:43:45+00:00\",\"dateModified\":\"2021-06-09T15:09:31+00:00\",\"author\":{\"@id\":\"https:\/\/ccbill.com\/doc\/#\/schema\/person\/07053eea9e71524817d8c51f00e49547\"},\"description\":\"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ccbill.com\/doc\/#website\",\"url\":\"https:\/\/ccbill.com\/doc\/\",\"name\":\"CCBill Doc\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ccbill.com\/doc\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ccbill.com\/doc\/#\/schema\/person\/07053eea9e71524817d8c51f00e49547\",\"name\":\"Goran Jevtic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/doc\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2f1f69525606d377dbc5663dc0499431?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2f1f69525606d377dbc5663dc0499431?s=96&d=mm&r=g\",\"caption\":\"Goran Jevtic\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CCBill Merchant Knowledge Base | CCBill API: Direct Discount API","description":"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api","og_locale":"en_US","og_type":"article","og_title":"CCBill Merchant Knowledge Base | CCBill API: Direct Discount API","og_description":"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.","og_url":"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api","og_site_name":"CCBill Doc","article_published_time":"2020-08-10T18:43:45+00:00","article_modified_time":"2021-06-09T15:09:31+00:00","author":"Goran Jevtic","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Goran Jevtic","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api","url":"https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api","name":"CCBill Merchant Knowledge Base | CCBill API: Direct Discount API","isPartOf":{"@id":"https:\/\/ccbill.com\/doc\/#website"},"datePublished":"2020-08-10T18:43:45+00:00","dateModified":"2021-06-09T15:09:31+00:00","author":{"@id":"https:\/\/ccbill.com\/doc\/#\/schema\/person\/07053eea9e71524817d8c51f00e49547"},"description":"CCBill has added calls to SMS that allow users to discount subscriptions as an additional tool for consumer retention.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ccbill.com\/doc\/ccbill-api-direct-discount-api"]}]},{"@type":"WebSite","@id":"https:\/\/ccbill.com\/doc\/#website","url":"https:\/\/ccbill.com\/doc\/","name":"CCBill Doc","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ccbill.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ccbill.com\/doc\/#\/schema\/person\/07053eea9e71524817d8c51f00e49547","name":"Goran Jevtic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/doc\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2f1f69525606d377dbc5663dc0499431?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2f1f69525606d377dbc5663dc0499431?s=96&d=mm&r=g","caption":"Goran Jevtic"}}]}},"_links":{"self":[{"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/posts\/191"}],"collection":[{"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":2,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":3876,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/posts\/191\/revisions\/3876"}],"wp:attachment":[{"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ccbill.com\/doc\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}