{"info":{"_postman_id":"40e00cf2-4be5-4ad4-95ba-6b1683ff8ae4","name":"Edfapay Checkout Integration","description":"<html><head></head><body><h2 id=\"introduction\">Introduction</h2>\n<p>This document describes the Checkout integration procedures between Checkout service and the website for e-commerce merchants.</p>\n<h2 id=\"general-information\">General Information</h2>\n<p>Checkout service is a fast and easy way to create a secure payment page. It allows collecting and submitting payments and sending them for processing.</p>\n<p>To use the Checkout service on the site you have to perform integration. Checkout integration provides a set of APIs that allow customizing payment processing for the business. These protocols implement acquiring payments (purchases) using specific API interaction with the merchant websites.</p>\n<img src=\"https://docs.expresspay.sa/assets/images/checkout_payment_flow.png\">\n\n<p>When a Customer wants to make a purchase on your site the following happens:</p>\n<ol>\n<li><p>Customer places an order and initiates payment on the site.</p>\n</li>\n<li><p>Site confirms the order and sends the payment processing request to the Checkout system with information about the order, payment and hash.</p>\n</li>\n<li><p>Checkout system validates the request and sends to the site the response with the redirect link.</p>\n</li>\n<li><p>The site redirects the Customer on the Checkout page by redirect link.</p>\n</li>\n<li><p>Customer selects the payment method, enters the payment data and confirms the payment. The payment method will be specifying automatically If only one method is available.</p>\n</li>\n<li><p>The payment processes at Payment Gateway.</p>\n</li>\n<li><p>Payment Gateway sends a callback to the site with the payment result.</p>\n</li>\n<li><p>The payment result is shown to the Customer.</p>\n</li>\n</ol>\n<p>The payment could be declined in case of invalid data detection.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21813149","collectionId":"40e00cf2-4be5-4ad4-95ba-6b1683ff8ae4","publishedId":"2s9Y5SX6Xs","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"00E6A0"},"publishDate":"2023-08-20T11:08:14.000Z"},"item":[{"name":"Initiate","event":[{"listen":"prerequest","script":{"id":"5a37bb5b-6a68-4b04-a2ef-1d8d92c088a7","exec":["var order_number = pm.environment.get(\"order_number\");","var order_amount = pm.environment.get(\"order_amount\");","var order_currency = \"SAR\";","var order_description = pm.environment.get(\"order_description\");","var merchant_pass = pm.environment.get('merchant_password');","","//formula:","var to_md5 = order_number + order_amount + order_currency + order_description + merchant_pass;","// Use the CryptoJS","","var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());","var result = CryptoJS.enc.Hex.stringify(hash);","// Set the new environment variable","postman.setEnvironmentVariable('session_hash', result);"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"aecc62eb-074c-462f-a618-5a6723560004","exec":[""],"type":"text/javascript","packages":{}}}],"id":"51ada774-6275-41ee-ac0c-dd618963deef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"action","value":"SALE","type":"text"},{"key":"edfa_merchant_id","value":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","type":"text","description":"<p>Unique key (client_key)\nEdfapay merchant key - UUID format value</p>\n"},{"key":"order_id","value":"ORD001","type":"text","description":"<p>Transaction ID in the Merchants system\nString up to 255 characters</p>\n"},{"key":"order_amount","value":"1.00","type":"text","description":"<p>Format depends on currency.\nSend Integer type value for currencies with zero-exponent. Example: 1000\nSend Float type value for currencies with exponents 2, 3, 4.\nFormat for 2-exponent currencies: XX.XX Example: 100.99\nPay attention that currencies 'UGX', 'JPY', 'KRW', 'CLP' must be send in the format XX.XX, with the zeros after comma. Example: 100.00\nFormat for 3-exponent currencies: XXX.XXX Example: 100.999.\nFormat for 4-exponent currencies: XXX.XXXX Example: 100.9999</p>\n"},{"key":"order_currency","value":"SAR","type":"text","description":"<p>Currency\n3-letter code</p>\n"},{"key":"order_description","value":"An order","type":"text","description":"<p>Description of the transaction (product name)\nString up to 1024 characters</p>\n"},{"key":"req_token","value":"N","type":"text","description":"<p>Special attribute pointing for further tokenization\nY or N (default N)</p>\n"},{"key":"payer_first_name","value":"FisrtName","type":"text","description":"<p>Customer's name\nString up to 32 characters</p>\n"},{"key":"payer_last_name","value":"LastName","type":"text","description":"<p>Customer's surname\nString up to 32 characters</p>\n"},{"key":"payer_address","value":"example@example.com","type":"text","description":"<p>String up to 255 characters</p>\n"},{"key":"payer_country","value":"SA","type":"text","description":"<p>2-letter code</p>\n"},{"key":"payer_city","value":"Riyadh","type":"text","description":"<p>Customer's city\nString up to 32 characters</p>\n"},{"key":"payer_zip","value":"12221","type":"text","description":"<p>ZIP-code of the Customer\nString up to 10 characters</p>\n"},{"key":"payer_email","value":"example@example.com","type":"text","description":"<p>Customer's email\nString up to 256 characters</p>\n"},{"key":"payer_phone","value":"966565555555","type":"text","description":"<p>Customer's phone\nString up to 32 characters</p>\n"},{"key":"payer_ip","value":"176.44.76.222","type":"text","description":"<p>IP-address of the Customer\nXXX.XXX.XXX.XXX</p>\n"},{"key":"term_url_3ds","value":"https://successorfailurl.com","type":"text","description":"<p>URL to which Customer should be returned after 3D-Secure\nString up to 1024 characters</p>\n"},{"key":"auth","value":"N","type":"text","description":"<p>Indicates that transaction must be only authenticated, but not captured\nY or N (default N)</p>\n"},{"key":"recurring_init","value":"N","type":"text","description":"<p>Initialization of the transaction with possible following recurring\nY or N (default N)</p>\n"},{"key":"hash","value":"{{session_hash}}","description":"<p>Special signature to validate your request to Payment Platform Addition in Signature section.\nExample: Must be SHA1 of MD5 encoded string (uppercased): order_number + order_amount + order_currency + order_description + password</p>\n","type":"text"}]},"url":"https://api.edfapay.com/payment/initiate","description":"<h2 id=\"authentication-request-parameters\">Authentication request parameters</h2>\n<p>The merchant submits an authorization request and as a result of successful response receives the <code>redirect_url</code> - link on the Checkout page.</p>\n<p><code>/payment/initiate</code></p>\n<p>The authentication performs when the payment is initiated. <em><strong>INFO:</strong></em> You need to create an authentication request to start checkout process for the Customers.</p>\n<h2 id=\"callback-parameters\">Callback Parameters</h2>\n<p>Notification endpoint must be of method <strong>POST</strong> and able to accept <strong>form-data</strong> as the content type.</p>\n<h3 id=\"successful-sale-response-card-payment\">Successful Sale response (Card Payment)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>SALE</td>\n</tr>\n<tr>\n<td>result</td>\n<td>SUCCESS</td>\n</tr>\n<tr>\n<td>status</td>\n<td>SETTLED</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>trans_id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>Special signature, used to validate callback md5(strtoupper(strrev(email).PASSWORD.trans_id.strrev(substr(card_number,0,6).substr(card_number,-4))))</td>\n</tr>\n<tr>\n<td>recurring_token</td>\n<td>Recurring token (get if account support recurring sales and was initialization transaction for following recurring)</td>\n</tr>\n<tr>\n<td>schedule_id</td>\n<td>It is available if schedule is used for recurring sale</td>\n</tr>\n<tr>\n<td>card_token</td>\n<td>If the parameter req_token was enabled Payment Platform returns the token value</td>\n</tr>\n<tr>\n<td>card</td>\n<td>Card mask</td>\n</tr>\n<tr>\n<td>card_expiration_date</td>\n<td>Card expiration date</td>\n</tr>\n<tr>\n<td>trans_date</td>\n<td>Transaction date in the Payment Platform</td>\n</tr>\n<tr>\n<td>descriptor</td>\n<td>Descriptor from the bank, the same as cardholder will see in the bank statement</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Order amount</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>Currency</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"unsuccessful-sale-response-card-payment\">Unsuccessful sale response (Card Payment)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>SALE</td>\n</tr>\n<tr>\n<td>result</td>\n<td>DECLINED</td>\n</tr>\n<tr>\n<td>status</td>\n<td>DECLINED</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>trans_id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>trans_date</td>\n<td>Transaction date in the Payment Platform</td>\n</tr>\n<tr>\n<td>decline_reason</td>\n<td>Description of the cancellation of the transaction</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>Special signature, used to validate callback md5(strtoupper(strrev(email).PASSWORD.trans_id.strrev(substr(card_number,0,6).substr(card_number,-4))))</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"3d-secure-transaction-response-card-payment\">3D-Secure transaction response (Card Payment)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>action</td>\n<td>SALE</td>\n</tr>\n<tr>\n<td>result</td>\n<td>REDIRECT</td>\n</tr>\n<tr>\n<td>status</td>\n<td>3DS/REDIRECT</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>trans_id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>Special signature, used to validate callback md5(strtoupper(strrev(email).PASSWORD.trans_id.strrev(substr(card_number,0,6).substr(card_number,-4))))</td>\n</tr>\n<tr>\n<td>trans_date</td>\n<td>Transaction date in the Payment Platform</td>\n</tr>\n<tr>\n<td>descriptor</td>\n<td>Descriptor from the bank, the same as cardholder will see in the bank statement</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>Order amount</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>Currency</td>\n</tr>\n<tr>\n<td>redirect_url</td>\n<td>URL to which the Merchant should redirect the Customer</td>\n</tr>\n<tr>\n<td>redirect_params</td>\n<td>Object with the parameters. It is array if redirect_params have no data. The availability of the redirect_params depends on the data transmitted by the acquirer. redirect_params may be missing. It usually happens when redirect_method = GET</td>\n</tr>\n<tr>\n<td>redirect_method</td>\n<td>The method of transferring parameters (POST/GET)</td>\n</tr>\n<tr>\n<td>card</td>\n<td>Masked card details</td>\n</tr>\n<tr>\n<td>card_expiration_date</td>\n<td>Card expiration date in MM/YYYY format</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"sale-response-apple-pay\">Sale response (Apple Pay)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>order_number</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>order_amount</td>\n<td>Order amount</td>\n</tr>\n<tr>\n<td>order_currency</td>\n<td>Order currency</td>\n</tr>\n<tr>\n<td>order_description</td>\n<td>Order description</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>Must be SHA1 of MD5 encoded string (uppercased): payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass</td>\n</tr>\n<tr>\n<td>type</td>\n<td>(sale/refund)</td>\n</tr>\n<tr>\n<td>status</td>\n<td>(success/fail)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"sale-response-tamara\">Sale response (Tamara)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>order_number</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>order_amount</td>\n<td>Order amount</td>\n</tr>\n<tr>\n<td>order_currency</td>\n<td>Order currency</td>\n</tr>\n<tr>\n<td>order_description</td>\n<td>Order description</td>\n</tr>\n<tr>\n<td>type</td>\n<td>(sale/refund)</td>\n</tr>\n<tr>\n<td>status</td>\n<td>(success/fail)</td>\n</tr>\n<tr>\n<td>source</td>\n<td>(tamara)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"sale-response-manafith\">Sale response (Manafith)*</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Transaction ID in the Payment Platform</td>\n</tr>\n<tr>\n<td>order_number</td>\n<td>Transaction ID in the Merchant's system</td>\n</tr>\n<tr>\n<td>order_amount</td>\n<td>Order amount</td>\n</tr>\n<tr>\n<td>order_currency</td>\n<td>Order currency</td>\n</tr>\n<tr>\n<td>order_description</td>\n<td>Order description</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>Must be SHA1 of MD5 encoded string (uppercased): payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass</td>\n</tr>\n<tr>\n<td>type</td>\n<td>(sale/refund)</td>\n</tr>\n<tr>\n<td>status</td>\n<td>(success/fail)</td>\n</tr>\n<tr>\n<td>source</td>\n<td>(manafith)</td>\n</tr>\n</tbody>\n</table>\n</div><p>*Soon will be launched</p>\n<h2 id=\"testing-cards\">Testing Cards</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th></th>\n<th></th>\n<th></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Mastercard</td>\n<td>5123450000000008</td>\n<td>Y</td>\n</tr>\n<tr>\n<td>Mastercard</td>\n<td>5111111111111118</td>\n<td>N</td>\n</tr>\n<tr>\n<td>Visa</td>\n<td>4508750015741019</td>\n<td>Y</td>\n</tr>\n<tr>\n<td>Visa</td>\n<td>4012000033330026</td>\n<td>N</td>\n</tr>\n<tr>\n<td>American Express</td>\n<td>345678901234564</td>\n<td>Y</td>\n</tr>\n<tr>\n<td>American Express</td>\n<td>371449635398431</td>\n<td>N</td>\n</tr>\n</tbody>\n</table>\n</div><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Expiry Date</strong></th>\n<th><strong>Transaction Response Gateway Code</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>01 / 39</td>\n<td>APPROVED</td>\n</tr>\n<tr>\n<td>05 / 39</td>\n<td>DECLINED</td>\n</tr>\n<tr>\n<td>04 / 27</td>\n<td>EXPIRED_CARD</td>\n</tr>\n<tr>\n<td>08 / 28</td>\n<td>TIMED_OUT</td>\n</tr>\n<tr>\n<td>01 / 37</td>\n<td>ACQUIRER_SYSTEM_ERROR</td>\n</tr>\n<tr>\n<td>02 / 37</td>\n<td>UNSPECIFIED_FAILURE</td>\n</tr>\n<tr>\n<td>05 / 37</td>\n<td>UNKNOWN</td>\n</tr>\n</tbody>\n</table>\n</div><div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>CSC/CVV</strong></th>\n<th><strong>CSC/CVV Response Gateway Code</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>100</td>\n<td>MATCH</td>\n</tr>\n<tr>\n<td>101</td>\n<td>NOT_PROCESSED</td>\n</tr>\n<tr>\n<td>102</td>\n<td>NO_MATCH</td>\n</tr>\n<tr>\n<td>American Express</td>\n<td></td>\n</tr>\n<tr>\n<td>1000</td>\n<td>MATCH</td>\n</tr>\n<tr>\n<td>1010</td>\n<td>NOT_PROCESSED</td>\n</tr>\n<tr>\n<td>1020</td>\n<td>NO_MATCH</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request-body\">Request Body</h2>\n<p>Following is the request body parameters with example</p>\n","urlObject":{"protocol":"https","path":["payment","initiate"],"host":["api","edfapay","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"51ada774-6275-41ee-ac0c-dd618963deef"},{"name":"Status","event":[{"listen":"prerequest","script":{"id":"5811529b-97b8-4515-b082-6fc780a773af","exec":["// Must be SHA1 of MD5 encoded string (uppercased): payment_id + merchant_pass","var password = \"e3ee4e96e925b088377aa628c42f6568\";","var payment_id = \"xxxxxxxx-aa15-11ee-beec-4ac04ca8935e\";","var to_md5 = payment_id + password;","console.log(CryptoJS.MD5(to_md5.toUpperCase()).toString());","console.log(CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString()));","var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());","var result = CryptoJS.enc.Hex.stringify(hash);","postman.setEnvironmentVariable('hash', result);"],"type":"text/javascript"}}],"id":"5f9bf5c5-b8f1-46ac-b48b-313edb28f336","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"100\",\n    \"merchant_id\": \"xxxxxxx-0f25-4e31-8097-5422e4cdabbb\",\n    \"gway_Payment_id\": \"xxxxxxxx-aa15-11ee-beec-4ac04ca8935e\",\n    \"hash\": \"{{hash}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.edfapay.com/payment/status","description":"<p>API return's transaction status of specific payment.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory, Limitations</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>order_id</td>\n<td>String</td>\n<td>Required</td>\n<td>Order id of merchant system.  <br /><strong>Example:</strong> ORD-001</td>\n</tr>\n<tr>\n<td>merchant_id</td>\n<td>String</td>\n<td>Required</td>\n<td>Key for the Merchant identification  <br /><strong>Example</strong>: xxxxx-xxxxx-xxxxx</td>\n</tr>\n<tr>\n<td>gway_Payment_id</td>\n<td>String</td>\n<td>Required</td>\n<td>Payment Id</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>String</td>\n<td>Required</td>\n<td>Special signature to validate your request to Payment Platform.  <br />Example: Must be SHA1 of MD5 encoded string (uppercased): payment_id + merchant_pass</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["payment","status"],"host":["api","edfapay","com"],"query":[],"variable":[]}},"response":[{"id":"1886c993-5097-4e38-81b0-edf8c97009ce","name":"Failure Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"Abdul001\",\n    \"merchant_id\": \"b1efc42a-67d3-4bdc-8382-7059bb665036\",\n    \"hash\": \"{{hash}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.edfapay.com/payment/status"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"statusCode\": 400,\n    \"responseBody\": \"Order Not Found.\"\n}"},{"id":"af9c0d8f-6388-4ce2-a589-50cf2eb1f5d1","name":"Success Response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"oooor009\",\n    \"merchant_id\": \"xxxxxxxx-0f25-4e31-8097-5422e4cdabbb\",\n    \"gway_Payment_id\": \"xxxxxxxx-aa15-11ee-beec-4ac04ca8935e\",\n    \"hash\": \"{{hash}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.edfapay.com/payment/status"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 03 Jan 2024 11:54:46 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1 ; mode=block"},{"key":"Referrer-Policy","value":"no-referrer"}],"cookie":[],"responseTime":null,"body":"{\n    \"statusCode\": 200,\n    \"responseBody\": {\n        \"date\": \"2024-01-03 08:52:34\",\n        \"status\": \"settled\",\n        \"order\": {\n            \"number\": \"oooor009\",\n            \"amount\": \"0.11\",\n            \"currency\": \"SAR\",\n            \"description\": \"TEST DESCRIPTION1\"\n        },\n        \"customer\": {\n            \"name\": \"M Adnan Hashmi\",\n            \"email\": \"example@example.com\"\n        },\n        \"payment_id\": \"xxxxxxxx-aa15-11ee-beec-4ac04ca8935e\"\n    }\n}"}],"_postman_id":"5f9bf5c5-b8f1-46ac-b48b-313edb28f336"},{"name":"Refund","event":[{"listen":"prerequest","script":{"id":"b2f773a9-f394-42e3-bbb0-bac3849556b5","exec":["var payment_id = \"904776a0-4635-11ee-97c2-7a6dc1121caa\";","var amount =\"1.00\";","var merchant_pass = \"ba7718273600a88fc43a242627e57ad5\";","//formula:","var to_md5 = payment_id + amount + merchant_pass;","// Use the CryptoJS","var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());","var result = CryptoJS.enc.Hex.stringify(hash);","console.log(hash);","// Set the new environment variable","postman.setEnvironmentVariable('hash', result);","console.log(result);"],"type":"text/javascript"}}],"id":"a22777c3-a906-4d7c-b510-181a2f4ee21b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"gwayId\": \"23828b1e-5c55-11ee-9e87-aee84e39de53\",\n    \"order_id\": \"Abdul001\",\n    \"edfa_merchant_id\": \"b1efc42a-67d3-4bdc-8382-7059bb665036\",\n    \"hash\": \"{{hash}}\",\n    \"payer_ip\": \"176.44.76.222\",\n    \"amount\":\"1.00\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.edfapay.com/payment/refund","description":"<h3 id=\"request-parameters\"><strong>Request Parameters</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory, Limitation</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>gwayId</td>\n<td>String</td>\n<td>Required</td>\n<td>Public transaction id of Payment Gateway  <br />xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</td>\n</tr>\n<tr>\n<td>order_id</td>\n<td>String</td>\n<td>Required</td>\n<td>Order Id of merchant system</td>\n</tr>\n<tr>\n<td>edfapay_merchant_id</td>\n<td>String</td>\n<td>Required</td>\n<td>Merchant Key indentifier  <br />xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</td>\n</tr>\n<tr>\n<td>hash</td>\n<td>String</td>\n<td>Required</td>\n<td>Special signature to validate your request to Payment Platform.  <br /><strong>Example:</strong> Must be SHA1 of MD5 encoded string (uppercased):payment.id + amount + merchant.pass</td>\n</tr>\n<tr>\n<td>payer_ip</td>\n<td>String</td>\n<td>Requred</td>\n<td><strong>Example:</strong> 172.34.34.12</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>String</td>\n<td>Required</td>\n<td>Amount to refund. It is required for particular refund. If amount is not specified the full order amount is settled by default.  <br /><strong>Example:</strong> 0.19</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response-parameters\"><strong>Response Parameters</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Parameter</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>statusCode</td>\n<td>Status code from API</td>\n</tr>\n<tr>\n<td>responseBody</td>\n<td>Body of response  <br /><strong>Example:</strong> \"{\\\"payment_id\\\":\\\"c6edb648-5c5a-11ee-a0e7-c64a620ea757\\\",\\\"result\\\":\\\"accepted\\\"}\"</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["payment","refund"],"host":["api","edfapay","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a22777c3-a906-4d7c-b510-181a2f4ee21b"},{"name":"Recurring","event":[{"listen":"prerequest","script":{"id":"f4e91ded-5e8c-43f1-b057-10f1653b9bd1","exec":["var merchant_pass = '247c6445e7c29ee4889b2b94cc1bf6ad';","var order_number = \"Abdul00012\";","var order_amount = \"0.11\";","var order_currency = \"SAR\";","var order_description = \"Recurring test order\";","var recurring_init_trans_id = \"58bd9554-466f-11ee-8d44-7a6dc1121caa\";","var recurring_token = \"58ccf36e-466f-11ee-840d-7a6dc1121caa\";","//formula:","//var recurring_token = \"6eee615a-cab5-11ec-b176-0242ac120013\";","var to_md5 = recurring_init_trans_id + recurring_token + order_number + order_amount + order_description + merchant_pass;","// Use the CryptoJS","var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());","var result = CryptoJS.enc.Hex.stringify(hash);","// Set the new environment variable","postman.setEnvironmentVariable('session_hash', result);","pm.variables.set('order_amount', order_amount);","pm.variables.set('order_currency', order_currency);","pm.variables.set('order_description', order_description);","pm.variables.set('order_number', order_number);","pm.variables.set('recurring_init_trans_id', recurring_init_trans_id);","pm.variables.set('recurring_token', recurring_token);"],"type":"text/javascript"}}],"id":"2ec9c5be-47ab-4a58-8732-bf30be03077e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"Abdul00012\",\n    \"merchant_id\": \"b1efc42a-67d3-4bdc-8382-7059bb665036\",\n    \"hash\": \"{{session_hash}}\",\n    \"action\": \"RECURRING_SALE\",\n    \"order_amount\": 0.11,\n    \"primary_order_id\": \"Abdul00012\",\n    \"order_description\": \"Recurring test order\",\n    \"payer_ip\": \"176.44.76.222\",\n    \"recurring_token\": \"58ccf36e-466f-11ee-840d-7a6dc1121caa\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.edfapay.com/payment/recurring","urlObject":{"protocol":"https","path":["payment","recurring"],"host":["api","edfapay","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"2ec9c5be-47ab-4a58-8732-bf30be03077e"}]}