{"info":{"_postman_id":"99273d91-43d4-48e2-8560-488a387d5d56","name":"Hesabe API v2 Document","description":"<html><head></head><body><h1 id=\"hesabe-payment-api-integration-guide\">Hesabe Payment API Integration Guide</h1>\n<h1 id=\"overview\">Overview</h1>\n<p>This document provides guidelines to integrate with Hesabe Payment Gateway APIs.</p>\n<h1 id=\"introduction\">Introduction</h1>\n<p>Hesabe Payment Gateway allows authorized Merchants to accept payment from their customers. It is a secured payment gateway which provides high level SSL encryption and promises a protected payment cycle with your application using secure Authentication and PCI DSS compliant encryption.<br>Hesabe provides a payment integration kit that allows merchants to instantly collect payments from their users using Knet and MPGS payment modes. The Hesabe payment integration supports a seamless payment experience on your platform, while protecting your application from payment frauds and complexity related to various regulations.</p>\n<h1 id=\"environments\">Environments</h1>\n<p>Hesabe provides two environments - test and production.</p>\n<p>Merchants need an active Hesabe account to use the test environment and production environment. Merchants will have to log in to the Hesabe Merchant Panel and get the API credentials for using these environments.</p>\n<p>All transactions initiated by the merchant on our test environment are not processed. Test environment is strictly for testing the request and response functions. After successfully testing the integration, merchants can move to the production environment by changing the URL.</p>\n<h5 id=\"test-url\">Test URL:</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://sandbox.hesabe.com/checkout\n\n</code></pre><h5 id=\"production-url\">Production URL:</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://api.hesabe.com/checkout\n\n</code></pre><h1 id=\"steps-to-integrate-hesabe-payment-gateway\">Steps to integrate Hesabe Payment Gateway</h1>\n<ol>\n<li><p>Sign Up with Hesabe and get a Merchant Account created and approved.</p>\n</li>\n<li><p>Login to <code>Merchant Panel</code> using the credentials provided after Registration</p>\n</li>\n<li><p>Download <em>Hesabe Payment Integration Kit</em> (on PHP Platform, other platforms will be added soon).</p>\n</li>\n<li><p>Copy <code>Encryption Key</code> from Account section.</p>\n</li>\n<li><p><code>Access Code</code> &amp; <code>IV Key</code> will be shared by Hesabe.</p>\n</li>\n<li><p>Configure Hesabe security keys in your application.</p>\n</li>\n<li><p>Create Payment form and deploy request / response handlers with the guidance of the integration kit.</p>\n</li>\n<li><p>Create return pages for handling payment notification on success or cancel.</p>\n</li>\n</ol>\n<h1 id=\"download-hesabe-payment-gateway-integration-kit\">Download Hesabe payment gateway integration kit</h1>\n<p>The Hesabe payment gateway integration kit is a client library provided by Hesabe. This integration kit is available for PHP platform and will soon be available for other platforms such as Swift (iOS) and Java (Android), Python, and Asp.Net.</p>\n<p>After Signing in with the approved Merchant account you can download the Integration Kit. From the Merchant Panel Dashboard, navigate through <em>Resources &gt; Download Integration Kit &gt; Download PHP</em> to get the integration kit for the PHP.</p>\n<p>When you download the integration kit from the Hesabe merchant dashboard, it contains request response payment handler files. The integration kit also contains HesabeCrypto.php with the collection of functions to encrypt decrypt merchant data using AES-256-CBC.</p>\n<h1 id=\"access-hesabe-merchant-id-access-code-and-encryption-keys\">Access Hesabe Merchant ID, Access Code and Encryption Keys</h1>\n<p>For implementing Hesabe payment gateway integration, the Merchant id, Access Code and the Encryption Keys (Secret Key + IV Key) are the prime information to be passed with the payment request. To get these, you need to have an activated Hesabe Merchant account.</p>\n<p>After you login to Hesabe Merchant Panel using Merchant account credentials, you can see the dashboard with menu option “Account”.</p>\n<p>Under Security Keys, it will display the Merchant Id, Access Code and Secret Key. IV Key will be shared along with the credentials to access the Merchant Dashboard after account activation.</p>\n<h3 id=\"need-to-add-image-here\">Need to add image here</h3>\n<p>You need to copy the keys and configure them in your environment to send a payment request.</p>\n<h1 id=\"integrating-with-hesabe-payment-gateway-api-end-point\">Integrating with Hesabe Payment Gateway API end-point</h1>\n<h5 id=\"posting-payment-data\">Posting Payment Data</h5>\n<p>Payment data containing the following fields in encrypted form need to be submitted during <em>Checkout</em> for initiating the payment request.</p>\n<ul>\n<li><p>amount</p>\n</li>\n<li><p>responseUrl</p>\n</li>\n<li><p>failureUrl</p>\n</li>\n<li><p>merchantCode</p>\n</li>\n<li><p>paymentType</p>\n</li>\n<li><p>version</p>\n</li>\n<li><p>variable1 (Optional)</p>\n</li>\n<li><p>variable2 (Optional)</p>\n</li>\n<li><p>variable3 (Optional)</p>\n</li>\n<li><p>variable4 (Optional)</p>\n</li>\n<li><p>variable5 (Optional)</p>\n</li>\n</ul>\n<h5 id=\"request-parameters\">Request Parameters</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n<th>Type/Length</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>amount</code></td>\n<td>Amount must be greater than zero</td>\n<td>Numeric</td>\n</tr>\n<tr>\n<td><code>responseUrl</code></td>\n<td>Webpay will be redirected back to this url after payment completes</td>\n<td>Alphanumeric (200) Characters allowed: Alphabet (A-Z), (a-z), Numbers, / (slash),_ (underscore)</td>\n</tr>\n<tr>\n<td><code>failureUrl</code></td>\n<td>Webpay will be redirected back to this url after payment is declined</td>\n<td>Alphanumeric (200) Characters allowed: Alphabet (A-Z), (a-z), Numbers, / (slash),_ (underscore)</td>\n</tr>\n<tr>\n<td><code>merchantCode</code></td>\n<td>Merchant Code is a unique identifier generated by Hesabe for each activated merchant.</td>\n<td>Numeric</td>\n</tr>\n<tr>\n<td><code>access_code</code></td>\n<td>Access code is used to revalidate a Merchant. To be used only for Indirect Integration.</td>\n<td>Alphanumeric[32]</td>\n</tr>\n<tr>\n<td><code>paymentType</code></td>\n<td>Payment Type 0, 1 or 2; 0 - Indirect, 1 - Knet, 2 - MPGS</td>\n<td>Numeric</td>\n</tr>\n<tr>\n<td><code>version</code></td>\n<td>Version of the API (example 2.0)</td>\n<td>Alphanumeric [10]</td>\n</tr>\n<tr>\n<td><code>variable1</code></td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td><code>variable2</code></td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td><code>variable3</code></td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td><code>variable4</code></td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td><code>variable5</code></td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n</tbody>\n</table>\n</div><p>The data is posted/passed to the <em>HesabeRequestHandler</em> that will concatenate and encrypt the data before invoking the Hesabe Payment API endpoint.</p>\n<h1 id=\"hesaberequesthandler\">HesabeRequestHandler</h1>\n<p>The payment data posted/passed via the checkout form is handled by <em>HesabeRequestHandler</em>. The posted data are first validated and encrypted in this file. The Encryption key and IV (Initialization Vector) taken from Profile page of Hesabe Merchant dashboard are used as the encryption keys.</p>\n<p>The following sample PHP code snippets demonstrates how the process can be implemented in PHP Laravel.</p>\n<h6 id=\"validation\">Validation</h6>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$validator = $this-&gt;validate($request, [\n            'merchantCode' =&gt; 'required',\n            'access_code =&gt; 'required', // Only for Indirect Integration\n            'amount' =&gt; 'required|numeric|between:0.200,100000|regex:/^\\d+(\\.\\d{1,3})?$/',\n            'paymentType' =&gt; 'required|in:0,1,2',\n            'responseUrl' =&gt; 'required|url',\n            'failureUrl' =&gt; 'required|url',\n            'version' =&gt; 'required'\n        ]);\n\n</code></pre><h6 id=\"loading-encryption-keys-access-code-and-api-urls-from-config\">Loading Encryption Keys, Access Code, and API URLs from Config</h6>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$ivKey = HSB_IV_KEY;\n$encryptionKey = HSB_ENCRYPTION_KEY;\n$accessCode = HSB_ACCESS_CODE;\n$checkoutApiUrl = HSB_CHECKOUT_API_URL;\n$paymentUrl = HSB_PAYMENT_URL;\n\n</code></pre><h5 id=\"json-encoding\">JSON Encoding</h5>\n<p>After Validation, the request data is JSON encoded which is the array of the request keys &amp; values.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$requestDataJson = json_encode($request-&gt;input());\n\n</code></pre><h5 id=\"encryption\">Encryption</h5>\n<p>This JSON data is then encrypted using AES algorithm with HesabeCrypto library</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$encryptedData = HesabeCrypto::encrypt($requestDataJson, $encryptionKey, $ivKey)\n\n</code></pre><h5 id=\"invoking-hesabe-payment-api-checkout-endpoint\">Invoking Hesabe Payment API “Checkout” endPoint</h5>\n<p>The accessCode is initialized in the Request header and the Request data is posted to the Hesabe Payment Gateway Checkout API endpoint.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>// $baseUrl =  http://api.hesbstck.com/api/\n// $checkoutApiUrl = {{$baseUrl}}/checkout\n$checkoutRequestData = new Request([\n            'data' =&gt; $encryptedData\n        ]);\n$checkoutRequest = Request::create($checkoutApiUrl, 'POST', $checkoutRequestData-&gt;all());\n$checkoutRequest-&gt;headers-&gt;set('accessCode', $accessCode);\n\n</code></pre><h5 id=\"reading-response\">Reading Response</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$checkoutResponse = Route::dispatch($checkoutRequest);\n$checkoutResponseContent = $checkoutResponse-&gt;content();\n\n</code></pre><h5 id=\"decrypting-response--json-decoding\">Decrypting Response &amp; JSON Decoding</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$decryptedResponse = HesabeCrypto::decrypt($checkoutResponseContent, $encryptionKey, $ivKey);\n$responseDataJson = json_decode($decryptedResponse);\n\n</code></pre><h5 id=\"invoking-hesabe-payment-url\">Invoking Hesabe Payment URL</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>// $baseUrl =  http://api.hesbstck.com/api/\n// $paymentUrl = {{baseUrl}}/payment\n$responseToken = $responseDataJson-&gt;response-&gt;data;\nreturn Redirect::to($paymentUrl . '?data='. $responseToken);\n\n</code></pre><h1 id=\"indirect-integration\">Indirect Integration</h1>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>// $baseUrl =  http://api.hesbstck.com/api/\n// $checkoutApiUrl = {{$baseUrl}}/checkout/indirect\n\n</code></pre><p>In this API, paymentType must be 0. The users will select the final payment method in the next step.</p>\n<h5 id=\"selecting-payment-method\">Selecting Payment Method</h5>\n<p>Customers would be able to select their choice of Payment Method from the Hesabe Gateway Landing page which will load after the step Invoking Hesabe Payment URL. The Hesabe Payment Gateway Page would look similar to as shown below:</p>\n<h5 id=\"insert-image-here\">Insert image here</h5>\n<p>Based on the selection of Payment Method in this page, the Customer will be redirected to the respective Payment page and Payment Type will be updated in the Hesabe DB.</p>\n<h1 id=\"encryption-library\">Encryption Library</h1>\n<p>Code below shows the HesabeCrypt file in PHP.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>namespace App\\Libraries;\nuse Hashids\\Hashids;\nclass HesabeCrypt\n{\n    // AES Encryption Method Starts\n    public static function encrypt($str, $key, $ivKey)\n    {        \n        $str = self::pkcs5_pad($str);\n        $encrypted = openssl_encrypt($str, 'AES-256-CBC', $key, OPENSSL_ZERO_PADDING, $ivKey);\n        $encrypted = base64_decode($encrypted);\n        $encrypted = unpack('C*', ($encrypted));\n        $encrypted = self::byteArray2Hex($encrypted);\n        $encrypted = urlencode($encrypted);\n        return $encrypted;\n    }\n    private static function pkcs5_pad($text)\n    {\n        $blocksize = 32;\n        $pad = $blocksize - (strlen($text) % $blocksize);\n        return $text.str_repeat(chr($pad), $pad);\n    }\n    private static function byteArray2Hex($byteArray)\n    {\n        $chars = array_map(\"chr\", $byteArray);\n        $bin = join($chars);\n        return bin2hex($bin);\n    }\n    // Decryption Method for AES Algorithm Starts\n    public static function decrypt($code, $key, $ivKey)\n    {\n        if (!(ctype_xdigit($code) &amp;&amp; strlen($code) % 2 == 0)) {\n            return false;\n        }        \n        $code = self::hex2ByteArray(trim($code));\n        $code = self::byteArray2String($code);\n        $iv = $key;\n        $code = base64_encode($code);\n        $decrypted = openssl_decrypt($code, 'AES-256-CBC', $key, OPENSSL_ZERO_PADDING, $ivKey);\n        return self::pkcs5_unpad($decrypted);\n    }\n    private static function hex2ByteArray($hexString)\n    {\n        $string = hex2bin($hexString);\n        return unpack('C*', $string);\n    }\n    private static function byteArray2String($byteArray)\n    {\n        $chars = array_map(\"chr\", $byteArray);\n        return join($chars);\n    }\n    private static function pkcs5_unpad($text)\n    {\n        $pad = ord($text{strlen($text) - 1});\n        if ($pad &gt; strlen($text)) {\n            return false;\n        }\n        if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) {\n            return false;\n        }\n        return substr($text, 0, -1 * $pad);\n    }\n  }\n\n</code></pre><h1 id=\"processing-response-from-payment-gateway\">Processing Response from Payment Gateway</h1>\n<p>The response returned from the Payment Gateway would be in a field called ‘data’. This would be encrypted using the same set of AES - IV &amp; Secret Keys and hence would need to be decrypted using HesabeCrypto library’s decrypt function. The value after decryption would be like below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n   \"status\":true,\n   \"code\":200,\n   \"message\":\"Transaction Success\",\n   \"response\":{\n      \"data\":{\n         \"resultCode\":\"CAPTURED\",\n         \"amount\":10,\n         \"paymentToken\":\"1569830677725743478\",\n         \"paymentId\":\"100201927384634224\",\n         \"paidOn\":\"2019-09-30 11:05:16\",\n         \"variable1\":null,\n         \"variable2\":null,\n         \"variable3\":null,\n         \"variable4\":null,\n         \"variable5\":null,\n         \"method\":1,\n         \"administrativeCharge\":\"5\"\n      }\n   }\n}\n\n</code></pre><h5 id=\"response-paramters\">Response Paramters</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n<th>Type/Length</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>status</td>\n<td>Payment status (true - success; false - failure)</td>\n<td>Numeric [1 digit]</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Transaction amount</td>\n<td>Numeric</td>\n</tr>\n<tr>\n<td>paymentToken</td>\n<td>Payment Token returned from Hesabe</td>\n<td>Numeric [14 digits]</td>\n</tr>\n<tr>\n<td>paymentId</td>\n<td>Payment Id returned from Hesabe</td>\n<td></td>\n</tr>\n<tr>\n<td>paidOn</td>\n<td>Date Time of Payment</td>\n<td>Alphanumeric [36]</td>\n</tr>\n<tr>\n<td>Variable1</td>\n<td>Custom user parameter which was passed in request</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td>Variable2</td>\n<td>Custom user parameter which was passed in request</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td>Variable3</td>\n<td>Custom user parameter which was passed in request</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td>Variable4</td>\n<td>Custom user parameter which will be included in the response when it returns</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td>Variable5</td>\n<td>Custom user parameter which was passed in request</td>\n<td>Alphanumeric [100]</td>\n</tr>\n<tr>\n<td>method</td>\n<td>1 or 2 (KNET=1 and MPGS =2)</td>\n<td>Numeric</td>\n</tr>\n<tr>\n<td>administrativeCharge</td>\n<td>Administrative Charge</td>\n<td>Numeric</td>\n</tr>\n</tbody>\n</table>\n</div><p>Based on the status (success or failure), appropriate messages can be shown by the client on the confirmation page.</p>\n<h1 id=\"moving-to-production\">Moving to Production</h1>\n<p>After testing the Hesabe payment gateway integration in the test environment, you can go live by moving it to the production.</p>\n<p>To go live and use the Hesabe secure production environment, the <code>https://sandbox.hesabe.com/checkout</code> target should be replaced with <code>https://api.hesabe.com/checkout</code>.</p>\n<h1 id=\"testing\">Testing</h1>\n<h5 id=\"knet-testing\">KNET TESTING</h5>\n<ol>\n<li><p>Captured (Approved)<br> Card Number: 8888880000000001<br> Expiry: 09/2021<br> Pin: Any Pin</p>\n</li>\n<li><p>Not Captured (Declined)<br> Card Number: 8888880000000001<br> Expiry: Any Expiry<br> Pin: Any Pin</p>\n</li>\n</ol>\n<h5 id=\"mpgs\">MPGS</h5>\n<p>Cards</p>\n<ul>\n<li><p>5123450000000008</p>\n</li>\n<li><p>2223000000000007<br>  Expiry Dates</p>\n</li>\n<li><p>05 / 21 APPROVED</p>\n</li>\n<li><p>05 / 22 DECLINED</p>\n</li>\n<li><p>04 / 27 EXPIRED_CARD</p>\n</li>\n<li><p>08 / 28 TIMED_OUT</p>\n</li>\n<li><p>01 / 37 ACQUIRER_SYSTEM_ERROR</p>\n</li>\n<li><p>02 / 37 UNSPECIFIED_FAILURE</p>\n</li>\n<li><p>05 / 37 UNKNOWN<br>  CVV</p>\n</li>\n<li><p>100 MATCH</p>\n</li>\n<li><p>101 NOT_PROCESSED</p>\n</li>\n<li><p>102 NO_MATCH</p>\n</li>\n</ul>\n<h5 id=\"mpgs-test-cards-information\">MPGS TEST CARDS INFORMATION</h5>\n<p><a href=\"https://test-nbkpayment.mtf.gateway.mastercard.com/api/documentation/integrationGuidelines/supportedFeatures/testAndGoLive.html?locale=en_US\">https://test-nbkpayment.mtf.gateway.mastercard.com/api/documentation/integrationGuidelines/supportedFeatures/testAndGoLive.html?locale=en_US</a></p>\n<h1 id=\"technical-support\">Technical Support</h1>\n<p>For any assistance in integrating Hesabe payment gateway kindly contact:<br>Hesabe Technical Support<br>Email : <a href=\"https://mailto:support@hesabe.com\">support@hesabe.com</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Hesabe Payment API Integration Guide","slug":"hesabe-payment-api-integration-guide"},{"content":"Overview","slug":"overview"},{"content":"Introduction","slug":"introduction"},{"content":"Environments","slug":"environments"},{"content":"Steps to integrate Hesabe Payment Gateway","slug":"steps-to-integrate-hesabe-payment-gateway"},{"content":"Download Hesabe payment gateway integration kit","slug":"download-hesabe-payment-gateway-integration-kit"},{"content":"Access Hesabe Merchant ID, Access Code and Encryption Keys","slug":"access-hesabe-merchant-id-access-code-and-encryption-keys"},{"content":"Integrating with Hesabe Payment Gateway API end-point","slug":"integrating-with-hesabe-payment-gateway-api-end-point"},{"content":"HesabeRequestHandler","slug":"hesaberequesthandler"},{"content":"Indirect Integration","slug":"indirect-integration"},{"content":"Encryption Library","slug":"encryption-library"},{"content":"Processing Response from Payment Gateway","slug":"processing-response-from-payment-gateway"},{"content":"Moving to Production","slug":"moving-to-production"},{"content":"Testing","slug":"testing"},{"content":"Technical Support","slug":"technical-support"}],"owner":"21452318","collectionId":"99273d91-43d4-48e2-8560-488a387d5d56","publishedId":"2sAYk7SjNd","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-11T07:55:18.000Z"},"item":[{"name":"Direct Payment","item":[{"name":"decrypt","id":"bd7eda51-526f-4b9e-aa0b-758e79da690f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"350610c47858325e275e271b720c7ed6d2b61c09c642843131cd00da9317a451502d77a4cb2683ea7f7037067d9a11deac7917040fada40f89a8b2c5cc55a54758af511d4d5895b7a61aca83e91ba81204a5978aacbb57aa801ab5ba571333b21c217445328e83f8d6c2c4cdae17cf8cc63dd9bf772448d4538fd9dc9ebf65027b01982060feba5b75724246f1c3268d2075206d520d6a1a4838f494d1e5dc23c8fa1fba5e877bfce0f431f64defb8d7b668c6a43c15d69554241c6877628f27d687b8d2a3c0dd2c5d68b5a7d7e475efe42c1e1fa4b57531f5c41871eccca10d37bf13b73a7b1afa439cae73508066771becf14c9749eb764bc90cb9c41d9af6a6acf384c0bc06c2773351d12de8b19b5f8952af2895d9e367d1b49aec3958522cb4d3e777e50eed36f3f475cf94443cc7b1f8631c579354e69f00a3d63559a2","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/decrypt","urlObject":{"path":["decrypt"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd7eda51-526f-4b9e-aa0b-758e79da690f"},{"name":"encrypt","id":"6f2df588-1a25-43ed-8428-0210a9c1c42a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"merchantCode","value":"{{merchant-code}}","type":"text"},{"key":"amount","value":"10","type":"text"},{"key":"responseUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text","disabled":true},{"key":"failureUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text","disabled":true},{"key":"description","value":"testin","type":"text","disabled":true},{"key":"variable1","value":"123456789","type":"text","disabled":true},{"key":"variable2","value":"","type":"text","disabled":true},{"key":"variable3","value":"","type":"text","disabled":true},{"key":"variable4","value":"","type":"text","disabled":true},{"key":"variable5","value":"","type":"text","disabled":true},{"key":"version","value":"2","type":"text","disabled":true},{"key":"paymentType","value":"2","type":"text","disabled":true},{"key":"authorize","value":"1","type":"text","uuid":"3853da0b-6013-47c5-80c1-461c9298e6c1","disabled":true},{"key":"paymentToken","value":"1316172517422883849535855644899","type":"text","uuid":"a662f829-6525-4af9-8142-ef458f06c444","disabled":true},{"key":"saveCard","value":"","type":"text","uuid":"b9e70c96-56e7-4bb1-8f36-5a0c208cc28e","disabled":true},{"key":"cardId","value":"","type":"text","uuid":"680a878d-e581-49e0-8c11-c41e925267a8","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/api/encrypt","urlObject":{"path":["encrypt"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"62153f40-06a0-4004-9c79-4751380825ce","name":"normal checkout","originalRequest":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"merchantCode","value":"{{merchant-code}}","type":"text"},{"key":"amount","value":"10","type":"text"},{"key":"responseUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text"},{"key":"failureUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text"},{"key":"paymentType","value":"2","type":"text"},{"key":"version","value":"2","type":"text"},{"key":"description","value":"testin","type":"text","disabled":true},{"key":"variable1","value":"123456789","type":"text","disabled":true},{"key":"variable2","value":"","type":"text","disabled":true},{"key":"variable3","value":"","type":"text","disabled":true},{"key":"variable4","value":"","type":"text","disabled":true},{"key":"variable5","value":"","type":"text","disabled":true},{"key":"authorize","value":"1","type":"text","uuid":"3853da0b-6013-47c5-80c1-461c9298e6c1","disabled":true},{"key":"paymentToken","value":"1316172517422883849535855644899","type":"text","uuid":"a662f829-6525-4af9-8142-ef458f06c444","disabled":true},{"key":"saveCard","value":"","type":"text","uuid":"b9e70c96-56e7-4bb1-8f36-5a0c208cc28e","disabled":true},{"key":"cardId","value":"","type":"text","uuid":"680a878d-e581-49e0-8c11-c41e925267a8","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/api/encrypt"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Date","value":"Mon, 27 Apr 2026 06:10:37 GMT"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Powered-By","value":"PHP/8.4.19"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"55"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\"status\":true,\"code\":200,\"message\":\"Success\",\"response\":{\"data\":\"6060cf6dce78b3c364773e386b1de99818a545986bba2fc861210249556b71c50939ce0e303c2132a129ab1010fc2d7b4aac90ca5a8ea0712f85d974a23a2b59ae155d7ef190a2aff5249d2b96043c50f2d53d3e5bb7467eea7f3038f00ed1c9777babd5a7db79d9ffaaf141c8bef34af587ec03cb2c9513c71dcd67d86ee619e5f75e897ad6e52b9ced03da94c49aff89afd2e34b0c429f086a91bfb7e56515e9a6f31aed5e5e8f9f292ca9d162de5789b42bc5d26d32491f00dea52eea7a4c8272c1eeb51b8c8238512dca6d8df5d198174789f700aa925c84ade6d4002805238069b55526a3e3ee1fadf069c0fa6a51ab3be773df35785b6a12c96dcc9d7d\"}}"},{"id":"11f017a4-f9b7-4e64-b5df-f5f45b2bc57e","name":"add card checkout with 0 amount","originalRequest":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"merchantCode","value":"{{merchant-code}}","type":"text"},{"key":"amount","value":"0","type":"text"},{"key":"responseUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text"},{"key":"failureUrl","value":"http://127.0.0.1:8000/api/v2/customer-response?id={{merchant-code}}","type":"text"},{"key":"saveCard","value":"1","type":"text","uuid":"b9e70c96-56e7-4bb1-8f36-5a0c208cc28e"},{"key":"paymentType","value":"2","type":"text"},{"key":"version","value":"2","type":"text"},{"key":"customer_id","value":"4026","type":"text"},{"key":"variable1","value":"123456789","type":"text","disabled":true},{"key":"variable2","value":"","type":"text","disabled":true},{"key":"variable3","value":"","type":"text","disabled":true},{"key":"variable4","value":"","type":"text","disabled":true},{"key":"variable5","value":"","type":"text","disabled":true},{"key":"cardId","value":"","type":"text","uuid":"680a878d-e581-49e0-8c11-c41e925267a8","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/api/encrypt"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"e8059fa0-d7c5-44fb-a47c-aae5a60f4428","name":"capture with card id","originalRequest":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"merchantCode","value":"{{merchant-code}}","type":"text"},{"key":"amount","value":"10","type":"text"},{"key":"card_id","value":"2263","type":"text","uuid":"680a878d-e581-49e0-8c11-c41e925267a8"},{"key":"order_reference","value":"test","type":"text","uuid":"fa70038e-17ed-41ac-b8ee-2bc9f2c33a4e"}]},"url":"http://127.0.0.1:8000/api/v2/api/encrypt"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"10e8cdb5-6d15-4b8a-bfec-df1ce427cab0","name":"get list of cards","originalRequest":{"method":"POST","header":[{"key":"primary","value":"{{secret-key}}","type":"text"},{"key":"secondary","value":"{{iv-key}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"merchantCode","value":"{{merchant-code}}","type":"text"},{"key":"customer_id","value":"4026","type":"text","uuid":"7624747a-c16e-4bb6-88e1-6a093bc8931e"}]},"url":"http://127.0.0.1:8000/api/v2/api/encrypt"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"6f2df588-1a25-43ed-8428-0210a9c1c42a"},{"name":"normal checkout","id":"3796c51f-d391-496e-bc2b-b915ce48fd6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"6060cf6dce78b3c364773e386b1de99818a545986bba2fc861210249556b71c5ef9751665daf39e3f0fb2584fd6b7718c9944d43f7de8c7fb0d8fbd5a89166739b2e99ad904948017d64a3bfa80bf54bc45a8b54466737276d419966d24f45a937af57bfb518dcab92e8e3db300c07e0fe6850f92c6ef0d830273276955f8a6eecd2be85c9ce6f0c0027d0f5626f82f46d7bf8531da15773b46b11ef85fd06f146fa28985411ef56be654d3315bba23ecb77039584ecfbbad141490e107a3fc688998d5dd241ce6660aff3f045e82fbf1b53c9f040df24ff40c14898d22e63d5fcbdf99bfbbb930d5fe41f765a9f905c8bcfc4628005afe344a3e9d8d81002f3f17ba26a12c8a27d635cbac06e9b6f28524385ca7d82820f25073a53e8033ed9","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/checkout","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n<p><strong>Request Parameter</strong>:<br /><strong>data</strong>: A single string parameter containing encrypted JSON payload</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>| **Field Name**         | **Required**         | **Example Value**                                         | **Description / Notes**                                   |\n| ---------------------- | -------------------- | --------------------------------------------------------- | --------------------------------------------------------- |\n| `merchantCode`         |  Yes                | `MERCHANT123`                                             | Unique identifier assigned to the merchant                |\n| `amount`               |  Yes                | `1.000`                                                   | For subscription payments, the amount must be `0.000`     |\n| `responseUrl`          |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after successful transaction         |\n| `failureUrl`           |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after failed transaction             |\n| `orderReferenceNumber` |  Optional           | `ORD-20250619001`                                         | Unique order or reference number from the merchant system |\n| `description`          |  Optional           | `Monthly subscription for premium plan`                   | Description of the transaction                            |\n| `variable1`            |  Optional           | `User123`                                                 | Custom variable 1 (can hold user ID or session token)     |\n| `variable2`            |  Optional           |  empty                                                    | Custom variable 2                                         |\n| `variable3`            |  Optional           |  empty                                                    | Custom variable 3                                         |\n| `variable4`            |  Optional           |  empty                                                    | Custom variable 4                                         |\n| `variable5`            |  Optional           |  empty                                                    | Custom variable 5                                         |\n| `version`              |  Yes                | `2.0`                                                     | API version number                                        |\n| `paymentType`          |  Yes                | `15`                                                      | Type of payment — `15` indicates **subscription**         |\n| `subscription`         |  Yes                | `1`                                                       | Marks it as a subscription request                        |\n| `name`                 |  Optional           | `Full Name`                                         | Customer’s full name                                      |\n| `mobile_number`        |  Optional           | ``                                                | Customer’s mobile number                                  |\n| `email`                |  Optional           | `email`                                     | Customer’s email address                                  |\n| `numberOfInstallments` |  Yes (if recurring) | `3`                                                       | Total number of recurring payments                        |\n| `recurringFrequency`   |  Yes (if recurring) | `1`                                                       | Recurring frequency: `0 = daily`, `1 = monthly`           |\n| `recurringStartDate`   |  Yes (if recurring) | `2025-06-15`                                              | Start date of recurring billing (format: `YYYY-MM-DD`)    |\n| `recurringAmount`      |  Yes (if recurring) | `10.000`                                                  | Amount to charge for each recurring payment               |\n| `webhookUrl`           |  Optional           | `https://yourdomain.com/webhook`                          | Optional backend callback URL                             |\n| `serviceTypeId`        |  Optional           | `2`                                                       | Used to determine validation for other fields like email  |\n| `cardId`               |  Optional           |                                                           | For using a previously saved card                         |\n| `saveCard`             |  Optional           | `1`                                                       | Set to `1` to save card info (Authorization transaction)                              |\n| `authorize`            |  Optional           | `0`                                                       | Authorization transaction                                 |\n\n</code></pre>","urlObject":{"host":["http://127.0.0.1:8000/api/v2/checkout"],"query":[],"variable":[]}},"response":[],"_postman_id":"3796c51f-d391-496e-bc2b-b915ce48fd6a"},{"name":"capture with card id","id":"f2e33254-1e1c-435e-b120-f18fc71b4e10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"6060cf6dce78b3c364773e386b1de99818a545986bba2fc861210249556b71c5a6edde6c36ad8e353cdc4eb1e91b183358ccf9fc766494798fa57a30dd775cc4b8f5698083b454af46585fc0efd14d4a0f14eeb57413e0fbbba4c41ce0da4988","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/direct-payment/charge-card","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n<p><strong>Request Parameter</strong>:<br /><strong>data</strong>: A single string parameter containing encrypted JSON payload</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>| **Field Name**         | **Required**         | **Example Value**                                         | **Description / Notes**                                   |\n| ---------------------- | -------------------- | --------------------------------------------------------- | --------------------------------------------------------- |\n| `merchantCode`         |  Yes                | `MERCHANT123`                                             | Unique identifier assigned to the merchant                |\n| `amount`               |  Yes                | `1.000`                                                   | For subscription payments, the amount must be `0.000`     |\n| `responseUrl`          |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after successful transaction         |\n| `failureUrl`           |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after failed transaction             |\n| `orderReferenceNumber` |  Optional           | `ORD-20250619001`                                         | Unique order or reference number from the merchant system |\n| `description`          |  Optional           | `Monthly subscription for premium plan`                   | Description of the transaction                            |\n| `variable1`            |  Optional           | `User123`                                                 | Custom variable 1 (can hold user ID or session token)     |\n| `variable2`            |  Optional           |  empty                                                    | Custom variable 2                                         |\n| `variable3`            |  Optional           |  empty                                                    | Custom variable 3                                         |\n| `variable4`            |  Optional           |  empty                                                    | Custom variable 4                                         |\n| `variable5`            |  Optional           |  empty                                                    | Custom variable 5                                         |\n| `version`              |  Yes                | `2.0`                                                     | API version number                                        |\n| `paymentType`          |  Yes                | `15`                                                      | Type of payment — `15` indicates **subscription**         |\n| `subscription`         |  Yes                | `1`                                                       | Marks it as a subscription request                        |\n| `name`                 |  Optional           | `Full Name`                                         | Customer’s full name                                      |\n| `mobile_number`        |  Optional           | ``                                                | Customer’s mobile number                                  |\n| `email`                |  Optional           | `email`                                     | Customer’s email address                                  |\n| `numberOfInstallments` |  Yes (if recurring) | `3`                                                       | Total number of recurring payments                        |\n| `recurringFrequency`   |  Yes (if recurring) | `1`                                                       | Recurring frequency: `0 = daily`, `1 = monthly`           |\n| `recurringStartDate`   |  Yes (if recurring) | `2025-06-15`                                              | Start date of recurring billing (format: `YYYY-MM-DD`)    |\n| `recurringAmount`      |  Yes (if recurring) | `10.000`                                                  | Amount to charge for each recurring payment               |\n| `webhookUrl`           |  Optional           | `https://yourdomain.com/webhook`                          | Optional backend callback URL                             |\n| `serviceTypeId`        |  Optional           | `2`                                                       | Used to determine validation for other fields like email  |\n| `cardId`               |  Optional           |                                                           | For using a previously saved card                         |\n| `saveCard`             |  Optional           | `1`                                                       | Set to `1` to save card info (Authorization transaction)                              |\n| `authorize`            |  Optional           | `0`                                                       | Authorization transaction                                 |\n\n</code></pre>","urlObject":{"path":["direct-payment","charge-card"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2e33254-1e1c-435e-b120-f18fc71b4e10"},{"name":"get list of card for customer","id":"921ee692-aa6a-4187-9dcb-cb264b5278f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/direct-payment/cards?data=6060cf6dce78b3c364773e386b1de9982e5efa7acb751b0d718fcc2c497c047b6bed1244dc9533534bfd09834520873b66e7b4ffa77182138b089653992525a3","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n<p><strong>Request Parameter</strong>:<br /><strong>data</strong>: A single string parameter containing encrypted JSON payload</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>| **Field Name**         | **Required**         | **Example Value**                                         | **Description / Notes**                                   |\n| ---------------------- | -------------------- | --------------------------------------------------------- | --------------------------------------------------------- |\n| `merchantCode`         |  Yes                | `MERCHANT123`                                             | Unique identifier assigned to the merchant                |\n| `amount`               |  Yes                | `1.000`                                                   | For subscription payments, the amount must be `0.000`     |\n| `responseUrl`          |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after successful transaction         |\n| `failureUrl`           |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after failed transaction             |\n| `orderReferenceNumber` |  Optional           | `ORD-20250619001`                                         | Unique order or reference number from the merchant system |\n| `description`          |  Optional           | `Monthly subscription for premium plan`                   | Description of the transaction                            |\n| `variable1`            |  Optional           | `User123`                                                 | Custom variable 1 (can hold user ID or session token)     |\n| `variable2`            |  Optional           |  empty                                                    | Custom variable 2                                         |\n| `variable3`            |  Optional           |  empty                                                    | Custom variable 3                                         |\n| `variable4`            |  Optional           |  empty                                                    | Custom variable 4                                         |\n| `variable5`            |  Optional           |  empty                                                    | Custom variable 5                                         |\n| `version`              |  Yes                | `2.0`                                                     | API version number                                        |\n| `paymentType`          |  Yes                | `15`                                                      | Type of payment — `15` indicates **subscription**         |\n| `subscription`         |  Yes                | `1`                                                       | Marks it as a subscription request                        |\n| `name`                 |  Optional           | `Full Name`                                         | Customer’s full name                                      |\n| `mobile_number`        |  Optional           | ``                                                | Customer’s mobile number                                  |\n| `email`                |  Optional           | `email`                                     | Customer’s email address                                  |\n| `numberOfInstallments` |  Yes (if recurring) | `3`                                                       | Total number of recurring payments                        |\n| `recurringFrequency`   |  Yes (if recurring) | `1`                                                       | Recurring frequency: `0 = daily`, `1 = monthly`           |\n| `recurringStartDate`   |  Yes (if recurring) | `2025-06-15`                                              | Start date of recurring billing (format: `YYYY-MM-DD`)    |\n| `recurringAmount`      |  Yes (if recurring) | `10.000`                                                  | Amount to charge for each recurring payment               |\n| `webhookUrl`           |  Optional           | `https://yourdomain.com/webhook`                          | Optional backend callback URL                             |\n| `serviceTypeId`        |  Optional           | `2`                                                       | Used to determine validation for other fields like email  |\n| `cardId`               |  Optional           |                                                           | For using a previously saved card                         |\n| `saveCard`             |  Optional           | `1`                                                       | Set to `1` to save card info (Authorization transaction)                              |\n| `authorize`            |  Optional           | `0`                                                       | Authorization transaction                                 |\n\n</code></pre>","urlObject":{"path":["direct-payment","cards"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[{"key":"data","value":"6060cf6dce78b3c364773e386b1de9982e5efa7acb751b0d718fcc2c497c047b6bed1244dc9533534bfd09834520873b66e7b4ffa77182138b089653992525a3"}],"variable":[]}},"response":[],"_postman_id":"921ee692-aa6a-4187-9dcb-cb264b5278f1"}],"id":"d54b730d-84ab-4dc6-bbed-ec5ce07d02f7","_postman_id":"d54b730d-84ab-4dc6-bbed-ec5ce07d02f7","description":""},{"name":"checkout","id":"5170350a-9e8f-4df3-a8fd-46d4535c00df","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"6060cf6dce78b3c364773e386b1de99818a545986bba2fc861210249556b71c5ef9751665daf39e3f0fb2584fd6b7718c9944d43f7de8c7fb0d8fbd5a89166739b2e99ad904948017d64a3bfa80bf54bc45a8b54466737276d419966d24f45a937af57bfb518dcab92e8e3db300c07e0fe6850f92c6ef0d830273276955f8a6eecd2be85c9ce6f0c0027d0f5626f82f46d7bf8531da15773b46b11ef85fd06f146fa28985411ef56be654d3315bba23ecb77039584ecfbbad141490e107a3fc6a817d8d98615870fc8018ae449517a6b54bbd04b8d970c0cb6d240fd1f43f58438177fa0a363c3638d3f0ea116dcdffff01147349d001fbae5e986c823b9f7c6cc6538118a1a5456d2e41d24264ada73553fb01131fa531d9cfa43cf06b51ded","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/checkout","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n<p><strong>Request Parameter</strong>:<br /><strong>data</strong>: A single string parameter containing encrypted JSON payload</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>| **Field Name**         | **Required**         | **Example Value**                                         | **Description / Notes**                                   |\n| ---------------------- | -------------------- | --------------------------------------------------------- | --------------------------------------------------------- |\n| `merchantCode`         |  Yes                | `MERCHANT123`                                             | Unique identifier assigned to the merchant                |\n| `amount`               |  Yes                | `1.000`                                                   | For subscription payments, the amount must be `0.000`     |\n| `responseUrl`          |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after successful transaction         |\n| `failureUrl`           |  Yes                | `https://yourdomain.com/customer-response`                | URL to redirect user after failed transaction             |\n| `orderReferenceNumber` |  Optional           | `ORD-20250619001`                                         | Unique order or reference number from the merchant system |\n| `description`          |  Optional           | `Monthly subscription for premium plan`                   | Description of the transaction                            |\n| `variable1`            |  Optional           | `User123`                                                 | Custom variable 1 (can hold user ID or session token)     |\n| `variable2`            |  Optional           |  empty                                                    | Custom variable 2                                         |\n| `variable3`            |  Optional           |  empty                                                    | Custom variable 3                                         |\n| `variable4`            |  Optional           |  empty                                                    | Custom variable 4                                         |\n| `variable5`            |  Optional           |  empty                                                    | Custom variable 5                                         |\n| `version`              |  Yes                | `2.0`                                                     | API version number                                        |\n| `paymentType`          |  Yes                | `15`                                                      | Type of payment — `15` indicates **subscription**         |\n| `subscription`         |  Yes                | `1`                                                       | Marks it as a subscription request                        |\n| `name`                 |  Optional           | `Full Name`                                         | Customer’s full name                                      |\n| `mobile_number`        |  Optional           | ``                                                | Customer’s mobile number                                  |\n| `email`                |  Optional           | `email`                                     | Customer’s email address                                  |\n| `numberOfInstallments` |  Yes (if recurring) | `3`                                                       | Total number of recurring payments                        |\n| `recurringFrequency`   |  Yes (if recurring) | `1`                                                       | Recurring frequency: `0 = daily`, `1 = monthly`           |\n| `recurringStartDate`   |  Yes (if recurring) | `2025-06-15`                                              | Start date of recurring billing (format: `YYYY-MM-DD`)    |\n| `recurringAmount`      |  Yes (if recurring) | `10.000`                                                  | Amount to charge for each recurring payment               |\n| `webhookUrl`           |  Optional           | `https://yourdomain.com/webhook`                          | Optional backend callback URL                             |\n| `serviceTypeId`        |  Optional           | `2`                                                       | Used to determine validation for other fields like email  |\n| `cardId`               |  Optional           |                                                           | For using a previously saved card                         |\n| `saveCard`             |  Optional           | `1`                                                       | Set to `1` to save card info (Authorization transaction)                              |\n| `authorize`            |  Optional           | `0`                                                       | Authorization transaction                                 |\n\n</code></pre>","urlObject":{"host":["http://127.0.0.1:8000/api/v2/checkout"],"query":[],"variable":[]}},"response":[],"_postman_id":"5170350a-9e8f-4df3-a8fd-46d4535c00df"},{"name":"payment","id":"80147d34-8643-4f41-8f58-3a45d75efa05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"data","value":"f15b7a83ad03ff04573d1d56cb60af108cdc111c3ae2e5291ef3ac7d22515ea467bab212cf7f2dc9171f0a9fd03e6df8eb5864246b7211288d4754d08ef7476aa0e948dd937b6060f5daf3fdadbe91065763bc70123fc7371ab21df4cf6beb67","type":"text","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/payment?data=f15b7a83ad03ff04573d1d56cb60af1083f1afaee346221296bb2acaa75b64c25e20d102dd79bfef596c94009b7b7260518367ea52cc02590d86f0a8f948f34c361f921518689bb4c968a65971a133264cd2d88c1f7547ac52501f126fa0e837","urlObject":{"host":["http://127.0.0.1:8000/api/v2/payment"],"query":[{"key":"data","value":"f15b7a83ad03ff04573d1d56cb60af1083f1afaee346221296bb2acaa75b64c25e20d102dd79bfef596c94009b7b7260518367ea52cc02590d86f0a8f948f34c361f921518689bb4c968a65971a133264cd2d88c1f7547ac52501f126fa0e837"}],"variable":[]}},"response":[],"_postman_id":"80147d34-8643-4f41-8f58-3a45d75efa05"},{"name":"transaction-show","id":"8177d8f0-651e-44bf-a0b2-a402da0ef339","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"accessCode","value":"{{access-code}}","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"http://127.0.0.1:8000/api/v2/api/transaction/84221717422198999455583639553","urlObject":{"path":["transaction","84221717422198999455583639553"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[{"disabled":true,"key":"isOrderReference","value":"1"}],"variable":[]}},"response":[{"id":"f87b5eb1-b709-4454-a335-c2364474ae61","name":"transaction-show","originalRequest":{"method":"GET","header":[{"key":"accessCode","value":"{{access-code}}","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"http://127.0.0.1:8000/api/v2/api/transaction/84221717422198999455583639553","host":["http://127.0.0.1:8000/api/v2/api"],"path":["transaction","84221717422198999455583639553"],"query":[{"key":"isOrderReference","value":"1","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Mar 2025 14:20:30 GMT"},{"key":"Server","value":"Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12"},{"key":"X-Powered-By","value":"PHP/8.2.12"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"57"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Transaction found\",\n    \"data\": {\n        \"token\": \"84221717422198999455583639553\",\n        \"amount\": \"3.000\",\n        \"reference_number\": \"\",\n        \"status\": \"SUCCESSFUL\",\n        \"TransactionID\": \"507610001392651\",\n        \"Id\": 292,\n        \"PaymentID\": \"100507610000018461\",\n        \"Terminal\": \"114802\",\n        \"TrackID\": \"131\",\n        \"payment_type\": \"KNET\",\n        \"service_type\": \"Payment Gateway\",\n        \"customerName\": null,\n        \"customerEmail\": null,\n        \"customerMobile\": null,\n        \"customerCardType\": null,\n        \"customerCard\": null,\n        \"datetime\": \"2025-03-17 16:58:57\"\n    },\n    \"results\": [\n        {\n            \"token\": \"84221717422198999455583639553\",\n            \"amount\": \"3.000\",\n            \"reference_number\": \"\",\n            \"status\": \"SUCCESSFUL\",\n            \"TransactionID\": \"507610001392651\",\n            \"Id\": 292,\n            \"PaymentID\": \"100507610000018461\",\n            \"Terminal\": \"114802\",\n            \"TrackID\": \"131\",\n            \"payment_type\": \"KNET\",\n            \"service_type\": \"Payment Gateway\",\n            \"customerName\": null,\n            \"customerEmail\": null,\n            \"customerMobile\": null,\n            \"customerCardType\": null,\n            \"customerCard\": null,\n            \"datetime\": \"2025-03-17 16:58:57\"\n        }\n    ]\n}"}],"_postman_id":"8177d8f0-651e-44bf-a0b2-a402da0ef339"},{"name":"transaction-refund","id":"4fc7058f-52ad-4d3a-aa7e-05e03109dd6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"merchantCode\":\"{{merchant-code}}\",\r\n    \"token\":\"84221717422243939338886589472\",    \r\n    \"refundAmount\":\"1\",\r\n    \"refundMethod\":\"2\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v2/api/transaction-refund","urlObject":{"path":["transaction-refund"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"c0072297-d3f0-42f1-87d4-4f57a1cb33bc","name":"transaction-show","originalRequest":{"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","type":"text"},{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"merchantCode\":\"{{merchant-code}}\",\r\n    \"token\":\"84221717422198999455583639553\",\r\n    \"refundAmount\":\"1\",\r\n    \"refundMethod\":\"1\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v2/api/transaction-refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 17 Mar 2025 14:29:51 GMT"},{"key":"Server","value":"Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12"},{"key":"X-Powered-By","value":"PHP/8.2.12"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"57"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Your refund request is initiated\",\n    \"data\": {\n        \"token\": \"84221717422198999455583639553\",\n        \"amount\": \"1\",\n        \"order_reference_number\": \"\",\n        \"transaction_status\": \"SUCCESSFUL\",\n        \"refund_status\": \"PENDING\",\n        \"payment_type\": \"KNET\",\n        \"service_type\": \"Payment Gateway\",\n        \"transaction_datetime\": \"2025-03-17 16:58:57\",\n        \"refund_requested_at\": \"2025-03-17 17:29:52\"\n    }\n}"}],"_postman_id":"4fc7058f-52ad-4d3a-aa7e-05e03109dd6e"},{"name":"Authorize Capture","id":"e6817279-d551-4001-b4e0-2b1ab56e9140","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"301b3e7b23e86ad93110bb0eb13da4db8fa8b8bbbae41c71dced0e97e3089f1c17a415c4775271114b83b1f831c5027f30d95f1b561551a21b88332795aa33ed17a680a2b971b4b66027963cfdb28e199173372ff973a1d39447eeb6b973acab","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/capture","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n","urlObject":{"path":["capture"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"f03b800f-39ae-4ecc-a358-165cc1ecb2e6","name":"Authorize Capture","originalRequest":{"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"Access Code shared by Hesabe","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"301b3e7b23e86ad93110bb0eb13da4db8fa8b8bbbae41c71dced0e97e3089f1c17a415c4775271114b83b1f831c5027f30d95f1b561551a21b88332795aa33ed17a680a2b971b4b66027963cfdb28e199173372ff973a1d39447eeb6b973acab","description":"Encrypted data generated by `encrypt()` method in `HesabeCrypt` Library","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/capture"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 18 Mar 2025 09:03:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Powered-By","value":"PHP/8.2.19"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"}],"cookie":[],"responseTime":null,"body":"1e6dcd06f0f1db132da8ce521a9043b6f21f17db5f31d93e6c432784964344e37b7e4573e8e491a0262d14fb7c05ae6eb4e03b9ff16bd8050b7ea224ae84dd8a8bc4209ce94bfde203d09bd2c04aa1c4c7a5880d3474da3cd18b00ba0f26299514ab812bfc29f86f478b5ab54e3acbc9e144b125c4ee4c433b8678abbec17ca840c9b4dc7e2be21a93d656136b500adf2821863715bff6bece847d9cf68906356a7f08206451a1def2395674a2066557a9fc928fa2a619aff33d333fa5a1698a652c227046cf7473d7f41a9d2db3fd56c8af3a90e70d8c85835e5960bcacd745b501a79216bd87e8b7c3c369054e16c91ad1c7d7b2a6e7a6749cc31a88f76a96440c29b69a6f66b0ba6334d1e4b4634a9e8c670219c745cba4f2cebc380d434389f76ea97d701c4b4dfcb3c971c0f3a9fe37b7607b93f625c810c4fe6bdb1e1b9ac4012cabd06c1b40729f9873fd02f299ba6fccc4fe6f526801c960c9ba7f1b4aa98591c0e72f333188fae2af656dc50368a2c3e0b0573d4242e9f56769a3914abc1cfc385f573289b516517d3da70bad68de0537731d9ade7fe7e70a115c4e42a8ffe62dba5f73bf5d8b5e044ba7fc663593db89b378324c398d9be5922ed1bee90c59730ccb73d91c5ad3e30e0fd0f292b78541c3ca1e4c31d228d61ca33fd9d937169af0b166d8b606f1a4b69577dd1cf580760f6384cd4447fb34cec3771c7eca1d71a00597c18e612b8ab7d089721948a8d3877717a80f00618643038dbe6cb1bf4db8fdeed7f590bd52a655c44931e1a349265887e40a632492a0090d0d58d0eea30235aaa16e24ea58dca93bc9acc2562966cec3d287f608a7ba59c1"}],"_postman_id":"e6817279-d551-4001-b4e0-2b1ab56e9140"},{"name":"Authorized Cancel","id":"60743f22-11d3-4f3c-9138-389256de5e71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"074c9fc50b873834959c163c16eb50830d8a83bc6edfbdd53cfc622ac23434bb874ab5c00c71a84298d17bc8c9f3982f2679eaf6ec2d4fa02fe8a29f01e074ac34a0d9d88862bea5b10bd688dba80b8ea281cc712bcddab3492791aec51bb595490969e4bfa55c7d7f4674c844a179d871c9a21bebbc83679bdf0a0c995482541bda9d98af88f6f6d5b7d3c39484a9f5cde8860675766ab71f452a38b721bcfd728c89ba04251a120cb6e00c9b615dc7a6bd23308b8b81c12326749c8f9014c59c162bc27a3d729bd6715e17e2dfc8d4e130ec4b869cc3fc0b67b635c17d464e87cf5c5d810c7a9fd58008f663f1a554b0f58f945db5ca070a5cefcc3d88ad69752d9c79aa79488d2997f690a8579dd4821bd4aa06de7a4ed4e7d773dd2db02c28eba066b91f3696ce36a047ba5bedef59eedfad8c48bc9d54dc9e09ed8489cd43c55643c8487ba69e11fe1a2b52441065518a261fb40ed6a2b1a512959d68de","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/cancel/1316172517422851329783876349542","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n","urlObject":{"path":["cancel","1316172517422851329783876349542"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"d42dd4df-e02b-414d-b73c-9d42b4221f4a","name":"Authorize Cancel","originalRequest":{"method":"DELETE","header":[{"key":"accessCode","value":"{{access-code}}","description":"Access Code shared by Hesabe","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"074c9fc50b873834959c163c16eb50830d8a83bc6edfbdd53cfc622ac23434bb874ab5c00c71a84298d17bc8c9f3982f2679eaf6ec2d4fa02fe8a29f01e074ac34a0d9d88862bea5b10bd688dba80b8ea281cc712bcddab3492791aec51bb595490969e4bfa55c7d7f4674c844a179d871c9a21bebbc83679bdf0a0c995482541bda9d98af88f6f6d5b7d3c39484a9f5cde8860675766ab71f452a38b721bcfd728c89ba04251a120cb6e00c9b615dc7a6bd23308b8b81c12326749c8f9014c59c162bc27a3d729bd6715e17e2dfc8d4e130ec4b869cc3fc0b67b635c17d464e87cf5c5d810c7a9fd58008f663f1a554b0f58f945db5ca070a5cefcc3d88ad69752d9c79aa79488d2997f690a8579dd4821bd4aa06de7a4ed4e7d773dd2db02c28eba066b91f3696ce36a047ba5bedef59eedfad8c48bc9d54dc9e09ed8489cd43c55643c8487ba69e11fe1a2b52441065518a261fb40ed6a2b1a512959d68de","description":"Encrypted data generated by `encrypt()` method in `HesabeCrypt` Library","type":"text"}]},"url":"http://127.0.0.1:8000/api/v2/api/cancel/1316172517422851329783876349542"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 18 Mar 2025 09:13:53 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"nginx"},{"key":"X-Powered-By","value":"PHP/8.2.19"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"code\": 200,\n    \"message\": \"Transaction cancelled successfully.\"\n}"}],"_postman_id":"60743f22-11d3-4f3c-9138-389256de5e71"},{"name":"V2 Customer Cards","id":"3e7216f1-501f-4b21-9f95-ae1adbe2eb5c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"data\":\"301b3e7b23e86ad93110bb0eb13da4dbee1f5d0ac9e7f6d3db0873ab2dc8e26c89ebf507687121a68687db27a75fa0f1c44944d50e924666fb168da4c715d4f8b0d12dbc6233d487325d6410e255fc58ba024eca77edeccfcda521bc9ba708ee0ecf7dfcec8b74f986c94ef6ac93fa80b0620485be830d1eaf63419f08bd98d6\"\r\n}"},"url":"http://127.0.0.1:8000/api/v2/api/v2/customer-cards","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"merchantCode\":{{merchant-code}},\n\"payment_type_id\":5,\n\"email\":\"{{email}}\",\n\"mobile_number\":\"{{mobileNumber}}\",\n\n</code></pre>","urlObject":{"path":["v2","customer-cards"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e7216f1-501f-4b21-9f95-ae1adbe2eb5c"},{"name":"V2 Customer Cards","id":"c381e156-c333-43c8-b66e-285dd86d71d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"data\":\"0e7898bd7464d0c402fe8a949d9cbf9b826ccb9b83b56fa003373275f1947a65\"\r\n}"},"url":"http://127.0.0.1:8000/api/v2/api/v2/customer-cards/E18bkLlP","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n","urlObject":{"path":["v2","customer-cards","E18bkLlP"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c381e156-c333-43c8-b66e-285dd86d71d9"},{"name":"Subscription capture","id":"705f80d5-19cf-4e22-9755-fc4b5d7618c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"data\":\"0e7898bd7464d0c402fe8a949d9cbf9b84c9ca6239b5e015bd42c0d4b30b12ee28d9e7ba6faff06c058c93a7c61ddc9ed0e960f838a43baa337d75a2f5c68497c650aa2560c237a905017aa77108969ebd31d7a0a59e1550354b220eae5d1f716c8be91bc5f66b6e683bcc970201e859bdb74b8ce05a33e82adca5176b2ebf81\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v2/api/subscription/capture","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>The following parameters should be encrypted in the data:</p>\n<p>**Request Parameter:**<strong>data</strong>: A single string parameter containing encrypted JSON payload</p>\n<p>Original JSON Payload (Before Encryption)</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"merchantCode\": \"842217\",\n  \"amount\": \"5\",\n  \"paymentToken\": \"84221717473012429468675859195\",\n  \"orderReferenceNumber\": \"1\"\n}\n\n</code></pre><p>The following APIs need to be executed as part of the normal process, similar to the steps in payment integration:</p>\n<ol>\n<li><p><strong>Checkout</strong></p>\n</li>\n<li><p><strong>Payment</strong></p>\n</li>\n</ol>\n<p>Both steps must be completed successfully. The <strong>Payment</strong> API will generate a token, which will then be used in this API to <strong>capture the subscription amount</strong>.</p>\n<p>Please ensure that these APIs are followed in sequence as part of the regular workflow.</p>\n","urlObject":{"path":["subscription","capture"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"5ad02969-803b-4c23-bac8-03da92a56347","name":"Subscription capture","originalRequest":{"method":"POST","header":[{"key":"accessCode","value":"{{access-code}}","description":"Access Code shared by Hesabe","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"data\":\"0e7898bd7464d0c402fe8a949d9cbf9b84c9ca6239b5e015bd42c0d4b30b12ee28d9e7ba6faff06c058c93a7c61ddc9ed0e960f838a43baa337d75a2f5c68497c650aa2560c237a905017aa77108969ebd31d7a0a59e1550354b220eae5d1f716c8be91bc5f66b6e683bcc970201e859bdb74b8ce05a33e82adca5176b2ebf81\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/v2/api/subscription/capture"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 27 Mar 2025 13:25:53 GMT"},{"key":"Server","value":"Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12"},{"key":"X-Powered-By","value":"PHP/8.2.12"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"60a8f6241932227b840a9f5e36987f4d3a221314a76051e2898ad661b4a6cff85726c568e53fbc426534d0c732cf0706e85b7eebc302fa90c2e5642110d1482595aa913c6b0e920da6d9af3c521de9652c173e9c88f72f60db3cb1f844ab7b826603bb6579e6bedcb68764806fa45611ae414db56526331b734aeb76ffa4c9cf935d493fe15064c760edfe81233e8792dc8e817afe8443b670416a765867661f191c5da420629e87c972f2caf4ea996e5eb1488a4ffda891d874433c98066f6623c588ba02f4f390990eb76e82bd019b8050680035a1e78dbef21743342d20bea4eda7a618eadb6f21ec2f75fe359ce6a605527390bb5ef043456358fe38473896afcd977cf44f5d5c5a453d9ec3634ab364ac232cdf0306c07eb5c14d7553724315fbdc1a4733fff7175def5ccac6183d51b37105bd06feebbbacf4c44bb8a1fabd396f9d838d1752a76d0162416e75ad066873639deb30f097a6770e959c11331a7288e228f2f2527ab76c278f1c3c9cfb3ca750bf732e4e0c4802357f588901ed6d491f0a5c02108119aa5fe58b9caa888feae20638f190a4f2e6045c35ac94ead4a35698434475b39741fa5ceb568bce16ceedd0c9e22d63772c042f7bd7765c55690e4dda42684d1a478f3127a123e9013d35fa9c2822005aece8e8d6e79d50ed337e9d95c2fb0923a40ff6d847fcac0bdb34d83f6944da283af55f98aa73f204aa864bfb3c3b951a07696d15ed59ce4c05436199bc38f19a7b612d0534ccfcef7314a768240117a121e84e0f909df67b520cb83bcbc277e6d85f2c479c1b2413383d86903f63d9cdcceafb7fe279e2b1b4c95174b2bbd3872d76818cda215844d459bc712c9808fea4e4a8a3033972f26e99dd7ff7a53d14ed44224aeb9a71a274d51ee6fffb00539d4f04dc6ad56f43186090fca0846835463bc645ba"}],"_postman_id":"705f80d5-19cf-4e22-9755-fc4b5d7618c4"},{"name":"Subscription Cancel","id":"232b4c44-887c-4072-bbe5-a6f0622f8a7d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[{"key":"accessCode","value":"{{access-code}}","description":"<p>Access Code shared by Hesabe</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"0e7898bd7464d0c402fe8a949d9cbf9b84c9ca6239b5e015bd42c0d4b30b12eecf89d9cecc66986c52d5145595cc68cf9873789d944a3ce7d3ea73ddb48045940ae99d02f0b0b414626da214d7d96460df35544be448594177a228f2a9290e020b37f84c93ee09e5ccccc25263b2f5891db8a215836af865a1a3657d9ba6583b0149d604415219656c3b4198a835af36bbf29903170f3e1e7895ee571eb4c40cc18f54df32deee38abb00d9cbd448639c12be5981f639433763aceb1178416727d8f9fbf15ebbf6e419effd6b6420c03b2fa423638a969038a7d7378223215e1628674aaf0bf6f5f855fad9188f109157ed2ea3601c094400caf30b7d3fcf65075a726bceca536013e799a305c54b8cce40282ddb0cde35ee14310eb5f2e8a84af1e45b0d44caabbcaf8cc8ee74de9af4d094828fd52b9559a1ac74b363b123f0da21e063d8007c5dcede9bbc4fe223965e9387572d635f1125144bfdf53f0e2","description":"<p>Encrypted data generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> Library</p>\n","type":"text","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/api/subscription/cancel/84221717429745853945677459388","description":"<p>You need to send the encrypted data which is generated by <code>encrypt()</code> method in <code>HesabeCrypt</code> class.</p>\n<p>You need to pass the <code>encoded array of params</code>, <code>encryption ket</code> and <code>iv key</code> in <code>encrypt(params, encryption_key, iv_key)</code> to generate the <code>data</code> and pass into this API.</p>\n","urlObject":{"path":["subscription","cancel","84221717429745853945677459388"],"host":["http://127.0.0.1:8000/api/v2/api"],"query":[],"variable":[]}},"response":[{"id":"e98d1826-4bc4-4705-906a-4d3ef5ff9c2a","name":"Subscription Cancel","originalRequest":{"method":"DELETE","header":[{"key":"accessCode","value":"{{access-code}}","description":"Access Code shared by Hesabe","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"data","value":"0e7898bd7464d0c402fe8a949d9cbf9b84c9ca6239b5e015bd42c0d4b30b12eecf89d9cecc66986c52d5145595cc68cf9873789d944a3ce7d3ea73ddb48045940ae99d02f0b0b414626da214d7d96460df35544be448594177a228f2a9290e020b37f84c93ee09e5ccccc25263b2f5891db8a215836af865a1a3657d9ba6583b0149d604415219656c3b4198a835af36bbf29903170f3e1e7895ee571eb4c40cc18f54df32deee38abb00d9cbd448639c12be5981f639433763aceb1178416727d8f9fbf15ebbf6e419effd6b6420c03b2fa423638a969038a7d7378223215e1628674aaf0bf6f5f855fad9188f109157ed2ea3601c094400caf30b7d3fcf65075a726bceca536013e799a305c54b8cce40282ddb0cde35ee14310eb5f2e8a84af1e45b0d44caabbcaf8cc8ee74de9af4d094828fd52b9559a1ac74b363b123f0da21e063d8007c5dcede9bbc4fe223965e9387572d635f1125144bfdf53f0e2","description":"Encrypted data generated by `encrypt()` method in `HesabeCrypt` Library","type":"text","disabled":true}]},"url":"http://127.0.0.1:8000/api/v2/api/subscription/cancel/84221717429745853945677459388"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 27 Mar 2025 13:33:03 GMT"},{"key":"Server","value":"Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12"},{"key":"X-Powered-By","value":"PHP/8.2.12"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"code\": 200,\n    \"message\": \"Subscription cancelled successfully.\"\n}"}],"_postman_id":"232b4c44-887c-4072-bbe5-a6f0622f8a7d"}],"variable":[{"key":"api","value":"http://127.0.0.1:8000/api/v2/"}]}