{"info":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","description":"<html><head></head><body><h2 id=\"introduction\">Introduction</h2>\n<p>Welcome to the Payment API Collection. This collection provides a streamlined interface for interacting with our payment processing API, with special focus on subscription management. A powerful pre-request script handles template management, request formatting, and signature generation automatically.</p>\n<h2 id=\"key-features\">Key Features</h2>\n<ul>\n<li><p><strong>Automatic Template Application</strong>: Pre-configured subscription templates for different scenarios</p>\n</li>\n<li><p><strong>Request Signing</strong>: Automatic SHA-256 signature generation</p>\n</li>\n<li><p><strong>ID Generation</strong>: Optional automatic generation of transaction and customer IDs</p>\n</li>\n<li><p><strong>Field Formatting</strong>: Automatic stringification of complex objects</p>\n</li>\n<li><p><strong>Environment Integration</strong>: Seamless use of environment variables for credentials and URLs</p>\n</li>\n</ul>\n<h2 id=\"getting-started\">Getting Started</h2>\n<h3 id=\"1-set-up-your-environment\">1. Set Up Your Environment</h3>\n<p>Before making any requests, create an environment with these variables:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>MERCHANT-NO</code></td>\n<td>Your merchant identifier</td>\n</tr>\n<tr>\n<td><code>APPID</code></td>\n<td>Your application ID</td>\n</tr>\n<tr>\n<td><code>SECRET</code></td>\n<td>Your API secret key</td>\n</tr>\n<tr>\n<td><code>RETURN-URL</code></td>\n<td>URL for redirecting users after payment</td>\n</tr>\n<tr>\n<td><code>WEBHOOK-ENDPOINT</code></td>\n<td>URL for receiving payment notifications</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"2-configure-collection-variables-optional\">2. Configure Collection Variables (Optional)</h3>\n<p>For advanced customization, you can set these collection variables:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Variable</th>\n<th>Description</th>\n<th>Default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>debugMode</code></td>\n<td>Enable detailed console logging</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>enableRequestSigning</code></td>\n<td>Enable automatic request signing</td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td><code>autoGenerateIds</code></td>\n<td>Auto-generate transaction and customer IDs</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td><code>fieldsToStringify</code></td>\n<td>Additional fields to stringify (comma-separated)</td>\n<td>-</td>\n</tr>\n<tr>\n<td><code>subscription_type</code></td>\n<td>Default subscription type</td>\n<td><code>ONERWAY</code></td>\n</tr>\n<tr>\n<td><code>default_product_name</code></td>\n<td>Default product name for subscriptions</td>\n<td><code>Payment Subscription</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"3-customize-subscription-templates-optional\">3. Customize Subscription Templates (Optional)</h3>\n<p>For subscription operations, you can customize these templates:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Template Variable</th>\n<th>Used For</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>onerway_subscription_template</code></td>\n<td>Auto-debit subscriptions (customer-initiated)</td>\n</tr>\n<tr>\n<td><code>merchant_subscription_template</code></td>\n<td>Merchant-initiated subscriptions</td>\n</tr>\n<tr>\n<td><code>merchant_renewal_template</code></td>\n<td>Subscription renewal requests</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"advanced-usage\">Advanced Usage</h2>\n<h3 id=\"controlling-id-generation\">Controlling ID Generation</h3>\n<p>The script automatically generates IDs when <code>autoGenerateIds</code> is set to <code>true</code>:</p>\n<ul>\n<li><p><code>merchantTxnId</code>&nbsp;will be generated as a UUID</p>\n</li>\n<li><p><code>merchantCustId</code>&nbsp;will be generated in format&nbsp;<code>CustId-XXXX-XXXX</code></p>\n</li>\n</ul>\n<h4 id=\"skipping-merchantcustid-generation\">Skipping merchantCustId Generation</h4>\n<p>For requests where you need to use your own <code>merchantCustId</code> values while still auto-generating <code>merchantTxnId</code>, you can:</p>\n<ol>\n<li><p><strong>Add a header</strong>: Include&nbsp;<code>X-Skip-MerchantCustId-Generation</code>&nbsp;header (with any value) in your request</p>\n</li>\n<li><p><strong>Add a body flag</strong>: Include&nbsp;<code>\"skipMerchantCustIdGeneration\": true</code>&nbsp;in your request body (this flag will be automatically removed before sending)</p>\n</li>\n</ol>\n<p>This is useful for:</p>\n<ul>\n<li><p>Customer update operations where you need to use an existing customer ID</p>\n</li>\n<li><p>Requests where you want to manually specify the customer ID</p>\n</li>\n<li><p>Testing specific customer ID formats or values</p>\n</li>\n</ul>\n<h3 id=\"skipping-request-signing\">Skipping Request Signing</h3>\n<p>To skip request signing for a specific request:</p>\n<ol>\n<li><p>Add header&nbsp;<code>X-Skip-Signing</code>&nbsp;with any value, or</p>\n</li>\n<li><p>Add&nbsp;<code>\"sign\": \"skip_sign\"</code>&nbsp;to your request body</p>\n</li>\n</ol>\n<h3 id=\"custom-field-stringification\">Custom Field Stringification</h3>\n<p>To stringify additional fields, set <code>fieldsToStringify</code> collection variable:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>CopybillingInformation,customField1,customField2\n\n</code></pre><h2 id=\"troubleshooting\">Troubleshooting</h2>\n<h3 id=\"common-issues\">Common Issues</h3>\n<ol>\n<li><p><strong>\"Invalid signature\" error</strong>:</p>\n<ul>\n<li><p>Verify your&nbsp;<code>SECRET</code>&nbsp;environment variable is correct</p>\n</li>\n<li><p>Check that request signing is enabled</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Template not applying</strong>:</p>\n<ul>\n<li><p>Verify template variables are properly formatted JSON strings</p>\n</li>\n<li><p>Enable&nbsp;<code>debugMode</code>&nbsp;to see detailed logs</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Missing required fields</strong>:</p>\n<ul>\n<li>When&nbsp;<code>debugMode</code>&nbsp;is enabled, check console for validation warnings</li>\n</ul>\n</li>\n<li><p><strong>Customer ID issues</strong>:</p>\n<ul>\n<li><p>If you need to use your own customer IDs, use the&nbsp;<code>X-Skip-MerchantCustId-Generation</code>&nbsp;header</p>\n</li>\n<li><p>Check if&nbsp;<code>autoGenerateIds</code>&nbsp;is enabled when you expect IDs to be generated</p>\n</li>\n</ul>\n</li>\n</ol>\n<h3 id=\"debugging\">Debugging</h3>\n<ol>\n<li><p>Set collection variable&nbsp;<code>debugMode</code>&nbsp;to&nbsp;<code>true</code></p>\n</li>\n<li><p>Open Postman Console (View &gt; Show Postman Console)</p>\n</li>\n<li><p>Send your request</p>\n</li>\n<li><p>Review the detailed logs showing template application and request processing</p>\n</li>\n</ol>\n<h2 id=\"reference\">Reference</h2>\n<h3 id=\"subscription-types\">Subscription Types</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Type</th>\n<th><code>selfExecute</code>&nbsp;Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ONERWAY</td>\n<td>\"1\"</td>\n<td>Auto-debit subscription with automatic renewals</td>\n</tr>\n<tr>\n<td>MERCHANT</td>\n<td>\"2\"</td>\n<td>Merchant-initiated subscription requiring manual renewal</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"frequency-types\">Frequency Types</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>D</td>\n<td>Days</td>\n<td>\"30\" = Every 30 days</td>\n</tr>\n<tr>\n<td>W</td>\n<td>Weeks</td>\n<td>\"2\" = Every 2 weeks</td>\n</tr>\n<tr>\n<td>M</td>\n<td>Months</td>\n<td>\"1\" = Monthly</td>\n</tr>\n<tr>\n<td>Y</td>\n<td>Years</td>\n<td>\"1\" = Yearly</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-types\">Request Types</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>\"0\"</td>\n<td>New subscription creation</td>\n</tr>\n<tr>\n<td>\"1\"</td>\n<td>Subscription renewal</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"control-headers\">Control Headers</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Purpose</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>X-Skip-Signing</code></td>\n<td>Skip request signing for this request</td>\n</tr>\n<tr>\n<td><code>X-Skip-MerchantCustId-Generation</code></td>\n<td>Skip auto-generation of merchantCustId while still generating merchantTxnId</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"42640412","collectionId":"5a010caa-b72e-434d-805b-aa5825fb1b9e","publishedId":"2sAYkBu2dA","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-27T06:50:12.000Z"},"item":[{"name":"Payments","item":[{"name":"Checkout","item":[{"name":"Card Checkout","event":[{"listen":"prerequest","script":{"id":"af0d0025-17fe-4df4-a982-374f99dc99a8","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"d0396425-de67-4663-8a4c-be2ba892e37d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"1a0fd5de-cca5-4cce-9f86-df6590c19666","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"billingInformation\": {\r\n        \"address\": \"241 Kertzmann Fields\",\r\n        \"city\": \"West Brandyn\",\r\n        \"country\": \"US\",\r\n        \"email\": \"Aurelie92@hotmail.com\",\r\n        \"firstName\": \"Susana\",\r\n        \"identityNumber\": \"12580057025\",\r\n        \"lastName\": \"Kulas\",\r\n        \"phone\": \"19482423334\",\r\n        \"postalCode\": \"96840-0235\",\r\n        \"province\": \"CO\"\r\n    },\r\n    \"merchantCustId\": \"[Auto-generated with collection variable]\",\r\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\r\n    \"merchantTxnId\": \"[Auto-generated with collection variable]\",\r\n    \"merchantTxnTime\": \"2025-03-17 13:47:24\",\r\n    \"orderAmount\": \"20\",\r\n    \"orderCurrency\": \"USD\",\r\n    \"shippingInformation\": {\r\n        \"address\": \"56902 The Grove\",\r\n        \"city\": \"Arnaldomouth\",\r\n        \"country\": \"US\",\r\n        \"email\": \"Rhianna.Ernser@yahoo.com\",\r\n        \"firstName\": \"Jessika\",\r\n        \"identityNumber\": \"67068309615\",\r\n        \"lastName\": \"Gorczany\",\r\n        \"phone\": \"17955147003\",\r\n        \"postalCode\": \"75100-4748\",\r\n        \"province\": \"CO\"\r\n    },\r\n    \"sign\": null,\r\n    \"txnOrderMsg\": {\r\n        \"accept\": \"*/*\",\r\n        \"appId\": \"{{APPID}}\",\r\n        \"colorDepth\": \"16\",\r\n        \"contentLength\": \"1024\",\r\n        \"javaEnabled\": false,\r\n        \"language\": \"en-US\",\r\n        \"products\": [\r\n            {\r\n                \"currency\": \"USD\",\r\n                \"name\": \"berry\",\r\n                \"num\": \"24\",\r\n                \"price\": \"759.19\",\r\n                \"type\": \"incididunt irure\"\r\n            }\r\n        ],\r\n        \"returnUrl\": \"{{RETURN-URL}}\",\r\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\r\n        \"screenHeight\": \"1080\",\r\n        \"screenWidth\": \"962\",\r\n        \"timeZoneOffset\": \"60\",\r\n        \"transactionIp\": \"187.160.136.242\",\r\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\r\n    },\r\n    \"productType\": \"CARD\",\r\n    \"subProductType\": \"DIRECT\",\r\n    \"txnType\": \"SALE\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/txn/payment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["txn","payment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a0fd5de-cca5-4cce-9f86-df6590c19666"},{"name":"Card Checkout - Subscribe","id":"927b2960-443a-4240-872d-1c23db937e6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"55339 Dominic Crossing\",\n        \"city\": \"Lake Hailee\",\n        \"country\": \"US\",\n        \"email\": \"Delbert91@yahoo.com\",\n        \"firstName\": \"Elinore\",\n        \"identityNumber\": \"69488183258\",\n        \"lastName\": \"Kuhn\",\n        \"phone\": \"19901025846\",\n        \"postalCode\": \"28589-2404\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-K9QQ-8RIX\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"1fea782d-b284-4b74-88a2-b6487b727ff7\",\n    \"merchantTxnTime\": \"2025-03-20 18:20:28\",\n    \"orderAmount\": \"75\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"61438 S Oak Street\",\n        \"city\": \"Gladyceburgh\",\n        \"country\": \"US\",\n        \"email\": \"Mateo56@gmail.com\",\n        \"firstName\": \"Marques\",\n        \"identityNumber\": \"18505809347\",\n        \"lastName\": \"Shields\",\n        \"phone\": \"14003715265\",\n        \"postalCode\": \"83798\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"16\",\n        \"contentLength\": \"16384\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"custard apple\",\n                \"num\": \"40\",\n                \"price\": \"853.19\",\n                \"type\": \"deserunt in ipsum Duis\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"sprout\",\n                \"num\": \"76\",\n                \"price\": \"663.89\",\n                \"type\": \"pariatur proident\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"915\",\n        \"screenWidth\": \"414\",\n        \"timeZoneOffset\": \"540\",\n        \"transactionIp\": \"48.176.33.125\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"subscription\": {\n        \"requestType\": \"0\",\n        \"selfExecute\": \"2\",\n        \"productName\": \"Fantastic Wooden Hat\",\n        \"frequencyType\": \"D\",\n        \"frequencyPoint\": \"1\",\n        \"merchantCustId\": \"CustId-C7JY-6955\",\n        \"expireDate\": \"2025-11-02\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"SUBSCRIBE\",\n    \"txnType\": \"SALE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/txn/payment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["txn","payment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"927b2960-443a-4240-872d-1c23db937e6a"},{"name":"APMs Checkout","id":"95c5ad1a-438c-4981-a27a-f44a698ff4f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"9906 Memorial Drive\",\n        \"city\": \"St. George\",\n        \"country\": \"US\",\n        \"email\": \"Chaim43@yahoo.com\",\n        \"firstName\": \"Laurianne\",\n        \"identityNumber\": \"64084959617\",\n        \"lastName\": \"Waters\",\n        \"phone\": \"15630974977\",\n        \"postalCode\": \"53309-4050\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-R027-48LF\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"290cee25-d39c-45d2-ad42-70c6de2f06df\",\n    \"merchantTxnTime\": \"2025-03-21 15:18:05\",\n    \"orderAmount\": \"67\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"84229 Alysson Port\",\n        \"city\": \"Bossier City\",\n        \"country\": \"US\",\n        \"email\": \"Anna82@yahoo.com\",\n        \"firstName\": \"Grant\",\n        \"identityNumber\": \"19962919727\",\n        \"lastName\": \"Ledner\",\n        \"phone\": \"15051183530\",\n        \"postalCode\": \"44295\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"24\",\n        \"contentLength\": \"4096\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"longan\",\n                \"num\": \"95\",\n                \"price\": \"256.19\",\n                \"type\": \"Ut enim in\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"strawberry\",\n                \"num\": \"19\",\n                \"price\": \"915.09\",\n                \"type\": \"incididunt do tempor est\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"tangelo\",\n                \"num\": \"53\",\n                \"price\": \"181.05\",\n                \"type\": \"do dolore dolor sed cupidatat\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"640\",\n        \"screenWidth\": \"3840\",\n        \"timeZoneOffset\": \"-360\",\n        \"transactionIp\": \"22.131.154.58\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"ALL\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"SALE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/txn/payment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["txn","payment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"95c5ad1a-438c-4981-a27a-f44a698ff4f6"},{"name":"Single-Method APM Checkout","id":"5e166943-78a3-417f-a506-ea7a4eac8c03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"79745 Yost Plain\",\n        \"city\": \"Fayetteville\",\n        \"country\": \"US\",\n        \"email\": \"Jakayla0@hotmail.com\",\n        \"firstName\": \"Elfrieda\",\n        \"identityNumber\": \"12639115128\",\n        \"lastName\": \"Murphy\",\n        \"phone\": \"17642769913\",\n        \"postalCode\": \"98958\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-UILA-F33Q\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"b92bea42-f8a7-468d-a501-ccd1c7396fd7\",\n    \"merchantTxnTime\": \"2025-03-21 15:19:41\",\n    \"orderAmount\": \"20\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"628 Sauer Villages\",\n        \"city\": \"Isomstead\",\n        \"country\": \"US\",\n        \"email\": \"Johanna80@yahoo.com\",\n        \"firstName\": \"Madie\",\n        \"identityNumber\": \"00830222859\",\n        \"lastName\": \"Upton\",\n        \"phone\": \"17524904920\",\n        \"postalCode\": \"47452-0197\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"24\",\n        \"contentLength\": \"1024\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"dragonfruit\",\n                \"num\": \"58\",\n                \"price\": \"231.09\",\n                \"type\": \"et exercitation consectetur sint irure\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"loquat\",\n                \"num\": \"49\",\n                \"price\": \"800.89\",\n                \"type\": \"ut dolore consectetur\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"1080\",\n        \"screenWidth\": \"1680\",\n        \"timeZoneOffset\": \"540\",\n        \"transactionIp\": \"244.211.212.91\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"lpmsInfo\": {\n        \"lpmsType\": \"Alipay+\",\n        \"bankName\": null,\n        \"iBan\": null,\n        \"walletAccountId\": null,\n        \"walletAccountName\": null,\n        \"prepaidNumber\": null\n    },\n    \"productType\": \"ALL\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"SALE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/txn/payment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["txn","payment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5e166943-78a3-417f-a506-ea7a4eac8c03"}],"id":"a0f14c85-ff82-43b9-b284-8bb8321773d4","_postman_id":"a0f14c85-ff82-43b9-b284-8bb8321773d4","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"JS-SDK","item":[{"name":"One-Time Payment Intent","id":"d0a75a91-b2a8-4f97-af99-bf4abef73412","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"9802 Greenville Road\",\n        \"city\": \"Fort Minnietown\",\n        \"country\": \"US\",\n        \"email\": \"Florence.Halvorson@yahoo.com\",\n        \"firstName\": \"Guy\",\n        \"identityNumber\": \"88735246783\",\n        \"lastName\": \"Stiedemann\",\n        \"phone\": \"13745880174\",\n        \"postalCode\": \"80283-9986\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-54AM-X6T8\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"2aff37ec-1099-4b65-a6f1-1757b2b4add4\",\n    \"merchantTxnTime\": \"2025-03-21 15:22:26\",\n    \"orderAmount\": \"112\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"74347 McCullough Grove\",\n        \"city\": \"Maybellborough\",\n        \"country\": \"US\",\n        \"email\": \"Magnus_Stanton@yahoo.com\",\n        \"firstName\": \"Lane\",\n        \"identityNumber\": \"58544832720\",\n        \"lastName\": \"Breitenberg\",\n        \"phone\": \"19800722353\",\n        \"postalCode\": \"70481-2817\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"24\",\n        \"contentLength\": \"65536\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"goji berry\",\n                \"num\": \"39\",\n                \"price\": \"92.25\",\n                \"type\": \"velit commodo est incididunt enim\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"cranberry\",\n                \"num\": \"17\",\n                \"price\": \"900.79\",\n                \"type\": \"in qui\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"bush tomato\",\n                \"num\": \"43\",\n                \"price\": \"497.85\",\n                \"type\": \"consectetur eiusmod in officia qui\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"1180\",\n        \"screenWidth\": \"820\",\n        \"timeZoneOffset\": \"-660\",\n        \"transactionIp\": \"100.219.100.45\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"SALE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/sdkTxn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","sdkTxn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0a75a91-b2a8-4f97-af99-bf4abef73412"},{"name":"Subscription Payment Intent","id":"535e1016-42ab-4e7c-9874-80d8d574ea01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"731 Liam Grove\",\n        \"city\": \"South Edythe\",\n        \"country\": \"US\",\n        \"email\": \"Bryce.Stoltenberg@gmail.com\",\n        \"firstName\": \"Tom\",\n        \"identityNumber\": \"14753915712\",\n        \"lastName\": \"Thompson\",\n        \"phone\": \"14809814903\",\n        \"postalCode\": \"29580\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-O67I-45Y8\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"837cb110-af73-4bd8-9565-e92a7a5fe7dc\",\n    \"merchantTxnTime\": \"2025-03-25 11:30:43\",\n    \"orderAmount\": \"51\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"26632 Ardella Forest\",\n        \"city\": \"Rennerview\",\n        \"country\": \"US\",\n        \"email\": \"Emilia.Goldner87@yahoo.com\",\n        \"firstName\": \"Lyric\",\n        \"identityNumber\": \"22492064172\",\n        \"lastName\": \"Mraz\",\n        \"phone\": \"17921271790\",\n        \"postalCode\": \"25220\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"16\",\n        \"contentLength\": \"65536\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"aubergine\",\n                \"num\": \"11\",\n                \"price\": \"284.45\",\n                \"type\": \"laborum\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"844\",\n        \"screenWidth\": \"375\",\n        \"timeZoneOffset\": \"-660\",\n        \"transactionIp\": \"17.70.48.123\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"SUBSCRIBE\",\n    \"txnType\": \"SALE\",\n    \"subscription\": {\n        \"requestType\": \"0\",\n        \"selfExecute\": \"1\",\n        \"productName\": \"Unbranded Granite Soap\",\n        \"frequencyType\": \"Y\",\n        \"bindCard\": true,\n        \"merchantCustId\": \"CustId-8FA8-KR7L\",\n        \"frequencyPoint\": \"39\",\n        \"notificationEmail\": \"Cale.Effertz@gmail.com\",\n        \"metaData\": null,\n        \"trialFromPlan\": \"1\",\n        \"expireDate\": \"2025-12-17\",\n        \"trialDays\": 174\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/sdkTxn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","sdkTxn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"535e1016-42ab-4e7c-9874-80d8d574ea01"},{"name":"Card Tokenization Intent","id":"bc8d5ef1-2b41-4bca-b3be-1820091f149e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"597 S Monroe Street\",\n        \"city\": \"Pollichfurt\",\n        \"country\": \"US\",\n        \"email\": \"Shana98@hotmail.com\",\n        \"firstName\": \"Eladio\",\n        \"identityNumber\": \"88508358250\",\n        \"lastName\": \"Steuber\",\n        \"phone\": \"16484617281\",\n        \"postalCode\": \"25944\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-WK33-L163\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"39db73b3-a999-4076-918f-c4c79e8114e2\",\n    \"merchantTxnTime\": \"2025-03-25 11:32:02\",\n    \"orderAmount\": \"798\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"7285 Schoen Bridge\",\n        \"city\": \"Grand Island\",\n        \"country\": \"US\",\n        \"email\": \"Breana_Reichert@hotmail.com\",\n        \"firstName\": \"Edwardo\",\n        \"identityNumber\": \"39224010356\",\n        \"lastName\": \"Schoen\",\n        \"phone\": \"18278914703\",\n        \"postalCode\": \"38159\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"32\",\n        \"contentLength\": \"16384\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"cantaloupe\",\n                \"num\": \"28\",\n                \"price\": \"299.29\",\n                \"type\": \"ut minim cillum\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"nectarine\",\n                \"num\": \"74\",\n                \"price\": \"268.19\",\n                \"type\": \"aliquip\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"915\",\n        \"screenWidth\": \"1366\",\n        \"timeZoneOffset\": \"-120\",\n        \"transactionIp\": \"219.103.125.210\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"TOKEN\",\n    \"txnType\": \"SALE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/sdkTxn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","sdkTxn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc8d5ef1-2b41-4bca-b3be-1820091f149e"}],"id":"a85f1715-579d-46ba-8633-fb9b33da0bb4","_postman_id":"a85f1715-579d-46ba-8633-fb9b33da0bb4","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"API","item":[{"name":"Card","id":"77af9aef-1704-4a2c-b0b0-80bfd25e58ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"92039 Laura Glens\",\n        \"city\": \"Aliyahtown\",\n        \"country\": \"US\",\n        \"email\": \"Aurelio.Abernathy85@gmail.com\",\n        \"firstName\": \"Joaquin\",\n        \"identityNumber\": \"63154777932\",\n        \"lastName\": \"Erdman\",\n        \"phone\": \"19995003402\",\n        \"postalCode\": \"24070-6390\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-8DK4-I2M1\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"101f3a09-a2a4-463f-ba09-d61c8c2eab13\",\n    \"merchantTxnTime\": \"2025-03-13 22:48:15\",\n    \"orderAmount\": \"56\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"13578 Fourth Avenue\",\n        \"city\": \"Littleland\",\n        \"country\": \"US\",\n        \"email\": \"Caden_Skiles@hotmail.com\",\n        \"firstName\": \"Angelita\",\n        \"identityNumber\": \"11091806876\",\n        \"lastName\": \"Ferry\",\n        \"phone\": \"15766280282\",\n        \"postalCode\": \"38522\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"24\",\n        \"contentLength\": \"65536\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"banana\",\n                \"num\": \"6\",\n                \"price\": \"793.49\",\n                \"type\": \"irure ipsum pariatur\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"avocado\",\n                \"num\": \"9\",\n                \"price\": \"153.49\",\n                \"type\": \"proident aliquip\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"cherry\",\n                \"num\": \"54\",\n                \"price\": \"230.19\",\n                \"type\": \"amet in pariatur aliquip\"\n            }\n        ],\n        \"returnUrl\": \"https://docs.onerway.com/apis/\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"640\",\n        \"screenWidth\": \"1024\",\n        \"timeZoneOffset\": \"540\",\n        \"transactionIp\": \"60.94.239.135\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"SALE\",\n    \"cardInfo\": {\n        \"holderName\": \"CL BRW2\",\n        \"cardNumber\": \"4000000000002701\",\n        \"month\": \"05\",\n        \"year\": \"26\",\n        \"cvv\": \"123\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"77af9aef-1704-4a2c-b0b0-80bfd25e58ff"},{"name":"Pre-Auth","id":"3806e06d-0549-4a0c-a2ac-01ee2c1b1b65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"155 Queen's Road\",\n        \"city\": \"North Rosinaview\",\n        \"country\": \"US\",\n        \"email\": \"Ottis_Rippin@gmail.com\",\n        \"firstName\": \"Jo\",\n        \"identityNumber\": \"91576941117\",\n        \"lastName\": \"Quitzon\",\n        \"phone\": \"19898785542\",\n        \"postalCode\": \"48599\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-9LJD-DT5X\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"60f059e5-a44f-4e16-8d5c-158dcffb9b03\",\n    \"merchantTxnTime\": \"2025-03-25 11:33:56\",\n    \"orderAmount\": \"5\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"7832 Raynor Shores\",\n        \"city\": \"Lake Sheaport\",\n        \"country\": \"US\",\n        \"email\": \"Eino99@yahoo.com\",\n        \"firstName\": \"Kristopher\",\n        \"identityNumber\": \"17551410338\",\n        \"lastName\": \"Corwin\",\n        \"phone\": \"16039269409\",\n        \"postalCode\": \"91787-0395\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"24\",\n        \"contentLength\": \"0\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"avocado\",\n                \"num\": \"79\",\n                \"price\": \"48.65\",\n                \"type\": \"Excepteur non ipsum nulla\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"nashi pear\",\n                \"num\": \"20\",\n                \"price\": \"277.16\",\n                \"type\": \"occaecat\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"pear\",\n                \"num\": \"21\",\n                \"price\": \"130.76\",\n                \"type\": \"dolor dolore ut\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"568\",\n        \"screenWidth\": \"768\",\n        \"timeZoneOffset\": \"660\",\n        \"transactionIp\": \"209.100.200.119\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"AUTH\",\n    \"cardInfo\": {\n        \"holderName\": \"CL BRW2\",\n        \"cardNumber\": \"4000000000002701\",\n        \"month\": \"05\",\n        \"year\": \"26\",\n        \"cvv\": \"123\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3806e06d-0549-4a0c-a2ac-01ee2c1b1b65"},{"name":"Capture","id":"d91f8713-dc7f-4c22-ba9c-131ec186399b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"fb3f50d8-9c56-4979-8b10-013dd071f8fe\",\n    \"originTransactionId\": \"{{PRE-AUTH-TRANSACTION-ID}}\",\n    \"sign\": null,\n    \"txnType\": \"CAPTURE\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/authPayment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","authPayment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d91f8713-dc7f-4c22-ba9c-131ec186399b"},{"name":"Auth Reversal","id":"3d9b0360-97f9-41ca-bb57-88362a49fa83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"f2a062a8-464d-48f5-976d-6dd33f5addaf\",\n    \"originTransactionId\": \"{{PRE-AUTH-TRANSACTION-ID}}\",\n    \"sign\": null,\n    \"txnType\": \"VOID\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/authPayment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","authPayment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3d9b0360-97f9-41ca-bb57-88362a49fa83"},{"name":"Subscription Recurring Charge","id":"b4926808-a35e-4bfe-8468-06057ba1d684","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantCustId\": \"CustId-5B05-IJG4\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"77b50fa6-cd3b-4f29-a4ab-aa0cd916a3dd\",\n    \"merchantTxnTime\": \"2025-03-20 18:32:42\",\n    \"orderAmount\": \"2\",\n    \"orderCurrency\": \"USD\",\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"16\",\n        \"contentLength\": \"1024\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"prune\",\n                \"num\": \"11\",\n                \"price\": \"733.09\",\n                \"type\": \"enim ea incididunt in Ut\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"844\",\n        \"screenWidth\": \"1440\",\n        \"timeZoneOffset\": \"60\",\n        \"transactionIp\": \"165.219.215.62\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"SUBSCRIBE\",\n    \"txnType\": \"SALE\",\n    \"subscription\": {\n        \"requestType\": \"1\",\n        \"tokenId\": \"\",\n        \"contractId\": \"\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b4926808-a35e-4bfe-8468-06057ba1d684"},{"name":"Card Tokenization","id":"6d50c306-c61b-4aac-84bc-56e90cee6ae1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"appId\": \"{{APPID}}\",\n    \"cardInfo\": {\n        \"holderName\": \"CL BRW2\",\n        \"cardNumber\": \"4000000000002701\",\n        \"month\": \"05\",\n        \"year\": \"26\",\n        \"cvv\": \"123\"\n    },\n    \"country\": \"US\",\n    \"email\": \"Gilbert_Gerhold76@yahoo.com\",\n    \"merchantCustId\": \"CustId-452O-VEFC\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"sign\": null,\n    \"transactionIp\": \"217.147.34.157\"\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/bindCard","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","bindCard"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d50c306-c61b-4aac-84bc-56e90cee6ae1"},{"name":"Tokenized Payment","id":"8bc2055e-2e20-451e-95b1-234554ad30f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"888 Carissa Corners\",\n        \"city\": \"Belleville\",\n        \"country\": \"US\",\n        \"email\": \"Barry22@hotmail.com\",\n        \"firstName\": \"Lavada\",\n        \"identityNumber\": \"03030966228\",\n        \"lastName\": \"Cartwright-Kreiger\",\n        \"phone\": \"17899439030\",\n        \"postalCode\": \"19326\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-2441-DYA7\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"544e0b5b-278c-464b-80af-b6c8c32d2fc0\",\n    \"merchantTxnTime\": \"2025-03-25 13:46:48\",\n    \"orderAmount\": \"506\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"39597 Chestnut Grove\",\n        \"city\": \"Fort Brad\",\n        \"country\": \"US\",\n        \"email\": \"Erik_Hegmann93@gmail.com\",\n        \"firstName\": \"Scarlett\",\n        \"identityNumber\": \"78910069116\",\n        \"lastName\": \"Ziemann\",\n        \"phone\": \"16061058320\",\n        \"postalCode\": \"28280-6639\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"32\",\n        \"contentLength\": \"16384\",\n        \"javaEnabled\": false,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"sprout\",\n                \"num\": \"71\",\n                \"price\": \"53.19\",\n                \"type\": \"proident sint occaecat commodo\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"1080\",\n        \"screenWidth\": \"2560\",\n        \"timeZoneOffset\": \"720\",\n        \"transactionIp\": \"228.79.98.106\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"TOKEN\",\n    \"txnType\": \"SALE\",\n    \"tokenInfo\": {\n        \"tokenId\": \"{{CARD-TOKEN}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8bc2055e-2e20-451e-95b1-234554ad30f7"},{"name":"Subscription - Charge by Onerway","id":"b80c0948-504b-4e75-9c06-dd221ab0b574","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"830 Ash Close\",\n        \"city\": \"Lake Deshawnburgh\",\n        \"country\": \"US\",\n        \"email\": \"Nichole.Russel@gmail.com\",\n        \"firstName\": \"Meta\",\n        \"identityNumber\": \"87996890227\",\n        \"lastName\": \"Weimann\",\n        \"phone\": \"18940600778\",\n        \"postalCode\": \"76297\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-37D4-R070\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"ce45735b-3eac-48c1-bbe2-8e9a1d8bd7ae\",\n    \"merchantTxnTime\": \"2025-03-26 08:08:16\",\n    \"orderAmount\": \"9\",\n    \"orderCurrency\": \"USD\",\n    \"shippingInformation\": {\n        \"address\": \"615 Eleonore Field\",\n        \"city\": \"Lake Efren\",\n        \"country\": \"US\",\n        \"email\": \"Myrtice_Satterfield98@gmail.com\",\n        \"firstName\": \"Wilber\",\n        \"identityNumber\": \"05791838835\",\n        \"lastName\": \"Reichel-Will\",\n        \"phone\": \"19411637134\",\n        \"postalCode\": \"89018-6361\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"16\",\n        \"contentLength\": \"1024\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"apple\",\n                \"num\": \"44\",\n                \"price\": \"748.35\",\n                \"type\": \"Excepteur dolore sint elit Lorem\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"nashi pear\",\n                \"num\": \"18\",\n                \"price\": \"589.59\",\n                \"type\": \"dolore pariatur velit tempor\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"blackberry\",\n                \"num\": \"65\",\n                \"price\": \"646.41\",\n                \"type\": \"laboris\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"1800\",\n        \"screenWidth\": \"820\",\n        \"timeZoneOffset\": \"180\",\n        \"transactionIp\": \"137.253.150.126\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"SUBSCRIBE\",\n    \"txnType\": \"SALE\",\n    \"cardInfo\": {\n        \"holderName\": \"CL BRW2\",\n        \"cardNumber\": \"4000000000002701\",\n        \"month\": \"05\",\n        \"year\": \"26\",\n        \"cvv\": \"123\"\n    },\n    \"subscription\": {\n        \"requestType\": \"0\",\n        \"selfExecute\": \"2\",\n        \"productName\": \"Electronic Granite Bacon\",\n        \"frequencyType\": \"D\",\n        \"frequencyPoint\": \"31\",\n        \"merchantCustId\": \"CustId-A703-4191\",\n        \"expireDate\": \"2025-06-12\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b80c0948-504b-4e75-9c06-dd221ab0b574"},{"name":"Subscription Initial Charge","id":"f1c01b68-43f2-4773-b0ad-bc9b3e9df3aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"billingInformation\": {\r\n        \"address\": \"56715 Houston Cliffs\",\r\n        \"city\": \"Vitohaven\",\r\n        \"country\": \"US\",\r\n        \"email\": \"Clara32@yahoo.com\",\r\n        \"firstName\": \"Makenzie\",\r\n        \"identityNumber\": \"37655170195\",\r\n        \"lastName\": \"Hickle\",\r\n        \"phone\": \"17697201067\",\r\n        \"postalCode\": \"58475\",\r\n        \"province\": \"CO\"\r\n    },\r\n    \"merchantCustId\": \"CustId-G5R5-103Y\",\r\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\r\n    \"merchantTxnId\": \"18c7c81f-b071-4197-9aff-fb5186f5a255\",\r\n    \"merchantTxnTime\": \"2025-03-18 11:36:45\",\r\n    \"orderAmount\": \"30\",\r\n    \"orderCurrency\": \"USD\",\r\n    \"shippingInformation\": {\r\n        \"address\": \"1117 E 9th Street\",\r\n        \"city\": \"Fort Sofia\",\r\n        \"country\": \"US\",\r\n        \"email\": \"Adele.Macejkovic11@hotmail.com\",\r\n        \"firstName\": \"Dolly\",\r\n        \"identityNumber\": \"68101535042\",\r\n        \"lastName\": \"Satterfield\",\r\n        \"phone\": \"16257349558\",\r\n        \"postalCode\": \"10903-6665\",\r\n        \"province\": \"CO\"\r\n    },\r\n    \"sign\": null,\r\n    \"txnOrderMsg\": {\r\n        \"accept\": \"*/*\",\r\n        \"appId\": \"{{APPID}}\",\r\n        \"colorDepth\": \"32\",\r\n        \"contentLength\": \"65536\",\r\n        \"javaEnabled\": true,\r\n        \"language\": \"en-US\",\r\n        \"products\": [\r\n            {\r\n                \"currency\": \"USD\",\r\n                \"name\": \"prune\",\r\n                \"num\": \"10\",\r\n                \"price\": \"387.93\",\r\n                \"type\": \"aliqua in\"\r\n            }\r\n        ],\r\n        \"returnUrl\": \"{{RETURN-URL}}\",\r\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\r\n        \"screenHeight\": \"667\",\r\n        \"screenWidth\": \"2560\",\r\n        \"timeZoneOffset\": \"300\",\r\n        \"transactionIp\": \"141.247.197.181\",\r\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\r\n    },\r\n    \"productType\": \"CARD\",\r\n    \"subProductType\": \"SUBSCRIBE\",\r\n    \"txnType\": \"SALE\",\r\n    \"cardInfo\": {\r\n        \"holderName\": \"CL BRW2\",\r\n        \"cardNumber\": \"4000000000002701\",\r\n        \"month\": \"05\",\r\n        \"year\": \"26\",\r\n        \"cvv\": \"123\"\r\n    },\r\n    \"subscription\": {\r\n        \"requestType\": \"0\",\r\n        \"selfExecute\": \"2\",\r\n        \"productName\": \"Handmade Fresh Chips\",\r\n        \"frequencyType\": \"D\",\r\n        \"frequencyPoint\": \"33\",\r\n        \"merchantCustId\": \"CustId-4VK2-V418\",\r\n        \"expireDate\": \"2025-09-24\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f1c01b68-43f2-4773-b0ad-bc9b3e9df3aa"},{"name":"Subscription Recurring Charge","id":"edca8ab3-6e3a-4429-b194-6e13254249a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantCustId\": \"CustId-I306-Y752\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"c2bac749-cf3f-424f-85a5-c4c9aadba1de\",\n    \"merchantTxnTime\": \"2025-03-26 14:10:12\",\n    \"orderAmount\": \"35\",\n    \"orderCurrency\": \"USD\",\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"32\",\n        \"contentLength\": \"16384\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"starfruit\",\n                \"num\": \"15\",\n                \"price\": \"14.49\",\n                \"type\": \"Ut et\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"blood orange\",\n                \"num\": \"84\",\n                \"price\": \"685.95\",\n                \"type\": \"irure do incididunt Duis\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"1366\",\n        \"screenWidth\": \"3440\",\n        \"timeZoneOffset\": \"180\",\n        \"transactionIp\": \"99.204.221.135\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"CARD\",\n    \"subProductType\": \"SUBSCRIBE\",\n    \"txnType\": \"SALE\",\n    \"subscription\": {\n        \"requestType\": \"1\",\n        \"tokenId\": \"{{TOKEN-FOR-SUBSCRIPTION}}\",\n        \"contractId\": \"{{SUBSCRIPTION-CONTRACT}}\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"edca8ab3-6e3a-4429-b194-6e13254249a2"},{"name":"Subscription Cancellation","id":"60686820-58ad-4a9a-8afe-120c3389758d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"contractId\": \"{{SUBSCRIPTION-CONTRACT}}\",\n    \"expireMode\": \"1\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/sub/cancel","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","sub","cancel"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"60686820-58ad-4a9a-8afe-120c3389758d"},{"name":"Subscription Reactivation","id":"5f53da4b-c115-49de-8808-fb626a1b264b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"contractId\": \"{{SUBSCRIPTION-CONTRACT}}\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/sub/action/revoke","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","sub","action","revoke"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f53da4b-c115-49de-8808-fb626a1b264b"}],"id":"e47fa9a1-1df1-4044-8f96-b705dcba7423","_postman_id":"e47fa9a1-1df1-4044-8f96-b705dcba7423","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"Refund","item":[{"name":"Initiate Refund","id":"0386332c-0c4d-4447-b8e8-b781291dc037","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"R-ae12b246-4bd1-4ab3-bf59-015addef697d\",\n    \"originTransactionId\": \"{{TRANSACTION-TO-REFUND}}\",\n    \"refundAmount\": \"{{REFUND-AMOUNT}}\",\n    \"refundType\": \"0\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/onlineRefund","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","onlineRefund"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0386332c-0c4d-4447-b8e8-b781291dc037"},{"name":"Cancel Refund","id":"7fa1591d-21eb-4f18-8091-069437318f81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"R-09a18258-affb-4a77-835d-3b569e2c285f\",\n    \"originTransactionId\": \"{{TRANSACTION-TO-REFUND}}\",\n    \"refundAmount\": \"10\",\n    \"refundType\": \"1\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/onlineRefund","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","onlineRefund"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fa1591d-21eb-4f18-8091-069437318f81"}],"id":"ddf52d1f-16f9-43cb-b44d-3aa2278e3ef0","_postman_id":"ddf52d1f-16f9-43cb-b44d-3aa2278e3ef0","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"Query","item":[{"name":"Retrieve Subscription Details","id":"5d05aae1-9bb7-44f5-8d23-9b71eda1c718","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"contractId\": \"{{SUBSCRIPTION-CONTRACT}}\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/sub/detail","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","sub","detail"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5d05aae1-9bb7-44f5-8d23-9b71eda1c718"},{"name":"Retrieve Transaction Orders","id":"cfba8476-8372-4701-b022-0ec9889d7093","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"current\": \"1\",\n    \"endTime\": \"2025-03-26 23:22:50\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnIds\": null,\n    \"sign\": null,\n    \"startTime\": \"2025-03-25 18:22:50\",\n    \"transactionIds\": \"1904889894200016896\",\n    \"txnTypes\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/list","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","list"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfba8476-8372-4701-b022-0ec9889d7093"},{"name":"Query Installment Options","id":"1d77f405-8efe-4d0c-9560-aff8616debcd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"appId\": \"{{APPID}}\",\n    \"cardInfo\": {\n        \"cardNumber\": \"5470465240624325\"\n    },\n    \"country\": \"MX\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"orderAmount\": \"122.60\",\n    \"orderCurrency\": \"MXN\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/consultInstallment","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","consultInstallment"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1d77f405-8efe-4d0c-9560-aff8616debcd"},{"name":"Query Chargeback Records","id":"d70a44fe-0543-4448-9d58-5b2be487965a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"chargebackIds\": null,\n  \"current\": \"1\",\n  \"importTimeStart\": \"2025-03-06 18:12:10\",\n  \"importTimeEnd\": \"2025-02-06 18:12:10\",\n  \"merchantNo\": \"{{MERCHANT-NO}}\",\n  \"merchantTxnIds\": \"\",\n  \"originTransactionIds\": \"\",\n  \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/chargeback/list","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","chargeback","list"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d70a44fe-0543-4448-9d58-5b2be487965a"},{"name":"Retrieve Card Tokenization Records","event":[{"listen":"prerequest","script":{"id":"34c2e582-1a69-486a-8ff2-c53360400e83","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"0e0c2dc2-e416-4b38-a7a2-161b1f991ff9","exec":[""],"type":"text/javascript","packages":{}}}],"id":"2a8a7aae-0c47-46cf-a62d-550adfea3a5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-Skip-MerchantCustId-Generation","value":"true","description":"<p>a control flag that instructs the pre-request script to bypass automatic generation of the merchantCustId field while still allowing other automated processing (such as merchantTxnId generation and request signing) to proceed normally.</p>\n","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"appId\": \"{{APPID}}\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantCustId\": \"CustId-PC32-PHRO\",\n    \"subProductType\": \"TOKEN\",\n    \"sign\": null\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/queryTokenList","description":"<p>Fetches stored tokenization records for a specific customer using their merchant-assigned customer ID. This endpoint returns all active payment tokens associated with the customer, including masked card details and token status information.</p>\n","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","queryTokenList"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a8a7aae-0c47-46cf-a62d-550adfea3a5e"}],"id":"c6de50c1-2b33-4f65-87a5-b20015229d58","_postman_id":"c6de50c1-2b33-4f65-87a5-b20015229d58","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"Settlement","item":[{"name":"Settlement File Download","event":[{"listen":"prerequest","script":{"id":"20ec63a2-13bc-45bb-a1aa-724223790038","exec":["// Pre-request Script for Settlement File Download API\r","// Purpose: Generate signature for required headers (currency, date, merchantNo)\r","\r","// Step 1: Get header values from request\r","const currency = pm.request.headers.get('currency');\r","const date = pm.request.headers.get('date');\r","\r","// Step 2: Get merchantNo (prioritize user input over environment variable)\r","let merchantNo = pm.request.headers.get('merchantNo');\r","if (!merchantNo || merchantNo === '{{MERCHANT-NO}}') {\r","    merchantNo = pm.environment.get('MERCHANT-NO');\r","    console.log('Using environment variable for merchantNo:', merchantNo);\r","} else {\r","    console.log('Using custom merchantNo from request:', merchantNo);\r","}\r","\r","// Get SECRET from environment variables\r","const secret = pm.environment.get('SECRET');\r","if (!secret) {\r","    console.error('Error: SECRET environment variable is not set');\r","}\r","\r","// Log header values for debugging\r","console.log('Headers to sign:');\r","console.log('- currency:', currency);\r","console.log('- date:', date);\r","console.log('- merchantNo:', merchantNo);\r","console.log('- secret: secret');\r","\r","// Step 3: Generate signature if all required values are present\r","if (currency && date && merchantNo && secret) {\r","    // Concatenate values for signing (including SECRET at the end)\r","    const dataToSign = currency + date + merchantNo + secret;\r","    console.log('Data string to sign: ', dataToSign);\r","    \r","    // Generate SHA-256 signature\r","    const signature = CryptoJS.SHA256(dataToSign).toString();\r","    console.log('Generated signature:', signature);\r","    \r","    // Step 4: Set signature in request header\r","    pm.request.headers.upsert({\r","        key: 'sign',\r","        value: signature\r","    });\r","    \r","    console.log('Signature header added successfully');\r","} else {\r","    console.error('Error: Missing required values for signature generation');\r","    console.error('Please ensure currency, date, merchantNo, and SECRET are properly set');\r","}\r",""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"34c2dd27-a2e1-42c1-8622-bbb5181bf8c5","exec":[""],"type":"text/javascript","packages":{}}}],"id":"b02af891-be2f-47d0-921d-6e16aab9627f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"currency","value":"USD","description":"<p>The settlement currency code for the requested file (e.g., USD).</p>\n","type":"text"},{"key":"date","value":"20250221","description":"<p>Target settlement date in YYYYMMDD format.</p>\n","type":"text"},{"key":"merchantNo","value":"{{MERCHANT-NO}}","description":"<p>Your merchant identifier for authentication and data filtering.</p>\n","type":"text"},{"key":"sign","value":"","type":"text"},{"key":"Content-Type","value":"application/octet-stream","description":"<p>Defines response format as downloadable binary data.</p>\n","type":"text"}],"url":"{{baseUrl}}/v1/settlementFile/download","description":"<p>StartFragmentThis API allows merchants to download settlement files containing transaction reconciliation data for a specified date and currency. Files are delivered in binary format for direct processing or import into accounting systems.EndFragment</p>\n","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","settlementFile","download"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b02af891-be2f-47d0-921d-6e16aab9627f"}],"id":"7f43bda2-7598-413c-8488-f4550cae45ae","_postman_id":"7f43bda2-7598-413c-8488-f4550cae45ae","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}},{"name":"APMs","item":[{"name":"iDEAL","id":"d3a11dc7-b388-41cc-8a4e-2b73141e65c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"billingInformation\": {\n        \"address\": \"71265 Nick Walk\",\n        \"city\": \"Lake Griffintown\",\n        \"country\": \"NL\",\n        \"email\": \"Santiago_Runte-Carroll28@yahoo.com\",\n        \"firstName\": \"Isadore\",\n        \"identityNumber\": \"49236840675\",\n        \"lastName\": \"Labadie\",\n        \"phone\": \"15417341223\",\n        \"postalCode\": \"65743\",\n        \"province\": \"CO\"\n    },\n    \"merchantCustId\": \"CustId-QA51-972H\",\n    \"merchantNo\": \"{{MERCHANT-NO}}\",\n    \"merchantTxnId\": \"f80ff7b6-a3bc-4b5e-9ad2-594eb389217e\",\n    \"merchantTxnTime\": \"2025-03-14 09:42:05\",\n    \"orderAmount\": \"1\",\n    \"orderCurrency\": \"EUR\",\n    \"shippingInformation\": {\n        \"address\": \"69834 Steuber Haven\",\n        \"city\": \"Port Carleefurt\",\n        \"country\": \"NL\",\n        \"email\": \"Dolly.Bradtke38@gmail.com\",\n        \"firstName\": \"Justina\",\n        \"identityNumber\": \"59956091639\",\n        \"lastName\": \"Leannon\",\n        \"phone\": \"19737510513\",\n        \"postalCode\": \"22149\",\n        \"province\": \"CO\"\n    },\n    \"sign\": null,\n    \"txnOrderMsg\": {\n        \"accept\": \"*/*\",\n        \"appId\": \"{{APPID}}\",\n        \"colorDepth\": \"32\",\n        \"contentLength\": \"1024\",\n        \"javaEnabled\": true,\n        \"language\": \"en-US\",\n        \"products\": [\n            {\n                \"currency\": \"USD\",\n                \"name\": \"kiwi fruit\",\n                \"num\": \"35\",\n                \"price\": \"627.15\",\n                \"type\": \"deserunt cillum\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"blueberry\",\n                \"num\": \"73\",\n                \"price\": \"292.72\",\n                \"type\": \"dolore irure quis sed\"\n            },\n            {\n                \"currency\": \"USD\",\n                \"name\": \"passionfruit\",\n                \"num\": \"53\",\n                \"price\": \"704.24\",\n                \"type\": \"laborum do qui eu veniam\"\n            }\n        ],\n        \"returnUrl\": \"{{RETURN-URL}}\",\n        \"notifyUrl\": \"{{WEBHOOK-ENDPOINT}}\",\n        \"screenHeight\": \"932\",\n        \"screenWidth\": \"3440\",\n        \"timeZoneOffset\": \"-180\",\n        \"transactionIp\": \"180.21.162.74\",\n        \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36\"\n    },\n    \"productType\": \"LPMS\",\n    \"subProductType\": \"DIRECT\",\n    \"txnType\": \"SALE\",\n    \"lpmsInfo\": {\n        \"lpmsType\": \"iDEAL\",\n        \"bankName\": null,\n        \"iBan\": null,\n        \"walletAccountId\": null,\n        \"walletAccountName\": null,\n        \"prepaidNumber\": null\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{baseUrl}}/v1/txn/doTransaction","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}},"urlObject":{"path":["v1","txn","doTransaction"],"host":["{{baseUrl}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3a11dc7-b388-41cc-8a4e-2b73141e65c1"}],"id":"0bcb028a-0a1a-4d56-8e8d-aca51285c691","_postman_id":"0bcb028a-0a1a-4d56-8e8d-aca51285c691","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}}],"id":"6d743dfd-cac1-421e-bb31-a571bd57cf14","event":[{"listen":"prerequest","script":{"id":"4ee16ccc-b74e-44ed-8926-6302b715c51b","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"71a1ffdd-21cd-4199-967b-626904b89605","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"6d743dfd-cac1-421e-bb31-a571bd57cf14","description":"","auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"},"isInherited":true,"source":{"_postman_id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","id":"5a010caa-b72e-434d-805b-aa5825fb1b9e","name":"Payment API","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"key":"<key>","value":"{{token}}"}},"event":[{"listen":"prerequest","script":{"id":"17f9d564-4b11-4619-813d-be8105f41c89","type":"text/javascript","exec":["/**\r"," * Unified Request Processing Script\r"," * \r"," * This script combines two major functionalities:\r"," * 1. Subscription Template Management - Automatically applies when subscription field is present\r"," * 2. Request Signing - Formats and signs all requests\r"," * \r"," * Configuration options:\r"," * - enableRequestSigning: Set to \"false\" to globally disable signing\r"," * - debugMode: Set to \"true\" for verbose logging\r"," * - autoGenerateIds: Set to \"true\" to enable automatic ID generation (both merchantTxnId and merchantCustId)\r"," * - fieldsToStringify: Comma-separated list of fields to stringify (merges with defaults)\r"," * - subscription_type: Default subscription type when not specified (\"MERCHANT\" or \"ONERWAY\", defaults to \"ONERWAY\")\r"," * - default_product_name: Default product name for subscriptions (if not in template or user input)\r"," * \r"," * Templates (collection variables):\r"," * - merchant_subscription_template: For new merchant-initiated subscriptions (selfExecute=\"2\")\r"," * - onerway_subscription_template: For new Onerway auto-debit subscriptions (selfExecute=\"1\")\r"," * - merchant_renewal_template: For merchant subscription renewals\r"," * \r"," * @version 2.4\r"," * @lastModified 2025-03-26\r"," */\r","\r","// Import crypto-js properly\r","const CryptoJS = require('crypto-js');\r","\r","// Default fields to stringify\r","const DEFAULT_FIELDS_TO_STRINGIFY = [\r","    'billingInformation', 'cardInfo', 'lpmsInfo', 'shippingInformation', \r","    'subscription', 'tokenInfo', 'txnOrderMsg'\r","];\r","\r","// Get user-configured fields to stringify and merge with defaults\r","function getFieldsToStringify() {\r","    const userFields = pm.collectionVariables.get(\"fieldsToStringify\");\r","    let fieldsSet = new Set(DEFAULT_FIELDS_TO_STRINGIFY);\r","    \r","    // If user specified fields, add them to the set\r","    if (userFields) {\r","        userFields.split(',')\r","            .map(field => field.trim())\r","            .filter(field => field.length > 0)\r","            .forEach(field => fieldsSet.add(field));\r","    }\r","    \r","    return Array.from(fieldsSet);\r","}\r","\r","// Configuration management\r","const config = {\r","    debugMode: pm.collectionVariables.get(\"debugMode\") === \"true\",\r","    enableSigning: pm.collectionVariables.get(\"enableRequestSigning\") !== \"false\",\r","    autoGenerateIds: pm.collectionVariables.get(\"autoGenerateIds\") === \"true\",\r","    defaultSubscriptionType: pm.collectionVariables.get(\"subscription_type\") || \"ONERWAY\",\r","    defaultProductName: pm.collectionVariables.get(\"default_product_name\") || \"Payment Subscription\",\r","    fieldsToStringify: getFieldsToStringify()\r","};\r","\r","// Enhanced logging function\r","function log(message, data) {\r","    if (config.debugMode) {\r","        if (data !== undefined) {\r","            console.log(message, data);\r","        } else {\r","            console.log(message);\r","        }\r","    }\r","}\r","\r","// Skip if request has no body or body is not raw JSON\r","if (!pm.request.body || pm.request.body.mode !== 'raw' || !pm.request.body.raw) {\r","    log(\"Request has no body or body is not raw JSON - skipping processing\");\r","    return;\r","}\r","\r","// Try to parse body as JSON, skip if not valid JSON\r","let requestBody;\r","try {\r","    requestBody = JSON.parse(pm.request.body.raw);\r","} catch (e) {\r","    log(\"Request body is not valid JSON - skipping processing\", e.message);\r","    return;\r","}\r","\r","// Check if signing should be skipped\r","const shouldSkipSigning = \r","    !config.enableSigning || \r","    pm.request.headers.has('X-Skip-Signing') || \r","    requestBody.sign === 'skip_sign';\r","\r","if (shouldSkipSigning) {\r","    log(\"Request signing will be skipped based on configuration or flags\");\r","}\r","\r","// Check if merchantCustId generation should be skipped\r","const shouldSkipMerchantCustIdGeneration = \r","    pm.request.headers.has('X-Skip-MerchantCustId-Generation') || \r","    requestBody.skipMerchantCustIdGeneration === true;\r","\r","if (shouldSkipMerchantCustIdGeneration) {\r","    log(\"MerchantCustId generation will be skipped based on request flags\");\r","}\r","\r","// Utility functions\r","function uuidv4() {\r","    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\r","        const r = Math.random() * 16 | 0;\r","        const v = c === 'x' ? r : (r & 0x3 | 0x8);\r","        return v.toString(16);\r","    });\r","}\r","\r","function generateCustomMerchantCustId() {\r","    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\r","    let firstPart = '';\r","    let secondPart = '';\r","    \r","    for (let i = 0; i < 4; i++) {\r","        firstPart += chars.charAt(Math.floor(Math.random() * chars.length));\r","        secondPart += chars.charAt(Math.floor(Math.random() * chars.length));\r","    }\r","    \r","    return `CustId-${firstPart}-${secondPart}`;\r","}\r","\r","// Generate a descriptive product name based on subscription type and current date\r","function generateDescriptiveProductName(subscriptionType) {\r","    const now = new Date();\r","    const dateStr = `${now.getFullYear()}${(now.getMonth() + 1).toString().padStart(2, '0')}`;\r","    \r","    if (subscriptionType === \"MERCHANT\") {\r","        return `Merchant Subscription Plan (${dateStr})`;\r","    } else {\r","        return `Auto-Debit Subscription (${dateStr})`;\r","    }\r","}\r","\r","// PART 1: SUBSCRIPTION TEMPLATE PROCESSING\r","function processSubscriptionTemplate() {\r","    // Check if request contains subscription field\r","    if (!requestBody.subscription) {\r","        log(\"No subscription field found in request body - skipping template processing\");\r","        return;\r","    }\r","    \r","    log(\"Starting subscription template processing\");\r","    \r","    // Extract user-provided subscription data\r","    let userSubscription = {};\r","    if (typeof requestBody.subscription === 'object') {\r","        userSubscription = requestBody.subscription;\r","    } else if (typeof requestBody.subscription === 'string') {\r","        try {\r","            userSubscription = JSON.parse(requestBody.subscription);\r","        } catch (e) {\r","            console.error(\"Error parsing subscription string:\", e);\r","            return; // Skip processing if subscription can't be parsed\r","        }\r","    }\r","    \r","    // Determine subscription mode based on requestType\r","    const isRenewal = userSubscription.requestType === \"1\";\r","    \r","    // Initialize subscription object and warning messages array\r","    let subscriptionObj = {};\r","    const warningMessages = [];\r","    \r","    // Select appropriate template based on detected mode and type\r","    let templateKey;\r","    let subscriptionType;\r","    \r","    if (isRenewal) {\r","        // For renewals, we only use merchant_renewal_template\r","        templateKey = \"merchant_renewal_template\";\r","        subscriptionType = \"MERCHANT\";\r","        log(\"Detected RENEWAL request (requestType='1'), using merchant_renewal_template\");\r","    } else {\r","        // For new subscriptions, check selfExecute value first\r","        if (userSubscription.selfExecute === \"1\") {\r","            subscriptionType = \"ONERWAY\";\r","            templateKey = \"onerway_subscription_template\";\r","        } else if (userSubscription.selfExecute === \"2\") {\r","            subscriptionType = \"MERCHANT\";\r","            templateKey = \"merchant_subscription_template\";\r","        } else {\r","            // Fall back to collection variable if selfExecute not provided\r","            subscriptionType = config.defaultSubscriptionType;\r","            templateKey = subscriptionType === \"MERCHANT\" ? \r","                \"merchant_subscription_template\" : \"onerway_subscription_template\";\r","        }\r","        log(`Detected NEW subscription request (${subscriptionType}), using ${templateKey}`);\r","    }\r","    \r","    // Use hardcoded default templates if no collection variables are set\r","    const defaultTemplates = {\r","        onerway_subscription_template: {\r","            \"selfExecute\": \"1\",\r","            \"frequencyType\": \"M\",\r","            \"frequencyPoint\": \"1\",\r","            \"expireDate\": \"2025-12-31\",\r","            \"bindCard\": true,\r","            \"productName\": \"Auto-Debit Subscription\",\r","            \"merchantCustId\": pm.variables.get(\"merchant_cust_id\") || pm.collectionVariables.get(\"merchant_cust_id\") || \"\"\r","        },\r","        merchant_subscription_template: {\r","            \"selfExecute\": \"2\",\r","            \"frequencyType\": \"D\",\r","            \"frequencyPoint\": \"30\",\r","            \"expireDate\": \"2025-12-31\",\r","            \"productName\": \"Standard Subscription Plan\",\r","            \"merchantCustId\": pm.variables.get(\"merchant_cust_id\") || pm.collectionVariables.get(\"merchant_cust_id\") || \"\"\r","        },\r","        merchant_renewal_template: {\r","            \"requestType\": \"1\",\r","            \"tokenId\": pm.variables.get(\"token_for_subscription\") || pm.collectionVariables.get(\"token_for_subscription\") || \"\",\r","            \"contractId\": pm.variables.get(\"contract_for_subscription\") || pm.collectionVariables.get(\"contract_for_subscription\") || \"\"\r","        }\r","    };\r","\r","    // Parse template JSON or use default if not available\r","    const templateStr = pm.collectionVariables.get(templateKey);\r","    \r","    try {\r","        if (templateStr) {\r","            subscriptionObj = JSON.parse(templateStr);\r","        } else {\r","            // Use default template if collection variable not set\r","            subscriptionObj = defaultTemplates[templateKey] || {};\r","            log(`No ${templateKey} found in collection variables, using default template`);\r","        }\r","    } catch (e) {\r","        console.error(`Error parsing template (${templateKey}):`, e);\r","        // Fall back to default template if parsing fails\r","        subscriptionObj = defaultTemplates[templateKey] || {};\r","        log(`Error parsing ${templateKey}, using default template`);\r","    }\r","    \r","    // Process based on detected subscription mode\r","    if (isRenewal) {\r","        // RENEWAL REQUEST HANDLING\r","        \r","        // Ensure requestType is set correctly\r","        subscriptionObj.requestType = \"1\";\r","        \r","        // Check for required fields\r","        if (!userSubscription.tokenId && !subscriptionObj.tokenId) {\r","            warningMessages.push(\"Missing required field 'tokenId' for subscription renewal\");\r","        }\r","        \r","        if (!userSubscription.contractId && !subscriptionObj.contractId) {\r","            warningMessages.push(\"Missing required field 'contractId' for subscription renewal\");\r","        }\r","        \r","        // Warning if trying to renew an Onerway subscription\r","        if (userSubscription.selfExecute === \"1\") {\r","            warningMessages.push(\"WARNING: Onerway subscriptions (selfExecute='1') handle renewals automatically. Manual renewal requests are not needed.\");\r","        }\r","        \r","    } else {\r","        // NEW SUBSCRIPTION HANDLING\r","        \r","        // Handle productName for new subscriptions\r","        if (!userSubscription.productName && !subscriptionObj.productName) {\r","            // If neither user nor template has productName, use default or generate one\r","            const generatedName = generateDescriptiveProductName(subscriptionType);\r","            subscriptionObj.productName = config.defaultProductName || generatedName;\r","            log(`Added default productName: ${subscriptionObj.productName}`);\r","        }\r","        \r","        if (subscriptionType === \"MERCHANT\") {\r","            // MERCHANT subscription validation\r","            \r","            // Set default values for merchant-initiated subscriptions\r","            // (only if not provided by user)\r","            if (!userSubscription.selfExecute) {\r","                subscriptionObj.selfExecute = \"2\";\r","            }\r","            \r","            if (!userSubscription.frequencyType) {\r","                subscriptionObj.frequencyType = \"D\";\r","            }\r","            \r","            // Check for incompatible fields\r","            const invalidFields = [\r","                \"trialFromPlan\", \"trialDays\", \"trialEnd\", \r","                \"cycleCount\", \"bindCard\", \"notificationEmail\"\r","            ];\r","            \r","            invalidFields.forEach(field => {\r","                if (userSubscription[field] !== undefined) {\r","                    warningMessages.push(`Field \"${field}\" is not applicable for MERCHANT subscription and will be removed`);\r","                    delete userSubscription[field];\r","                }\r","            });\r","            \r","            // Check required fields\r","            if (!userSubscription.frequencyPoint && !subscriptionObj.frequencyPoint) {\r","                warningMessages.push(\"Missing required field 'frequencyPoint' for MERCHANT subscription\");\r","            }\r","            \r","            if (!userSubscription.expireDate && !subscriptionObj.expireDate) {\r","                warningMessages.push(\"Missing required field 'expireDate' for MERCHANT subscription\");\r","            }\r","            \r","        } else if (subscriptionType === \"ONERWAY\") {\r","            // ONERWAY subscription validation\r","            \r","            // Set default values for Onerway auto-debit subscriptions\r","            // (only if not provided by user)\r","            if (!userSubscription.selfExecute) {\r","                subscriptionObj.selfExecute = \"1\";\r","            }\r","            \r","            if (userSubscription.bindCard === undefined && subscriptionObj.bindCard === undefined) {\r","                subscriptionObj.bindCard = true;\r","            }\r","            \r","            // Validate frequencyType\r","            const validFrequencyTypes = [\"D\", \"W\", \"M\", \"Y\"];\r","            if (userSubscription.frequencyType && \r","                !validFrequencyTypes.includes(userSubscription.frequencyType)) {\r","                warningMessages.push(`Invalid 'frequencyType' value \"${userSubscription.frequencyType}\". Valid values are: ${validFrequencyTypes.join(\", \")}`);\r","            }\r","            \r","            // Check termination condition\r","            if ((!userSubscription.cycleCount && !subscriptionObj.cycleCount) && \r","                (!userSubscription.expireDate && !subscriptionObj.expireDate)) {\r","                warningMessages.push(\"ONERWAY subscription requires either 'cycleCount' or 'expireDate'\");\r","            }\r","            \r","            // Check trial period settings\r","            if ((userSubscription.trialFromPlan === \"1\" || subscriptionObj.trialFromPlan === \"1\") && \r","                (!userSubscription.trialDays && !subscriptionObj.trialDays) && \r","                (!userSubscription.trialEnd && !subscriptionObj.trialEnd)) {\r","                warningMessages.push(\"Trial period enabled (trialFromPlan='1') but neither 'trialDays' nor 'trialEnd' specified\");\r","            }\r","        }\r","    }\r","    \r","    // Merge template with user-provided data (user data takes precedence)\r","    subscriptionObj = {...subscriptionObj, ...userSubscription};\r","    \r","    // Final field corrections based on detected subscription type and mode\r","    if (!isRenewal) {\r","        if (subscriptionType === \"MERCHANT\") {\r","            // Remove incompatible fields for merchant-initiated subscriptions\r","            delete subscriptionObj.trialFromPlan;\r","            delete subscriptionObj.trialDays;\r","            delete subscriptionObj.trialEnd;\r","            delete subscriptionObj.cycleCount;\r","            delete subscriptionObj.bindCard;\r","            delete subscriptionObj.notificationEmail;\r","        }\r","    } else {\r","        // Ensure renewal-specific fields\r","        subscriptionObj.requestType = \"1\";\r","        \r","        // Remove fields that shouldn't be in renewal requests\r","        const fieldsToRemove = [\r","            \"selfExecute\", \"frequencyType\", \"frequencyPoint\", \"expireDate\",\r","            \"trialFromPlan\", \"trialDays\", \"trialEnd\", \"cycleCount\", \"bindCard\",\r","            \"productName\", \"description\" // These fields are not needed for renewals\r","        ];\r","        \r","        fieldsToRemove.forEach(field => {\r","            if (subscriptionObj[field] !== undefined) {\r","                delete subscriptionObj[field];\r","            }\r","        });\r","    }\r","    \r","    // Update request body with validated subscription object\r","    requestBody.subscription = subscriptionObj;\r","    \r","    // Display warnings if any\r","    if (warningMessages.length > 0) {\r","        console.warn(\"⚠️ Subscription Field Validation Warnings:\");\r","        warningMessages.forEach(msg => console.warn(\"  - \" + msg));\r","    }\r","    \r","    // Log current mode and final object\r","    const subscriptionMode = isRenewal ? \"RENEWAL\" : \"NEW\";\r","    log(`Processing ${subscriptionType} subscription ${subscriptionMode} (auto-detected)`);\r","    log(`Using template: ${templateKey}`);\r","    log(`Final subscription object: ${JSON.stringify(subscriptionObj, null, 2)}`);\r","    \r","    // Add visual separator in console for better readability\r","    log(\"----------------------------------------\");\r","}\r","\r","// PART 2: REQUEST PROCESSING AND SIGNING\r","function processAndSignRequest() {\r","    log(\"Starting request processing and signing\");\r","    \r","    log(\"Fields requiring stringification:\", config.fieldsToStringify);\r","    \r","    // Retrieve credentials and URLs from environment\r","    const envVars = {\r","        merchantNo: pm.environment.get('MERCHANT-NO'),\r","        appId: pm.environment.get('APPID'),\r","        returnUrl: pm.environment.get('RETURN-URL'),\r","        webhookEndpoint: pm.environment.get('WEBHOOK-ENDPOINT'),\r","        apiSecret: pm.environment.get('SECRET')\r","    };\r","    \r","    log(\"Original request body:\", requestBody);\r","    \r","    // Replace credentials in top level\r","    if (envVars.merchantNo && requestBody.merchantNo) {\r","        requestBody.merchantNo = envVars.merchantNo;\r","        log(\"Replaced merchantNo with environment value:\", envVars.merchantNo);\r","    }\r","    if (envVars.appId && requestBody.appId) {\r","        requestBody.appId = envVars.appId;\r","        log(\"Replaced appId with environment value:\", envVars.appId);\r","    }\r","    \r","    // Auto-generate IDs if enabled\r","    if (config.autoGenerateIds) {\r","        // Handle merchantTxnId\r","        if ('merchantTxnId' in requestBody) {\r","            requestBody.merchantTxnId = uuidv4();\r","            log(\"Auto-generated UUID for merchantTxnId:\", requestBody.merchantTxnId);\r","        }\r","        \r","        // Handle merchantCustId generation with subscription field consideration\r","        // Only if not explicitly skipped\r","        if (!shouldSkipMerchantCustIdGeneration) {\r","            let generatedMerchantCustId = null;\r","            \r","            // First, check if we need to handle subscription field\r","            if (requestBody.subscription) {\r","                let subscriptionObj = requestBody.subscription;\r","                \r","                // Parse subscription if it's a string\r","                if (typeof subscriptionObj === 'string') {\r","                    try {\r","                        subscriptionObj = JSON.parse(subscriptionObj);\r","                        log(\"Parsed subscription from string to object\");\r","                    } catch (e) {\r","                        log('Warning: Unable to parse subscription string', e.message);\r","                    }\r","                }\r","                \r","                // If subscription contains merchantCustId, generate or use it\r","                if (subscriptionObj && typeof subscriptionObj === 'object' && subscriptionObj.merchantCustId) {\r","                    generatedMerchantCustId = generateCustomMerchantCustId();\r","                    subscriptionObj.merchantCustId = generatedMerchantCustId;\r","                    log(\"Auto-generated custom format ID for merchantCustId in subscription:\", generatedMerchantCustId);\r","                    \r","                    // Convert subscription back to string if it was originally parsed\r","                    if (typeof requestBody.subscription === 'string') {\r","                        requestBody.subscription = JSON.stringify(subscriptionObj);\r","                    } else {\r","                        requestBody.subscription = subscriptionObj;\r","                    }\r","                }\r","            }\r","            \r","            // Now handle top-level merchantCustId, using the generated value if available\r","            if ('merchantCustId' in requestBody) {\r","                // Use the same value as in subscription if it was generated, otherwise generate a new one\r","                if (generatedMerchantCustId) {\r","                    requestBody.merchantCustId = generatedMerchantCustId;\r","                    log(\"Used same custom format ID for top-level merchantCustId as in subscription:\", generatedMerchantCustId);\r","                } else {\r","                    requestBody.merchantCustId = generateCustomMerchantCustId();\r","                    log(\"Auto-generated custom format ID for top-level merchantCustId:\", requestBody.merchantCustId);\r","                }\r","            }\r","        } else {\r","            log(\"Skipping merchantCustId generation as requested\");\r","        }\r","    }\r","    \r","    // Remove skipMerchantCustIdGeneration flag if present\r","    if (requestBody.skipMerchantCustIdGeneration !== undefined) {\r","        delete requestBody.skipMerchantCustIdGeneration;\r","        log(\"Removed skipMerchantCustIdGeneration flag from request body\");\r","    }\r","    \r","    // Process fields needing stringification\r","    config.fieldsToStringify.forEach(field => {\r","        if (requestBody[field]) {\r","            if (field === 'txnOrderMsg') {\r","                // Special handling for transaction order message\r","                let transactionOrderMsg = requestBody[field];\r","                log(`Processing special field '${field}'`, transactionOrderMsg);\r","                \r","                if (typeof transactionOrderMsg === 'string') {\r","                    try {\r","                        transactionOrderMsg = JSON.parse(transactionOrderMsg);\r","                        log(\"Parsed txnOrderMsg from string to object\");\r","                    } catch (e) {\r","                        log('Warning: Unable to parse transaction order message string', e.message);\r","                    }\r","                }\r","                \r","                if (envVars.appId && transactionOrderMsg.appId) {\r","                    transactionOrderMsg.appId = envVars.appId;\r","                    log(\"Replaced appId within txnOrderMsg\");\r","                }\r","                \r","                // Replace returnUrl if available in environment\r","                if (envVars.returnUrl && transactionOrderMsg.returnUrl) {\r","                    transactionOrderMsg.returnUrl = envVars.returnUrl;\r","                    log(\"Replaced returnUrl within txnOrderMsg with environment value:\", envVars.returnUrl);\r","                }\r","                \r","                // Replace webhookUrl/notifyUrl if available in environment\r","                if (envVars.webhookEndpoint) {\r","                    // Check for different possible webhook URL field names\r","                    const webhookFieldNames = ['webhookUrl', 'notifyUrl', 'callbackUrl'];\r","                    webhookFieldNames.forEach(webhookField => {\r","                        if (transactionOrderMsg[webhookField]) {\r","                            transactionOrderMsg[webhookField] = envVars.webhookEndpoint;\r","                            log(`Replaced ${webhookField} within txnOrderMsg with environment value:`, envVars.webhookEndpoint);\r","                        }\r","                    });\r","                }\r","                \r","                if (transactionOrderMsg.products) {\r","                    transactionOrderMsg.products = JSON.stringify(transactionOrderMsg.products);\r","                    log(\"Stringified products array within txnOrderMsg\");\r","                }\r","                \r","                requestBody[field] = JSON.stringify(transactionOrderMsg);\r","                log(`Field '${field}' after processing:`, requestBody[field]);\r","            } else {\r","                // For other fields, just stringify if not already a string\r","                if (typeof requestBody[field] !== 'string') {\r","                    requestBody[field] = JSON.stringify(requestBody[field]);\r","                    log(`Stringified field '${field}'`);\r","                }\r","            }\r","        }\r","    });\r","    \r","    // Remove undefined fields\r","    Object.keys(requestBody).forEach(key => {\r","        if (requestBody[key] === undefined) {\r","            delete requestBody[key];\r","            log(`Removed undefined field '${key}'`);\r","        }\r","    });\r","    \r","    // Sort fields alphabetically\r","    const sortedRequestBody = Object.keys(requestBody)\r","        .sort()\r","        .reduce((obj, key) => {\r","            obj[key] = requestBody[key];\r","            return obj;\r","        }, {});\r","    \r","    log(\"Sorted request body:\", sortedRequestBody);\r","    \r","    // Update request with formatted body\r","    pm.request.body.raw = JSON.stringify(sortedRequestBody, null, 4);\r","    log('Formatted request payload:', JSON.parse(pm.request.body.raw));\r","    \r","    // Skip signing if requested\r","    if (shouldSkipSigning) {\r","        log(\"Skipping request signing as requested\");\r","        return sortedRequestBody;\r","    }\r","    \r","    // Skip signature if no secret is available\r","    if (!envVars.apiSecret) {\r","        log('Warning: No API secret found in environment variables - skipping signature generation');\r","        return sortedRequestBody;\r","    }\r","    \r","    // Concatenate values\r","    let valueString = Object.keys(sortedRequestBody)\r","        .filter(key => key !== 'sign')\r","        .map(key => sortedRequestBody[key])\r","        .join('');\r","    \r","    // Create string to sign\r","    const stringToSign = valueString + envVars.apiSecret;\r","    log('String to be signed:', stringToSign);\r","    \r","    // Generate SHA256 signature using the proper required module\r","    const signature = CryptoJS.SHA256(stringToSign).toString();\r","    log('Generated signature:', signature);\r","    \r","    // Add signature to body\r","    sortedRequestBody.sign = signature;\r","    \r","    // Update request with signed body\r","    pm.request.body.raw = JSON.stringify(sortedRequestBody, null, 4);\r","    log('Final signed request payload:', JSON.parse(pm.request.body.raw));\r","    \r","    return sortedRequestBody;\r","}\r","\r","// Main execution flow\r","try {\r","    // First process subscription template if present\r","    processSubscriptionTemplate();\r","    \r","    // Then process and sign the entire request\r","    processAndSignRequest();\r","    \r","    console.log('Request processing and signing completed successfully');\r","} catch (error) {\r","    console.error('Error in request processing:', error.message);\r","    if (config.debugMode) {\r","        console.error('Error details:', error.stack);\r","    }\r","}\r",""]}},{"listen":"test","script":{"id":"08cf72a9-741f-48f3-9caf-a5f54b24c88c","type":"text/javascript","exec":[""]}}],"variable":[{"key":"enableRequestSigning","value":"true","type":"string"},{"key":"debugMode","value":"true","type":"string"},{"key":"fieldsToStringify","value":"","type":"string"},{"key":"autoGenerateIds","value":"true","type":"string"},{"key":"subscription_type","value":"ONERWAY","type":"string"},{"key":"merchant_subscription_template","value":"{\n  \"requestType\": \"0\",\n  \"selfExecute\": \"2\",\n  \"frequencyType\": \"D\",\n  \"frequencyPoint\": \"30\",\n  \"expireDate\": \"2025-12-31\",\n  \"productName\": \"Standard Subscription Plan\",\n  \"merchantCustId\": \"{{merchant_cust_id}}\",\n  \"mode\": \"2\"\n}\n","type":"string"},{"key":"onerway_subscription_template","value":"{\n  \"requestType\": \"0\",\n  \"selfExecute\": \"1\",\n  \"frequencyType\": \"M\",\n  \"frequencyPoint\": \"1\",\n  \"expireDate\": \"2025-12-31\",\n  \"bindCard\": true,\n  \"productName\": \"Auto-Debit Subscription\",\n  \"merchantCustId\": \"{{merchant_cust_id}}\",\n  \"notificationEmail\": \"{{notification_email}}\",\n  \"mode\": \"2\"\n}","type":"string"},{"key":"merchant_renewal_template","value":"{\n  \"requestType\": \"1\",\n  \"tokenId\": \"\",\n  \"contractId\": \"\",\n  \"merchantCustId\": \"{{merchant_cust_id}}\"\n}\n","type":"string"},{"key":"token_for_subscription","value":""},{"key":"contract_for_subscription","value":""}]}