{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d1a82af8-4376-47e0-96f4-d49038c82bc4","name":"Simpaisa REST APIs","description":"# Simpaisa's REST APIs\n\nSimpaisa’s APIs _(Application Programming Interfaces)_ power its platform for communications. Behind these APIs is a software layer connecting payment channels around Pakistan to allow you to charge your users for the offered services\n\n# What’s a REST API?\n\nAn API is an application programming interface - in short, it’s a set of rules that lets programs talk to each other, exposing data and functionality across the internet in a consistent format.\n\nREST stands for _Representational State Transfer_. This is an architectural pattern that describes how distributed systems can expose a consistent interface. When people use the term ‘REST API,’ they are generally referring to an API accessed via HTTP protocol at a predefined set of URLs.\n\nThese URLs represent various resources - any information or content accessed at that location, which can be returned as JSON, HTML, audio files, or images. Often, resources have one or more methods that can be performed on them over HTTP, like GET, POST, PUT and DELETE.\n\nSimpaisa, for example, provides many separate REST APIs for charging customers, through their SIM credit or wallet account or credit card. And also bank transfer. In Simpaisa’s ecosystem, each payment channel is a product which has its own API, but you will work with each of them in roughly the same way.\n\n# What are the supported billing types?\n\nSimpaisa offers two billing types; One-Time-Purchase (with and without token) & Recurring.\n\n## One-Time-Purchase\nWe occasionally hear from merchants who would like to set up a product that their customers can buy, but they don’t want that product to recur. Instead, they want the product to generate one charge to their customer, and that’s all.\n#### Call-Flow(M-Wallet)\n\n![alt text](https://www.linkpicture.com/q/callflowformwallets.png \"SimPaisa\")\n\n#### One-Time-Purchase(OTP-Flow-M-Wallet)\n![alt text](https://linkpicture.com/q/One-Time-Purchase-OTP-Flow.png \"SimPaisa\")\n\n#### Call-Flow(DCB)\n\n![alt text](https://www.linkpicture.com/q/callflowdcb.png \"SimPaisa\")\n\n## Recurring\nA recurring transaction is an agreement between a customer and our merchant providing services that essentially authorize the charging of periodic, automatic payments during a set amount of time. The transaction can be charged on a weekly, monthly & yearly basis.\n\nAll the recurring are controlled & scheduled by Simpaisa, as per the defined set of configurations for merchants' products/services. Which ease the implementation process for our merchants; as they don't have to worry about the renewal management & hitting their users timely.\n\n#### Call-Flow (M-Wallets)\n\n![alt text](https://www.linkpicture.com/q/recurringwallets.png \"SimPaisa\")\n\n#### Call-Flow (DCB)\n\n![alt text](https://www.linkpicture.com/q/recuuringdcb.png \"SimPaisa\")\n\n#### SimPaisa Base Recursion\n![alt text](https://www.linkpicture.com/q/Recursions.png \"SimPaisa\")\n\n#### Merchant Base Recursion\n![alt text](https://www.linkpicture.com/q/token.png \"SimPaisa\")\n\n# What are the other features, actually?\n\n## HE Authorization\n\nIn certain markets, Consumer identification can be carried out by fetching Consumer specific information such as MSISDN from HTTP request headers. Authorization with help of Header Enrichment allows you to build an even more seamless payment flow whereby user authorization can be carried out with one click only. \n*Note* that as Header Enrichment is not available for all payment channels, it is recommended that you always implement a PIN authorization flow as a fallback in case Header Enrichment authorization fails.\n\n\n## Free-Trial\n\nA free-trial is a handy way of letting your product/service sell itself. By opting for a free trial of your product, the customer gets a timebox for using your product - ranging from a day to a week or a month. A free trial lets users experience the product first-hand, understand its functionalities and see if the product delivers the right value for them before buying it.\nThe magic of a free-trial only helps simplify your acquisition process. This can be implemented by providing quality customer support, offering incentives (coupons, discounts, et cetera), and offering a smooth onboarding experience.\n\nNote that free-trial is not available for all payment channels. \n\n## Bucket\n\nBucket often looks like a free-trial strategy at the outset. However, it's about allowing users to enjoy premium services as paid users. If users fail to be charged due to insufficient amount, the users can still be hooked to the services & the system park the users in the bucket. On the backend, the system will keep on trying to charge the users for a defined period of time. And if they fail to be charged after maximum attempts, user's subscriptions will be discontinued.\n\n\nNote: Not applicable for M-wallets.\n\n\n## Retries\nOccasionally customers' payment may fail to be collected. If the customers' payment mode & account is still active, Simpaisa will be able to retry the payment until getting the successful charge in response or reaches maximum hits. Merchants will be sent the postback/callback for the successful charge or in case all hits are exhausted or subscription has been disabled by any other reason. \n\n    \n# URL Address\n\nURL address that you need to use to connect to `SimPaisa`:\n\n## Live\n### DCB\n`https://api.simpaisa.com`\n\n#### Wallets\n`https://wallets.simpaisa.com`\n\n#### Cards\n`https://payment.simpaisa.com`\n\n## Staging\n `https://staging.simpaisa.com`","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"12014193","team":1172417,"collectionId":"d1a82af8-4376-47e0-96f4-d49038c82bc4","publishedId":"TzCHAV4L","public":true,"publicUrl":"https://documenter-api.postman.tech/view/12014193/TzCHAV4L","privateUrl":"https://go.postman.co/documentation/12014193-d1a82af8-4376-47e0-96f4-d49038c82bc4","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.0","publishDate":"2021-03-24T15:03:38.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/398865f245569b34a5ed064e541ab11c9c9a708ea7e299bc7af0e4c630090f75","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/TzCHAV4L"}