{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"3c78cfb9-5cfa-433f-8cf3-863da8f06deb","name":"ERCASPAY DEVELOPER DOCUMENTATION","description":"Official API Documentation for ErcasPay V1 APIs\n\nArchitecture: REST\n\nData Format: JSON\n\nSandbox Base url: [https://api-staging.ercaspay.com/api/v1](https://api-staging.ercaspay.com/)\n\nLive Base url: [https://api.ercaspay.com/api/v1](https://)\n\n## Request Headers\n\n\\* Accept: This field is required & must always be set to application/json\n\n\\* Content-Type: This field is required & must always be set to application/json\n\n\\* Authorization: \\* The initiate transaction endpoint requires a key to authorize the request. \\* Authorization is a combination of Bearer and your secret key, e.g. Bearer ECRS-TEST-SKLVbpD1J7DG9fwwdyddcAkEysTKsYD564S1NDSUBS.\n\nKeys can be obtained from your ErcasPay dashboard under developer settings. Kindly ensure that your authorization keys are kept safe, secure & shared only when absolutely necessary.\n\n## Sample:\n\n``` json\n{\n    \"Accept\": \"application/json\",\n    \"Content-Type\":\" application/json\",\n    \"Authorization\":\"Bearer {{Your secret Key}}\n}\n\n ```\n\n## Response:\n\n``` json\n{\n    \"requestSuccessful\": true,\n    \"responseMessage\": \"success\",\n    \"responseCode\": \"success\",\n    \"responseBody\": []\n}\n\n ```\n\n| **Field** | **Type** | **Description** |\n| --- | --- | --- |\n| requestSuccessful | boolean | This indicates if the request was successful or not with a true or false response |\n| responseMessage | string | This can be any message attached to the transaction |\n| responseCode | string | This can be 'success', 'failed' or 'pending' |\n| responseBody | array | Contains relevant response data for the transaction |\n\n# Getting started\n\nTo get started, sign up on Ercas by visiting [https://ercaspay.com](https://ercaspay.com) and verify your account. In the meantime, you can still make integrations with our APIs in test mode, you'll be able to switch to live mode once your account has been approved.\n\n# **Authorization**\n\nThere are two \"modes\" of operation for your ErcasPay account:\n\n1. **Live Mode**: Real money, real transactions, real effects. Only switch to this after you've tested your integration thoroughly.\n    \n2. **Test Mode**: No real money is involved. Only our test cards and bank accounts can be used. We'll still send webhooks and email notifications, and most of the API functions are the same.\n    \n\nLive Dashboard Url: [https://merchant.ercaspay.com](https://merchant.ercaspay.com/)\n\nTest Dashboard Url: [http://merchant-staging.ercaspay.com/](http://merchant-staging.ercaspay.com/)\n\n**Test keys will always have** TEST **in the prefix (for example,\\`ERCAS-TEST-PK)\n\n**Live keys will always have** LIVE **in the prefix (for example,ERCAS-LIVE-PK)\n\nEvery Api request on behalf of a business should have an Authorization header in the following format\n\n``` json\n{\n    Authorization: Bearer TestKey\n}\n\n ```\n\n# HTTPS Status Codes\n\n##### **Succesful Codes**\n\n- 200 = **OK**. This implies that the result of an operation (API call) was successful\n    \n- 201 = **Created**. A 201 status code indicates that a request was successful and as a result, a resource has been created (for example, successful registration of a new user)\n    \n\n##### **Error Codes**\n\nWhen working with our API, you'll encounter some kinds of errors e.g, authorization errors, validation errors, server errors, Watu errors, and provider errors. Each type of error comes with an appropriate HTTP status code.\n\n> _400 =_ _**Bad Request**_ - this response code serves as a generic error code for failed validation requests. Validation errors are returned when your request fails one or more validation rules. Examples include not passing required parameters. They come with a 400 Bad Request status code \n  \n> _401 =_ _**Unauthorized**_ - this response code is sent when the server encounters issues related to authentication/authorization such as CHECKSUM MISMATCH, UNKNOWN CLIENT, FRESH ACCESS TOKEN REQUIRED etc. You'll get authorization errors when you don't provide your secret key to authorize an API call, or when the key provided isn't correct \n  \n> _403 =_ _**Forbidden / Access Denied**_ - this response code is sent when the server understood the request but refuses to authorize it. A request might be forbidden for reasons related or unrelated to credentials. For example - INCOMPLETE REQUEST PARAMETERS REQUIRED FOR AUTHENTICATION. \n  \n> _404 =_ _**Not Found**_ - this response code is sent on attempt to locate a resource/route that doesn't or no longer exist(s) \n  \n> _500_ = **Internal Server Error** - this response code is sent as a generic error code for failed requests that our server takes full responsibility for. \n  \n\n# Libraries & Plugins\n\n## Officially Supported\n\nTo make integrations more seamless for developers, official libraries and plugins are available for ercaspay across multiple languages and frameworks.\n\n- **Javascript SDK:** [https://www.npmjs.com/package/@capitalsage/ercaspay-js](https://www.npmjs.com/package/@capitalsage/ercaspay-js)\n    \n- **NodeJS:** [https://www.npmjs.com/package/@capitalsage/ercaspay-nodejs](https://www.npmjs.com/package/@capitalsage/ercaspay-nodejs)\n    \n- **React Native:** [https://www.npmjs.com/package/@capitalsage/ercaspay-react-native-checkout](https://www.npmjs.com/package/@capitalsage/ercaspay-react-native-checkout)\n    \n- **Flutter:** [https://pub.dev/packages/ercaspay](https://pub.dev/packages/ercaspay)\n    \n\n##### Feedback / Support\n\nIf you experience any issues while using these libraries, please contact us at [support@ercaspay.com](https://null).\n\n## Community Supported\n\nOur dedicated community of developers maintains open-source libraries in various languages for integrating Ercaspay. Here are some you can use.\n\n- **Javascript SDK:** [www.npmjs.com/package/ercaspay-sdk](https://www.npmjs.com/package/ercaspay-sdk)\n    \n- **Angular:** [https://www.npmjs.com/package/@decodeblock/ercaspay-angular](https://www.npmjs.com/package/@decodeblock/ercaspay-angular)\n    \n- **Ercas For Saas (Reflex.dev):** [https://github.com/Omotunde2005/Ercas-for-saas](https://github.com/Omotunde2005/Ercas-for-saas)\n    \n- **Python:** [https://www.piwheels.org/project/ercaspay/](https://www.piwheels.org/project/ercaspay/)\n    \n- **.Net:** [https://www.nuget.org/packages/ErcasPay.12.16.24.002](https://www.nuget.org/packages/ErcasPay.12.16.24.002)\n    \n\n##### Feedback / Support\n\nIf you experience any issues with these libraries, please contact the developer or open an issue in the repository for assistance.\n\n# **Test Cards**\n\nThe following test cards are available\n\n| **CARD TYPE** | **PAN** | **EXPIRY DATE** | **PIN** | **CVV** | **OTP** | **STATUS** |\n| --- | --- | --- | --- | --- | --- | --- |\n| MASTERCARD | 2223000000000007 | 01/39 | 1234 | 111 | \\- | Success |\n| VISA | 4000000000002503 | 03/50 | 1111 | 111 | \\- | Success |\n| VERVE | 5060990580000217499 | 03/50 | 1111 | 111 | 123456 | Success |\n| VERVE | 5061830100001895 | 01/40 | 1111 | 111 | 123456 | Failure - Timeout calling issuing bank |\n| VERVE | 5060990580000000390 | 03/50 | 1111 | 111 | 123456 | Failure - Insufficient Funds |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"26288419","team":6091551,"collectionId":"3c78cfb9-5cfa-433f-8cf3-863da8f06deb","publishedId":"2sA2xiWrhA","public":true,"publicUrl":"https://docs.ercaspay.com","privateUrl":"https://go.postman.co/documentation/26288419-3c78cfb9-5cfa-433f-8cf3-863da8f06deb","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":"Ercaspay Developer Documentation"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/52df97c9-5b21-47be-b389-42e0f586e20a/ZXJjYXNwYXktbG9nby5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":"https://content.pstmn.io/52df97c9-5b21-47be-b389-42e0f586e20a/ZXJjYXNwYXktbG9nby5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2024-03-17T08:51:56.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Ercaspay Developer Documentation","description":""},"logos":{"logoLight":"https://content.pstmn.io/52df97c9-5b21-47be-b389-42e0f586e20a/ZXJjYXNwYXktbG9nby5wbmc=","logoDark":"https://content.pstmn.io/52df97c9-5b21-47be-b389-42e0f586e20a/ZXJjYXNwYXktbG9nby5wbmc="}},"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/0d8c8535e1670ecbe23f7cd542eefe35e23e57a864fb4ab707e8bac5fad7623b","favicon":"https://ercaspay.com/favicon.ico"},"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://docs.ercaspay.com/view/metadata/2sA2xiWrhA"}