{"id":4656,"date":"2021-10-22T15:30:35","date_gmt":"2021-10-22T10:00:35","guid":{"rendered":"https:\/\/cashfree.com\/blog\/?p=4656"},"modified":"2023-01-17T12:12:19","modified_gmt":"2023-01-17T06:42:19","slug":"next-gen-apis-payment-solutions","status":"publish","type":"post","link":"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/","title":{"rendered":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #005c31;color:#005c31\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #005c31;color:#005c31\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Why_We_Needed_To_Redesign_Our_APIs\" >Why We Needed To Redesign Our APIs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Starting_Small_Focusing_On_Payment_Gateway_APIs\" >Starting Small: Focusing On Payment Gateway APIs<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Setting_Standards_For_API_Design\" >Setting Standards For API Design<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Landscape_Change_In_Payment_Instruments_in_India\" >Landscape Change In Payment Instruments in India<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Why_We_Chose_To_Create_Opinionated_APIs\" >Why We Chose To Create Opinionated APIs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Dogfooding_Our_Own_APIs\" >Dogfooding Our Own APIs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Ensuring_a_Friction_Free_Migration\" >Ensuring a Friction Free Migration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#Built_and_Iterate_Fast_Shipping_Products_Faster\" >Built and Iterate Fast: Shipping Products Faster<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/#More_than_just_an_API_The_Way_Forward\" >More than just an API: The Way Forward<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">Business applications and softwares have come a long way since the early and late 2000s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, they\u2019re in <strong>stark<\/strong> contrast to the outdated clunky and incoherent tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Interestingly, we have witnessed the emergence of B2B API-first companies during this time.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We, at Cashfree Payments, consider ourselves to be a part of that bunch.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, we will detail how our APIs evolved with our customer needs <em>AND<\/em><strong><em> <\/em><\/strong><strong>just what went into creating them.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.cashfree.com\/docs\/api-integration?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Mw62_JlQgdG_rQ08Rt0Hw-eCnpI_DUef4IbGIpwWzO-9w_we3LEPAGsPE9xzCtixT2Rlrra4akiztBe8ijZH7_VlP670Lp7stJP26tzDWJFnDCaP0wA8n7RNzJDP9n_fJP6yqRs1=s1600\" alt=\"Building Next-Generation APIs for Payment Solutions: API payment Gateway\"\/><\/a><figcaption class=\"wp-element-caption\">Click the image to check out our new API integration<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-we-needed-to-redesign-our-apis\"><span class=\"ez-toc-section\" id=\"Why_We_Needed_To_Redesign_Our_APIs\"><\/span>Why We Needed To Redesign Our APIs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In 2015, Cashfree Payments emerged by making bulk payouts extremely simple for dozens of consumer applications.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Related Read: <\/strong>An Exhaustive Guide On <a href=\"https:\/\/cashfree.com\/blog\/bulk-payment\/?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\">Bulk Payment<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Over the next five years, we added new products and many more features.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the end, those initial few thousand lines of code turned into several hundred thousand lines.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The catalyst for the same was the rapid evolution of the payment landscape and our customers\u2019 expectations.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We realized that we were facing major roadblocks. For instance:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Our APIs had become rigid and intractable for different use cases.&nbsp;<\/li>\n\n\n\n<li>We did not have any standard API practice across various products.&nbsp;<\/li>\n\n\n\n<li>We needed to create an API for <a href=\"https:\/\/cashfree.com\/blog\/upi-integration\/?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\">UPI integration<\/a> that was scaleable. The payment flow for UPI is unlike any other instrument.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">And most importantly, this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With rapid progress, our API specifications started turning into <em>spaghetti code and thus making them hard to maintain.<\/em>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We knew that we needed to find a solution as soon as possible. The first step was figuring out our starting point.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-starting-small-focusing-on-payment-gateway-apis\"><span class=\"ez-toc-section\" id=\"Starting_Small_Focusing_On_Payment_Gateway_APIs\"><\/span>Starting Small: Focusing On Payment Gateway APIs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In retrospect, we realise that our APIs evolved with our company.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the earlier days, we decided that it was convenient to add a parameter to an existing API rather than asking users to restructure their integrations.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, in late 2020, we realized that we had to fundamentally change our approach and build something simpler and easier to use.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Naturally, we could not undertake the redesign of all our APIs. <strong>So we chose to focus on the payment gateway APIs.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But before we could move forward, we had two major factors to consider.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-setting-standards-for-api-design\"><span class=\"ez-toc-section\" id=\"Setting_Standards_For_API_Design\"><\/span>Setting Standards For API Design<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first factor we needed to consider while designing our API was <strong>Standardization.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At Cashfree Payments, all products are owned by independent teams.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, every team is responsible for their API and its vertical integration with other services. This means that we did not have a standard API design practice at Cashfree Payments.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"770\" height=\"467\" data-attachment-id=\"4695\" data-permalink=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/striving-for-api-standarization-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?fit=1200%2C728&amp;ssl=1\" data-orig-size=\"1200,728\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Striving-for-API-standarization-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?fit=770%2C467&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/cashfree.com\/blog\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2-1024x621.png?resize=770%2C467&#038;ssl=1\" alt=\"Building Next-Generation APIs for Payment Solutions\" class=\"wp-image-4695\" srcset=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?resize=1024%2C621&amp;ssl=1 1024w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?resize=300%2C182&amp;ssl=1 300w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?resize=768%2C466&amp;ssl=1 768w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Striving-for-API-standarization-2.png?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, while we wanted to set some API standards, <strong>we did not want other teams to be restricted to our opinions.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Setting an org-wide standard is always hard. Moreover, in our case, it took a lot of social capital to get alignment from everyone.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After a lot of brainstorming, we were able to release a minimalistic set of API standards.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Armed with these minimal API standards, we started working on the <a href=\"https:\/\/docs.cashfree.com\/docs\/api-integration?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\">payment gateway APIs<\/a>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Given the evolution of the payment industry, we needed to build APIs that worked well for every use case.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-landscape-change-in-payment-instruments-in-india\"><span class=\"ez-toc-section\" id=\"Landscape_Change_In_Payment_Instruments_in_India\"><\/span>Landscape Change In Payment Instruments in India<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, here\u2019s another factor that deeply affected our design choices.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The payment landscape in India had changed completely after the growth of UPI.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Like we mentioned before, UPI has a completely different payment flow than cards or net banking.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At first, we aimed at moulding the API built for cards to support UPI. Resultantly, we were constrained and resorted to clever hacks.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This was not a scalable approach and we wanted to fix it.<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So we started this exercise with two engineers and one product manager. Our only objective was to make API integrations simple and easier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Over the next two months, we continuously iterated over the design choices for the new APIs. We looked at the standardizations built by companies like Stripe and Twilio among others.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/38NyL1EILhJTe5Rfi88HUytHBAttIoFboz2kQahaYq-GX7GTULY6HM7_OU8SMLazB0_mXmRK1FMU7nbzaC5Zd5zmkoZWwYWEYOaY0DuG2P-EO5mayvSa2aonxNFE1HTXol3BTIhI=s1600\" alt=\"Building Next-Generation APIs for Payment Solutions\"\/><figcaption class=\"wp-element-caption\">A sneak peak into our early discussions<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Cashfree serves thousands of merchants across industries. With a plethora of payment instruments and choices, we were biased towards <strong>making API choices<\/strong> which makes the standard integration painless for the merchant.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Speaking of which&#8230;<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-we-chose-to-create-opinionated-apis\"><span class=\"ez-toc-section\" id=\"Why_We_Chose_To_Create_Opinionated_APIs\"><\/span>Why We Chose To Create Opinionated APIs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the case of an opinionated API, the API creator makes some choices that are in her opinion the best. Needless to say, these choices affect the user of those APIs aka the developer.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, the payment landscape in India is fairly complex.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We have various payment instruments (cards, UPI, net banking, wallets and pay later)&nbsp;<\/li>\n\n\n\n<li>The boundary between offline and online payments has been slowly disappearing<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This heterogeneity makes it <strong>hard to build a standard API for all use cases without compromising on some edge cases<\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We deliberated on building a large set of flexible APIs for all use cases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But in the end, we choose to build opinionated APIs as we believe our choices make payments <strong>safer for our merchants<\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of these choices is reflected in the payload that we send back to the merchant\u2019s <em>return_url<\/em>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike most other gateways, we choose to make this very simple by adding only the order_id and order_token. To confirm a payment, the merchant has to query our \/orders\/:order_id API.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This small choice can actually help prevent bugs and mistakes from causing any financial loss to merchants. In the older APIs, we used to send order_status and <em>checksum<\/em> in the return_url.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, this could have been potentially misused by an adversary leading to financial loss for the merchant.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Evidently, as a <a href=\"https:\/\/cashfree.com\/blog\/payment-aggregator\/?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\">payment aggregator<\/a>, payment security is our utmost priority.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-dogfooding-our-own-apis\"><span class=\"ez-toc-section\" id=\"Dogfooding_Our_Own_APIs\"><\/span>Dogfooding Our Own APIs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We decided to use our new APIs within our javascript and mobile SDKs.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dogfooding our own APIs helped us understand them from the merchant\u2019s perspective.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"770\" height=\"444\" data-attachment-id=\"4696\" data-permalink=\"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/dogfoodingai-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?fit=1200%2C693&amp;ssl=1\" data-orig-size=\"1200,693\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Dogfoodingai-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?fit=770%2C444&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/cashfree.com\/blog\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3-1024x591.png?resize=770%2C444&#038;ssl=1\" alt=\"Building Next-Generation APIs for Payment Solutions\" class=\"wp-image-4696\" srcset=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?resize=1024%2C591&amp;ssl=1 1024w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?resize=300%2C173&amp;ssl=1 300w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?resize=768%2C444&amp;ssl=1 768w, https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/Dogfoodingai-3.png?w=1200&amp;ssl=1 1200w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It also helped us weed out small but relevant bugs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the end of the day, we want all our SDKs to consume the same APIs we deliver to merchants.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This helps us keep a <strong>common denominator for all our abstractions<\/strong> (SDKs, etc.), making it possible to build disparate payment flows from these common APIs.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This also helps us structure our teams and a single team can take care of all external facing APIs. We avoid building custom solutions for any specific platform, helping maintain our APIs in the long run.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While we used our APIs extensively, the real challenge was to ensure that merchants try them out. Ensuring an effortless migration was one of our foremost design principles.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ensuring-a-friction-free-migration\"><span class=\"ez-toc-section\" id=\"Ensuring_a_Friction_Free_Migration\"><\/span>Ensuring a Friction Free Migration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we started working on the API design, it became easy to get caught up in pursuing pure solutions.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>However, pure solutions don\u2019t matter much if they cannot readily be used by others.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, we offered our merchants a choice.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>They could use the new APIs alongside the existing APIs.<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way a merchant could move one API at a time without any hassle. As merchants did not have to do a full-blown migration, the switching cost was minimal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our adoption metrics for existing merchants clearly showed that most of them migrated only one specific API in the beginning. Slowly moving other APIs<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-built-and-iterate-fast-shipping-products-faster\"><span class=\"ez-toc-section\" id=\"Built_and_Iterate_Fast_Shipping_Products_Faster\"><\/span>Built and Iterate Fast: Shipping Products Faster<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the challenges with any big project is the scope of the work.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It was never possible for us to fit all use cases in the first iteration of the API.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We consciously added limited flows in our first release, so we could <strong>ship the product faster<\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We also knew that <em>some of our decisions were bound to be subjective<\/em>. In those cases, we made a choice and went ahead with it.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, we could say that the words of Voltaire acted as a guiding principle for our project:&nbsp; <em>\u201cDo not let the perfect be the enemy of the good\u201d.&nbsp;<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-more-than-just-an-api-the-way-forward\"><span class=\"ez-toc-section\" id=\"More_than_just_an_API_The_Way_Forward\"><\/span>More than just an API: The Way Forward<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Just like most payment companies, our APIs are built with increasing complexity so that our merchants could have the easiest integration experience. What\u2019s more, our tech queries have decreased significantly because of the simplicity of the new API integration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, our work on these APIs has just started and we still have a long way to go.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For instance one of the most critical parts of an API product is how we help users overcome errors in real-time. While we have built automated workflows to help users here, we still have a lot of ground to cover.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>As the payment landscape evolves, so will our APIs.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All in all, this exercise gave us great insight into building something radical while doing away with systems that <strong>work but don\u2019t scale<\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Did our story interest you?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are lots more to come!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact, you can be a part of our story while we build payment solutions for the next generation of businesses.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.cashfree.com\/careers?utm_source=blog&amp;utm_medium=organic&amp;utm_campaign=next_gen_apis_payments_blog\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/OIDA8bXqR2ouVl8h1NuErOg7E8KY7LU8Ej6jNIRzJovhIR3BpV1IGdy2Npwz78DtP85fRa2f9wIRN2IdpxAYIEgluGu9l48JJ1lioW6rRnMzSwAMNKQjFQ9oFuME7Y1SHixikGXI=s1600\" alt=\"Building Next-Generation APIs for Payment Solutions cta \"\/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Business applications and softwares have come a long way since the early and late 2000s. In fact, they\u2019re in stark contrast to the outdated clunky and incoherent tools. Interestingly, we have witnessed the emergence of B2B API-first companies during this time.&nbsp; We, at Cashfree Payments, consider ourselves to be a part of that bunch.&nbsp; In<\/p>\n","protected":false},"author":28,"featured_media":7148,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_themeisle_gutenberg_block_has_review":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1,1497],"tags":[1522,1737],"class_list":["post-4656","post","type-post","status-publish","format-standard","has-post-thumbnail","category-all","category-engineering","tag-cashfree-payments","tag-tech-stories"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story<\/title>\n<meta name=\"description\" content=\"As Cashfree Payments evolved, so did our APIs. This is our story of building next gen APIs for payment solutions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story\" \/>\n<meta property=\"og:description\" content=\"As Cashfree Payments evolved, so did our APIs. This is our story of building next gen APIs for payment solutions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/\" \/>\n<meta property=\"og:site_name\" content=\"Cashfree Payments Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-22T10:00:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-17T06:42:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Raj Nandhan Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raj Nandhan Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story","description":"As Cashfree Payments evolved, so did our APIs. This is our story of building next gen APIs for payment solutions.","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:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/","og_locale":"en_US","og_type":"article","og_title":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story","og_description":"As Cashfree Payments evolved, so did our APIs. This is our story of building next gen APIs for payment solutions.","og_url":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/","og_site_name":"Cashfree Payments Blog","article_published_time":"2021-10-22T10:00:35+00:00","article_modified_time":"2023-01-17T06:42:19+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","type":"image\/png"}],"author":"Raj Nandhan Sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Raj Nandhan Sharma","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#article","isPartOf":{"@id":"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/"},"author":{"name":"Raj Nandhan Sharma","@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/078abcc2052fc24056283db9c38b3c81"},"headline":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story","datePublished":"2021-10-22T10:00:35+00:00","dateModified":"2023-01-17T06:42:19+00:00","mainEntityOfPage":{"@id":"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/"},"wordCount":1531,"commentCount":0,"image":{"@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","keywords":["cashfree payments","tech stories"],"articleSection":["All","Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogrevamp.cashfree.com\/next-gen-apis-payment-solutions\/","url":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/","name":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story","isPartOf":{"@id":"https:\/\/blogrevamp.cashfree.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#primaryimage"},"image":{"@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","datePublished":"2021-10-22T10:00:35+00:00","dateModified":"2023-01-17T06:42:19+00:00","author":{"@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/078abcc2052fc24056283db9c38b3c81"},"description":"As Cashfree Payments evolved, so did our APIs. This is our story of building next gen APIs for payment solutions.","breadcrumb":{"@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#primaryimage","url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","width":1200,"height":628,"caption":"next generation APIs"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cashfree.com\/blog\/next-gen-apis-payment-solutions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blogrevamp.cashfree.com\/"},{"@type":"ListItem","position":2,"name":"All","item":"https:\/\/blogrevamp.cashfree.com\/category\/all\/"},{"@type":"ListItem","position":3,"name":"Building Next-Generation APIs for Payment Solutions: A Cashfree Payments Story"}]},{"@type":"WebSite","@id":"https:\/\/blogrevamp.cashfree.com\/#website","url":"https:\/\/blogrevamp.cashfree.com\/","name":"Cashfree Payments Blog","description":"Cashfree Payments- Payment Gateway for India","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogrevamp.cashfree.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/078abcc2052fc24056283db9c38b3c81","name":"Raj Nandhan Sharma","url":"https:\/\/blogrevamp.cashfree.com\/author\/rajwpcashfreecom\/"}]}},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9MjXo-1d6","jetpack_likes_enabled":false,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2021\/10\/next-generation-APIs.png?fit=1200%2C628&ssl=1","_links":{"self":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/4656","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/comments?post=4656"}],"version-history":[{"count":11,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/4656\/revisions"}],"predecessor-version":[{"id":14079,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/4656\/revisions\/14079"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/media\/7148"}],"wp:attachment":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/media?parent=4656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/categories?post=4656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/tags?post=4656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}