{"id":46347,"date":"2017-02-28T11:40:11","date_gmt":"2017-02-28T06:10:11","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=46347"},"modified":"2017-03-02T18:06:21","modified_gmt":"2017-03-02T12:36:21","slug":"how-to-integrate-cheddargetter-in-your-subscription-module-blog-1-hosted-page-and-service-hook","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/how-to-integrate-cheddargetter-in-your-subscription-module-blog-1-hosted-page-and-service-hook\/","title":{"rendered":"How To Integrate CheddarGetter in Your Subscription Module? | Blog-1| Hosted Page and Service Hook"},"content":{"rendered":"<p><strong><span style=\"font-weight: 400;\">CheddarGetter provides a full-featured, easy-to-use billing &amp; subscription management system. CheddarGetter API enables you to leverage the full power of CheddarGetter directly into your subscription module. You can use these APIs with any programming language for recurring billing and subscription management.<\/span><\/strong><\/p>\n<p><strong><span style=\"font-weight: 400;\">In one of my projects, I have <a title=\"Java development services\" href=\"http:\/\/www.tothenew.com\/java-development-services\">used Java<\/a> to interact with CheddarGetter, but you can use Ruby, Python, PHP and C# to interact with CheddarGetter. CheddarGetter API utilizes\u00a0REST-like interface where method calls are made by sending <a href=\"http:\/\/www.tothenew.com\/java-development-services\">HTTP GET or POST requests<\/a>. Response data is returned in XML format. The response contains an HTTP status code of 200 for a successful request. A status code of 400 or greater is returned upon an adverse condition. That makes handling errors quite simple.<\/span><\/strong><\/p>\n<p><strong><b>Configuration:<\/b><\/strong><\/p>\n<p><strong><b> <span style=\"font-weight: 400;\">To integrate your\u00a0subscription module with <\/span><span style=\"font-weight: 400;\">CheddarGetter<\/span><span style=\"font-weight: 400;\"> you will go to the <\/span><span style=\"font-weight: 400;\">https:\/\/cheddargetter.com<\/span><span style=\"font-weight: 400;\">\u00a0and need to follow \u00a0below steps:<\/span><br \/>\n<\/b><\/strong><\/p>\n<p><strong><b>1. Sign-up in CheddarGetter:<br \/>\n<span style=\"font-weight: 400;\">At first, you need to sign-up in CheddarGetter with a valid email id.\u00a0After sign-up you will receive a verification link in your registered email, after clicking on that link, verification will be done and you would get redirected to product setup page.<\/span><\/b><\/strong><\/p>\n<p><strong><b><span style=\"font-weight: 400;\"> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46437 \" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/Screenshot-from-2017-02-22-16-56-41-300x139.png\" alt=\"Sign-up in CheddarGetter\" width=\"337\" height=\"156\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/Screenshot-from-2017-02-22-16-56-41-300x139.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/Screenshot-from-2017-02-22-16-56-41-624x289.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/Screenshot-from-2017-02-22-16-56-41.png 1017w\" sizes=\"(max-width: 337px) 100vw, 337px\" \/><br \/>\n<\/span><\/b><\/strong><\/p>\n<p><b style=\"font-size: 1rem;\">2. Product setup:<br \/>\n<\/b>To setup your own product in CheddarGetter, you have to specify a product name.<\/p>\n<p><strong><b><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46421\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/prod_name-300x146.png\" alt=\"CheddarGetter\" width=\"337\" height=\"164\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/prod_name-300x146.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/prod_name-1024x500.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/prod_name-624x304.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/prod_name.png 1283w\" sizes=\"(max-width: 337px) 100vw, 337px\" \/><br \/>\n<span style=\"font-weight: 400;\">After specifying the product name CheddarGetter automatically creates a product code and secret key through which you can link up your subscription module with CheddarGetter, you can see that information in \u201cConfiguration\u201d-&gt;\u201dProduct Settings\u201d tab in CheddarGetter. You can specify more product related setting here as per your requirement.<\/span><br \/>\n<\/b><\/strong><\/p>\n<p><b>3. Pricing Plan:<br \/>\n<\/b><strong style=\"font-size: 1rem;\"><b><strong><span style=\"font-weight: 400;\">Here you can specify different types of pricing plan as per your product requirement. Pricing Plans tell CheddarGetter how much your customers pay, how often, and what they get in return. To configure pricing plan manually you have to go \u201cConfiguration\u201d \u2192 \u201cPricing Plan\u201d, here you can create a new plan or edit any existing plan.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46423\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pricing_plan-300x174.png\" alt=\"Setting up pricing_plan in CheddarGetter\" width=\"346\" height=\"201\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pricing_plan-300x174.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pricing_plan-624x363.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pricing_plan.png 995w\" sizes=\"(max-width: 346px) 100vw, 346px\" \/><br \/>\n<\/span><\/strong><\/b><\/strong><\/p>\n<p><b>4. Billing Solution:<br \/>\n<\/b><strong style=\"font-size: 1rem;\"><b><strong><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\">In Billing Solution, you have to specify the method to process the customer payment that is Paypal or Credit-Card or both.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46424\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/billing_sol-300x195.png\" alt=\"CheddarGetter billing_sol\" width=\"335\" height=\"217\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/billing_sol-300x195.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/billing_sol-1024x667.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/billing_sol-624x406.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/billing_sol.png 1028w\" sizes=\"(max-width: 335px) 100vw, 335px\" \/><\/span><\/strong><\/span><\/strong><\/b><\/strong><\/p>\n<p><b>5. Integration:<br \/>\n<\/b>You can integrate CheddarGetter with your site using CheddarGetter&#8217;s API, Hosted Payment Pages, or a combination of the both. Here you can specify your own custom curl request or specify custom hosted payment page. Here I\u2019m specifying to integrate CheddarGetter with your subscription module using \u201cHosted Page\u201d and \u201cWeb Hooks\u201d.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46428\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/inte-300x205.png\" alt=\"CheddarGetter Integration\" width=\"327\" height=\"223\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/inte-300x205.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/inte-624x426.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/inte.png 988w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/><br \/>\n<strong><span style=\"font-weight: 400;\">Hosted Page is a payment page provide by CheddarGetter where a user can subscribe, or any existing user can renew his\/her subscription by providing credit card details or through <\/span><span style=\"font-weight: 400;\">PayPal<\/span><span style=\"font-weight: 400;\">.<\/span><\/strong><\/p>\n<p><b>Other Configurations:<br \/>\n<\/b>After quick setup few more things need to configure manually in CheddarGetter, for the betterment of your subscription module:<\/p>\n<p><b>1. Product Settings:<br \/>\n<\/b>To configure Product Settings manually you have to go to \u201cConfiguration\u201d \u2192 \u201cProduct Settings\u201d tab and specify the \u201cDunning Schedule\u201d as per your requirement. Here you need to specify the period in days for retrying when a transaction failed and how many times it will be retrying.\u00a0<strong><span style=\"font-weight: 400;\">You also need to configure \u201cSubscription Field\u201d as per your requirements and \u201cBill Reminder Event\u201d sends a reminder to the customer before the expiry of the plan.<br \/>\n<\/span><\/strong><\/p>\n<p><b>2. Promotions:<\/b><\/p>\n<p><b><strong><span style=\"font-weight: 400;\">Configuration \u2192 Promotions<\/span><\/strong><\/b><\/p>\n<p><strong><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\">Promotions are the best thing ever. You can use Promotions to increase demand and differentiate your product. You can use incentives like discounts to drive up sales of any given product. You can create a new promotion or modify the existing promotion or you can delete a promotion from \u201cConfiguration\u201d \u2192 \u201cPromotions\u201d tab. To create a new promotion you have to specify these mandatory fields: coupon name, description, incentive type, discount amount, coupon validity duration, coupon code through which customer applied for the discount. Remaining fields are optional like \u201climit of redemptions\u201d by which you can set total redemption limit of that coupon, \u201ccoupon expiry date\u201d specifies the date after that it will be expired etc.<br \/>\n<\/span><\/strong><\/span><\/strong><\/p>\n<p><b>3. Customer Communication:<br \/>\n<\/b><\/p>\n<p>\u201cConfiguration\u201d \u2192 \u201cCustomer Communication\u201d.<\/p>\n<p>Using this feature of CheddarGetter we can communicate with our customers through email for several activities like New Subscription, Subscription Change, Bill Reminder etc. We can customize that entire facility, for any particular service we can enable or disable the email notification, email subject, body etc.<\/p>\n<p><b>4. Service Hooks:<br \/>\n<\/b><\/p>\n<p><strong style=\"font-size: 1rem;\"><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\">\u201cConfiguration\u201d \u2192 \u201cService Hooks\u201d.<\/span><\/strong><\/span><\/strong><\/span><\/strong><\/p>\n<p><strong style=\"font-size: 1rem;\"><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\">This is one of the most important <\/span><span style=\"font-weight: 400;\">features<\/span><span style=\"font-weight: 400;\"> of CheddarGetter. It allows you to use \u201cCustom URL\u201d facility of Service Hooks. When the Custom URL service hook is enabled, CheddarGetter sends HTTP POST data to the URL when various events occur in CheddarGetter. Here we have to specify our listener URL and services. If any activity\/service is performed which is mentioned in Selected list CheddarGetter send HTTP POST request to your specified custom URL. You can create more than one \u201cCustom URL Hook\u201d as per your need and enable and disable them.<\/span><\/strong><\/span><\/strong><\/span><\/strong><\/p>\n<p><strong><span style=\"font-weight: 400;\"><strong><span style=\"font-weight: 400;\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-46432\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/cus_url-300x239.png\" alt=\"custom_url\" width=\"333\" height=\"265\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/cus_url-300x239.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/cus_url-624x497.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/cus_url.png 725w\" sizes=\"(max-width: 333px) 100vw, 333px\" \/><\/span><\/strong><\/span><\/strong><\/p>\n<p><b>Sample Code to Handle Service Hooks:<\/b><\/p>\n<p>@RequestMapping(value = &#8220;activity&#8221;, method = RequestMethod.POST)<br \/>\n<span style=\"font-size: 1rem;\">@ResponseBody<\/span><\/p>\n<p><span style=\"font-size: 1rem;\">public void activity(HttpEntity&lt;String&gt; httpEntity) {<br \/>\n<\/span>ResponseDTO responseDTO = new ResponseDTO(false);<br \/>\n<span style=\"font-size: 1rem;\">Map&lt;String, Object&gt; jsonMap = validatedRequestJson(httpEntity);<br \/>\n<\/span><span style=\"font-size: 1rem;\">if (jsonMap != null) {<br \/>\n<\/span><span style=\"font-size: 1rem;\">if (jsonMap.containsKey(&#8220;activityType&#8221;)) {<\/span><\/p>\n<p>ActivityType activityType = ActivityType.findByValue(jsonMap.get(&#8220;activityType&#8221;).toString());<br \/>\nif (activityType != null) {<br \/>\nswitch (activityType) {<br \/>\ncase &#8220;newSubscription&#8221;:<br \/>\nresponseDTO = newSubscription(jsonMap);<br \/>\nbreak;<br \/>\ncase &#8220;subscriptionChanged&#8221;:<br \/>\nresponseDTO = subscriptionChanged(jsonMap);<br \/>\nbreak;<br \/>\ncase &#8220;subscriptionCanceled&#8221;:<br \/>\nresponseDTO = subscriptionCanceled(jsonMap);<br \/>\nbreak;<br \/>\ncase &#8220;subscriptionReactivated&#8221;:<br \/>\nresponseDTO = subscriptionReactivated(jsonMap);<br \/>\nbreak;<br \/>\ncase &#8220;customerDeleted&#8221;:<br \/>\nresponseDTO = customerDeleted(jsonMap);<br \/>\nbreak;<br \/>\ncase &#8220;transaction&#8221;:<br \/>\nresponseDTO = transaction(jsonMap);<br \/>\nbreak;<br \/>\ndefault:<br \/>\nSystem.out.println(&#8220;ACTIVITY &lt;&#8221; + jsonMap.get(&#8220;activityType&#8221;) + &#8220;&gt; IS NOT RECOGNISED&#8221;);<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>Cheddargetter largely simplifies billing and subscription processes. Moreover, it has a\u00a0<a title=\"Front-end development services\" href=\"http:\/\/www.tothenew.com\/front-end-angularjs-development\">mobile friendly interface<\/a> that enables you to check critical metrics anytime, anywhere and it also provides for real-time updates about your business.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CheddarGetter provides a full-featured, easy-to-use billing &amp; subscription management system. CheddarGetter API enables you to leverage the full power of CheddarGetter directly into your subscription module. You can use these APIs with any programming language for recurring billing and subscription management. In one of my projects, I have used Java to interact with CheddarGetter, but [&hellip;]<\/p>\n","protected":false},"author":1068,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1},"categories":[1],"tags":[4487,4486],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46347"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1068"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=46347"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46347\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=46347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=46347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=46347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}