{"info":{"_postman_id":"57b5288c-44b2-481f-81df-35ff32fb88a2","name":"PayAgency","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"38238994","collectionId":"57b5288c-44b2-481f-81df-35ff32fb88a2","publishedId":"2sAYkGLecD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"046AC3"},"publishDate":"2025-04-14T07:29:59.000Z"},"item":[{"name":"Payout","item":[{"name":"Test Payout","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":["const CryptoJS = require('crypto-js');\r","\r","function encryptData(data, key) {\r","    // Generate a random 16-byte IV\r","    const iv = CryptoJS.lib.WordArray.random(16);\r","\r","    // Encrypt the data\r","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {\r","        iv: iv,\r","        mode: CryptoJS.mode.CBC,\r","        padding: CryptoJS.pad.Pkcs7\r","    });\r","\r","    // Concatenate IV and encrypted data, separated by \":\"\r","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);\r","\r","    return encryptedData;\r","}\r","\r","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters\r","\r","// Get the raw JSON payload from the Body tab\r","const bodyPayload = pm.request.body.raw;\r","\r","try {\r","    // Encrypt the payload\r","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);\r","\r","    // Replace the request body with the encrypted payload format\r","    const finalPayload = {\r","        payload: encryptedPayload\r","    };\r","\r","    // Update the request body with the encrypted payload\r","    // pm.request.body.update(JSON.stringify(finalPayload));\r","    pm.request.body.raw = finalPayload\r","\r","    // Log the encrypted payload for debugging\r","    console.log(\"Encrypted Payload:\", finalPayload);\r","\r","} catch (error) {\r","    console.error(\"Error encrypting payload:\", error);\r","    throw new Error(\"Failed to encrypt the payload.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"183c02c4-16c3-49eb-93be-b2293a5d835a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"first_name\": \"John\",\r\n    \"last_name\": \"Bryan\",\r\n    \"email\": \"johnbryan@gmail.com\",\r\n    \"address\": \"Drovers,Llandrindod Wells\",\r\n    \"country\": \"GB\",\r\n    \"city\": \"London\",\r\n    \"state\": \"PW\",\r\n    \"zip\": \"LD1 5PT\",\r\n    \"ip_address\": \"127.0.0.1\",\r\n    \"phone_number\": \"6567453421\",\r\n    \"amount\": 100,\r\n    \"currency\": \"EUR\",\r\n    \"card_number\": \"4111111111111111\",\r\n    \"card_expiry_month\": \"12\",\r\n    \"card_expiry_year\": \"2027\",\r\n    \"redirect_url\": \"https://pay.agency\",\r\n    \"webhook_url\": \"https://pay.agency/webhook\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/payout","description":"<h3 id=\"post-apiv1testpayout\">POST /api/v1/test/payout</h3>\n<p>This endpoint is used to initiate a payout transaction.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><strong>first_name</strong>: (text) The first name of the recipient.</p>\n</li>\n<li><p><strong>last_name</strong>: (text) The last name of the recipient.</p>\n</li>\n<li><p><strong>email</strong>: (text) The email address of the recipient.</p>\n</li>\n<li><p><strong>address</strong>: (text) The address of the recipient.</p>\n</li>\n<li><p><strong>country</strong>: (text) The country of the recipient.</p>\n</li>\n<li><p><strong>city</strong>: (text) The city of the recipient.</p>\n</li>\n<li><p><strong>state</strong>: (text) The state of the recipient.</p>\n</li>\n<li><p><strong>zip</strong>: (text) The zip or postal code of the recipient.</p>\n</li>\n<li><p><strong>ip_address</strong>: (text) The IP address of the client initiating the payout.</p>\n</li>\n<li><p><strong>phone_number</strong>: (text) The phone number of the recipient.</p>\n</li>\n<li><p><strong>amount</strong>: The amount to be paid out.</p>\n</li>\n<li><p><strong>currency</strong>: (text) The currency in which the payout is to be made.</p>\n</li>\n<li><p><strong>card_number</strong>: (text) The card number for the payout.</p>\n</li>\n<li><p><strong>card_expiry_month</strong>: (text) The expiry month of the card.</p>\n</li>\n<li><p><strong>card_expiry_year</strong>: (text) The expiry year of the card.</p>\n</li>\n<li><p><strong>webhook_url</strong>: (text) The URL for webhook notifications.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a JSON schema.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"SUCCESS\",\n    \"message\": \"Transaction processed successfully!.\",\n    \"redirect_url\": null,\n    \"data\": {\n        \"amount\": 50,\n        \"currency\": \"EUR\",\n        \"order_id\": null,\n        \"transaction_id\": \"PA7609409616921856\",\n        \"customer\": {\n            \"first_name\": \"Aryan\",\n            \"last_name\": \"Trivedi\",\n            \"email\": \"aryan.trivedi@payomatix.com\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","payout"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"183c02c4-16c3-49eb-93be-b2293a5d835a"},{"name":"Live Payout","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":["const CryptoJS = require('crypto-js');\r","\r","function encryptData(data, key) {\r","    // Generate a random 16-byte IV\r","    const iv = CryptoJS.lib.WordArray.random(16);\r","\r","    // Encrypt the data\r","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {\r","        iv: iv,\r","        mode: CryptoJS.mode.CBC,\r","        padding: CryptoJS.pad.Pkcs7\r","    });\r","\r","    // Concatenate IV and encrypted data, separated by \":\"\r","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);\r","\r","    return encryptedData;\r","}\r","\r","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters\r","\r","// Get the raw JSON payload from the Body tab\r","const bodyPayload = pm.request.body.raw;\r","\r","try {\r","    // Encrypt the payload\r","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);\r","\r","    // Replace the request body with the encrypted payload format\r","    const finalPayload = {\r","        payload: encryptedPayload\r","    };\r","\r","    // Update the request body with the encrypted payload\r","    // pm.request.body.update(JSON.stringify(finalPayload));\r","    pm.request.body.raw = finalPayload\r","\r","    // Log the encrypted payload for debugging\r","    console.log(\"Encrypted Payload:\", finalPayload);\r","\r","} catch (error) {\r","    console.error(\"Error encrypting payload:\", error);\r","    throw new Error(\"Failed to encrypt the payload.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"f2834f1b-75f6-4cdc-8a60-488caf03fe7d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"first_name\": \"John\",\r\n    \"last_name\": \"Bryan\",\r\n    \"email\": \"johnbryan@gmail.com\",\r\n    \"address\": \"Drovers,Llandrindod Wells\",\r\n    \"country\": \"GB\",\r\n    \"city\": \"London\",\r\n    \"state\": \"PW\",\r\n    \"zip\": \"LD1 5PT\",\r\n    \"ip_address\": \"127.0.0.1\",\r\n    \"phone_number\": \"6567453421\",\r\n    \"amount\": 100,\r\n    \"currency\": \"EUR\",\r\n    \"card_number\": \"4111111111111111\",\r\n    \"card_expiry_month\": \"12\",\r\n    \"card_expiry_year\": \"2027\",\r\n    \"redirect_url\": \"https://pay.agency\",\r\n    \"webhook_url\": \"https://pay.agency/webhook\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/payout","description":"<p>This API endpoint allows you to initiate a payout transaction. The HTTP POST request should be sent to <a href=\"https://backend.pay.agency/api/v1/test/payout\">https://backend.pay.agency/api/v1/test/payout</a> with the following payload in the raw request body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"first_name\": \"John\",\n  \"last_name\": \"Bryan\",\n  \"email\": \"johnbryan@gmail.com\",\n  \"address\": \"Drovers,Llandrindod Wells\",\n  \"country\": \"GB\",\n  \"city\": \"London\",\n  \"state\": \"PW\",\n  \"zip\": \"LD1 5PT\",\n  \"ip_address\": \"127.0.0.1\",\n  \"phone_number\": \"6567453421\",\n  \"amount\": 100,\n  \"currency\": \"EUR\",\n  \"card_number\": \"4111111111111111\",\n  \"card_expiry_month\": \"12\",\n  \"card_expiry_year\": \"2027\",\n  \"webhook_url\": \"https://pay.agency/webhook\"\n}\n\n</code></pre>\n<p>The request body includes the details of the recipient such as first name, last name, email, address, country, city, state, zip, IP address, and phone number. Additionally, it includes the payout amount, currency, card details, and callback URLs for redirection and webhook notifications.</p>\n<p>The response to this request will provide the status and details of the payout transaction, including any relevant identifiers or confirmation codes.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"SUCCESS\",\n    \"message\": \"Transaction processed successfully!.\",\n    \"redirect_url\": null,\n    \"data\": {\n        \"amount\": 50,\n        \"currency\": \"EUR\",\n        \"order_id\": null,\n        \"transaction_id\": \"PA7609409616921856\",\n        \"customer\": {\n            \"first_name\": \"Aryan\",\n            \"last_name\": \"Trivedi\",\n            \"email\": \"aryan.trivedi@payomatix.com\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","payout"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2834f1b-75f6-4cdc-8a60-488caf03fe7d"},{"name":"Get all Wallets","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"84e24cb0-72c3-4fee-b446-a738bc4b4a23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/wallet","description":"<h3 id=\"retrieve-wallet-information\">Retrieve Wallet Information</h3>\n<p>This API endpoint allows you to retrieve wallet information associated with a user based on the provided secret key.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Method: GET</p>\n</li>\n<li><p>URL: <code>https://backend.pay.agency/api/v1/wallet</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": [\n        {\n            \"wallet_id\": \"WAL1917970915979630\"\n            \"currency\": \"EUR\",\n            \"amount\": \"975\",\n            \"payment_method\": \"CARD\",\n            \"status\": \"Active\",\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","wallet"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"84e24cb0-72c3-4fee-b446-a738bc4b4a23"},{"name":"Estimate Payout Amount","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"9c35c738-9973-4b1a-9b8f-adc5ae884551","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"amount\": 100,\r\n    \"wallet_id\": \"WAL1917970915979630\",\r\n    \"card_number\": \"3333333888882\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/wallet/estimate-payout","description":"<h3 id=\"initiate-payout-transaction\">Initiate Payout Transaction</h3>\n<p>This endpoint calculates the estimated total payout amount including MDR (Merchant Discount Rate) and transaction fees based on the provided amount, wallet ID, and card number.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"wallet_id\": \"WAL7825818519632620\",\n  \"amount\": 200,\n  \"card_number\": \"4111111111111111\"\n}\n\n</code></pre>\n<p>The request body includes the payout amount and the recipient's wallet ID and card number.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response to this request will provide the status and details of the payout transaction, including any relevant identifiers or confirmation codes. The response schema is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"amount_requried\": 211.5,\n        \"wallet_balance\": \"1000\",\n        \"total_fee\": 11.5\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","wallet","estimate-payout"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c35c738-9973-4b1a-9b8f-adc5ae884551"},{"name":"Live Status API","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"7a83876f-f899-4f97-ada0-3f1318167fbf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/live/payout/PA8359808789945616/status","description":"<p>This endpoint retrieves the status of a specific wallet transaction using either the <code>transaction_id</code> or <code>order_id</code>, and returns detailed information about the transaction.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response to this request will provide the status and details of the wallet transaction, including any relevant identifiers or confirmation codes.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"SUCCESS\",\n    \"message\": \"Transaction processed successfully!.\",\n    \"data\": {\n        \"amount\": 20,\n        \"currency\": \"EUR\",\n        \"order_id\": null,\n        \"transaction_id\": \"PA5660361323993190\",\n        \"customer\": {\n            \"first_name\": \"Joe\",\n            \"last_name\": \"Doe\",\n            \"email\": \"joe@gmail.com\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","live","payout","PA8359808789945616","status"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"7a83876f-f899-4f97-ada0-3f1318167fbf"},{"name":"Test Status API","event":[{"listen":"prerequest","script":{"id":"a6f2edde-e085-4a1f-8825-bbef8d2a83d3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"470bcfda-3f0f-49d9-9691-03459c8830cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/payout/PA8359808789945616/status","description":"<p>This endpoint retrieves the status of a specific wallet test transaction using either the <code>transaction_id</code> or <code>order_id</code>, and returns detailed information about the transaction.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response to this request will provide the status and details of the wallet test transaction, including any relevant identifiers or confirmation codes.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"SUCCESS\",\n    \"message\": \"Transaction processed successfully!.\",\n    \"data\": {\n        \"amount\": 20,\n        \"currency\": \"EUR\",\n        \"order_id\": null,\n        \"transaction_id\": \"PA5660361323993190\",\n        \"customer\": {\n            \"first_name\": \"Joe\",\n            \"last_name\": \"Doe\",\n            \"email\": \"joe@gmail.com\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","payout","PA8359808789945616","status"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"470bcfda-3f0f-49d9-9691-03459c8830cd"}],"id":"6cecd5f6-0d44-4223-9439-49a4f4155f76","_postman_id":"6cecd5f6-0d44-4223-9439-49a4f4155f76","description":""},{"name":"APM","item":[{"name":"Test APM","event":[{"listen":"prerequest","script":{"id":"2a439ee0-18a5-480a-afdb-a6fac6a005c8","exec":["const CryptoJS = require('crypto-js');\r","\r","function encryptData(data, key) {\r","    // Generate a random 16-byte IV\r","    const iv = CryptoJS.lib.WordArray.random(16);\r","\r","    // Encrypt the data\r","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {\r","        iv: iv,\r","        mode: CryptoJS.mode.CBC,\r","        padding: CryptoJS.pad.Pkcs7\r","    });\r","\r","    // Concatenate IV and encrypted data, separated by \":\"\r","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);\r","\r","    return encryptedData;\r","}\r","\r","const encryptionKey = \"b734d3a860590a8ab9434407a883e44f\"; // 32 characters\r","\r","// Get the raw JSON payload from the Body tab\r","const bodyPayload = pm.request.body.raw;\r","\r","try {\r","    // Encrypt the payload\r","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);\r","\r","    // Replace the request body with the encrypted payload format\r","    const finalPayload = {\r","        payload: encryptedPayload\r","    };\r","\r","    // Update the request body with the encrypted payload\r","    // pm.request.body.update(JSON.stringify(finalPayload));\r","    pm.request.body.raw = finalPayload\r","\r","    // Log the encrypted payload for debugging\r","    console.log(\"Encrypted Payload:\", finalPayload);\r","\r","} catch (error) {\r","    console.error(\"Error encrypting payload:\", error);\r","    throw new Error(\"Failed to encrypt the payload.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"e0325b69-973a-4d17-83db-07ba7a7dc484","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"first_name\": \"James\",\r\n  \"last_name\": \"Karlo\",\r\n  \"email\": \"james.karlo@gmail.com\",\r\n  \"address\": \"Drovers,Llandrindod Wells\",\r\n  \"country\": \"GB\",\r\n  \"city\": \"London\",\r\n  \"state\": \"PW\",\r\n  \"zip\": \"LD1 5PT\",\r\n  \"ip_address\": \"127.0.0.1\",\r\n  \"phone_number\": \"6567453421\",\r\n  \"amount\": 10,\r\n  \"currency\": \"USD\",\r\n  \"redirect_url\": \"https://pay.agency\",\r\n  \"webhook_url\": \"https://webhook.url\",\r\n  \"order_id\": \"Te52643\",\r\n  \"terminal_id\": \"T56353\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/apm","description":"<p>This endpoint allows you to initiate a payment transaction through the APM (Alternative Payment Method) service. The HTTP POST request should be sent to <a href=\"https://backend.pay.agency/api/v1/test/apm\">https://backend.pay.agency/api/v1/test/apm</a>.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>The request should include the following parameters in the raw JSON format:</p>\n<ul>\n<li><p><code>first_name</code> (string): The first name of the customer.</p>\n</li>\n<li><p><code>last_name</code> (string): The last name of the customer.</p>\n</li>\n<li><p><code>email</code> (string): The email address of the customer.</p>\n</li>\n<li><p><code>address</code> (string): The customer's address.</p>\n</li>\n<li><p><code>country</code> (string): The customer's country code.</p>\n</li>\n<li><p><code>city</code> (string): The customer's city.</p>\n</li>\n<li><p><code>state</code> (string): The customer's state or province.</p>\n</li>\n<li><p><code>zip</code> (string): The customer's postal code.</p>\n</li>\n<li><p><code>ip_address</code> (string): The IP address of the customer.</p>\n</li>\n<li><p><code>phone_number</code> (string): The customer's phone number.</p>\n</li>\n<li><p><code>amount</code> (number): The transaction amount.</p>\n</li>\n<li><p><code>currency</code> (string): The currency of the transaction.</p>\n</li>\n<li><p><code>redirect_url</code> (string): The URL to which the customer should be redirected after the transaction.</p>\n</li>\n<li><p><code>webhook_url</code> (string): The URL for webhook notifications.</p>\n</li>\n<li><p><code>order_id</code> (string): The unique identifier for the order.</p>\n</li>\n<li><p><code>terminal_id</code> (string): The terminal identifier.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the response will have a status code of 200 and a JSON content type. The response body will include the following fields:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"REDIRECT\",\n    \"message\": \"Please redirect user to complete the payment.\",\n    \"redirect_url\": \"https://portal.pay.agency/v1/test/apm/PA4950056015778979\",\n    \"data\": {\n        \"amount\": 10,\n        \"currency\": \"USD\",\n        \"order_id\": \"Te52643\",\n        \"transaction_id\": \"PA4950056015778979\",\n        \"customer\": {\n            \"first_name\": \"James\",\n            \"last_name\": \"Karlo\",\n            \"email\": \"james.karlo@gmail.com\"\n        },\n        \"refund\": {\n            \"status\": false,\n            \"refund_date\": null\n        },\n        \"chargeback\": {\n            \"status\": false,\n            \"chargeback_date\": null\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","apm"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0325b69-973a-4d17-83db-07ba7a7dc484"},{"name":"Live APM","event":[{"listen":"prerequest","script":{"id":"2a439ee0-18a5-480a-afdb-a6fac6a005c8","exec":["const CryptoJS = require('crypto-js');\r","\r","function encryptData(data, key) {\r","    // Generate a random 16-byte IV\r","    const iv = CryptoJS.lib.WordArray.random(16);\r","\r","    // Encrypt the data\r","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {\r","        iv: iv,\r","        mode: CryptoJS.mode.CBC,\r","        padding: CryptoJS.pad.Pkcs7\r","    });\r","\r","    // Concatenate IV and encrypted data, separated by \":\"\r","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);\r","\r","    return encryptedData;\r","}\r","\r","const encryptionKey = \"b734d3a860590a8ab9434407a883e44f\"; // 32 characters\r","\r","// Get the raw JSON payload from the Body tab\r","const bodyPayload = pm.request.body.raw;\r","\r","try {\r","    // Encrypt the payload\r","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);\r","\r","    // Replace the request body with the encrypted payload format\r","    const finalPayload = {\r","        payload: encryptedPayload\r","    };\r","\r","    // Update the request body with the encrypted payload\r","    // pm.request.body.update(JSON.stringify(finalPayload));\r","    pm.request.body.raw = finalPayload\r","\r","    // Log the encrypted payload for debugging\r","    console.log(\"Encrypted Payload:\", finalPayload);\r","\r","} catch (error) {\r","    console.error(\"Error encrypting payload:\", error);\r","    throw new Error(\"Failed to encrypt the payload.\");\r","}"],"type":"text/javascript","packages":{}}}],"id":"fc56cac5-5fc2-4653-9bcc-600815aa5939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"first_name\": \"James\",\r\n  \"last_name\": \"Karlo\",\r\n  \"email\": \"james.karlo@gmail.com\",\r\n  \"address\": \"Drovers,Llandrindod Wells\",\r\n  \"country\": \"GB\",\r\n  \"city\": \"London\",\r\n  \"state\": \"PW\",\r\n  \"zip\": \"LD1 5PT\",\r\n  \"ip_address\": \"127.0.0.1\",\r\n  \"phone_number\": \"6567453421\",\r\n  \"amount\": 10,\r\n  \"currency\": \"USD\",\r\n  \"redirect_url\": \"https://pay.agency\",\r\n  \"webhook_url\": \"https://webhook.url\",\r\n  \"terminal_id\": \"T4284375\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/live/apm","description":"<h3 id=\"create-apm-payment\">Create APM Payment</h3>\n<p>This endpoint allows you to initiate an Alternative Payment Method (APM) transaction.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><strong>first_name</strong>: (text) The first name of the customer.</p>\n</li>\n<li><p><strong>last_name</strong>: (text) The last name of the customer.</p>\n</li>\n<li><p><strong>email</strong>: (text) The email address of the customer.</p>\n</li>\n<li><p><strong>address</strong>: (text) The address of the customer.</p>\n</li>\n<li><p><strong>country</strong>: (text) The country of the customer.</p>\n</li>\n<li><p><strong>city</strong>: (text) The city of the customer.</p>\n</li>\n<li><p><strong>state</strong>: (text) The state of the customer.</p>\n</li>\n<li><p><strong>zip</strong>: (text) The zip code of the customer.</p>\n</li>\n<li><p><strong>ip_address</strong>: (text) The IP address of the customer.</p>\n</li>\n<li><p><strong>phone_number</strong>: (text) The phone number of the customer.</p>\n</li>\n<li><p><strong>amount</strong>: (number) The amount of the transaction.</p>\n</li>\n<li><p><strong>currency</strong>: (text) The currency of the transaction.</p>\n</li>\n<li><p><strong>redirect_url</strong>: (text) The URL to redirect the customer after the transaction.</p>\n</li>\n<li><p><strong>webhook_url</strong>: (text) The URL for webhook notifications.</p>\n</li>\n<li><p><strong>terminal_id</strong>: (text) The terminal ID for the transaction.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"REDIRECT\",\n    \"message\": \"Please redirect user to complete the payment.\",\n    \"redirect_url\": \"https://process.finateco.com/member/remoteCharge_Back.asp?TransID=1310402&amp;CompanyNum=3133176\",\n    \"data\": {\n        \"amount\": 10,\n        \"currency\": \"USD\",\n        \"order_id\": null,\n        \"transaction_id\": \"PA4960064647984547\",\n        \"customer\": {\n            \"first_name\": \"James\",\n            \"last_name\": \"Karlo\",\n            \"email\": \"james.karlo@gmail.com\"\n        },\n        \"refund\": {\n            \"status\": false,\n            \"refund_date\": null\n        },\n        \"chargeback\": {\n            \"status\": false,\n            \"chargeback_date\": null\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","live","apm"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc56cac5-5fc2-4653-9bcc-600815aa5939"}],"id":"0193a3b2-c316-461c-95d3-ad2a01dab1e0","_postman_id":"0193a3b2-c316-461c-95d3-ad2a01dab1e0","description":""},{"name":"S2S Test Card Payment API","event":[{"listen":"prerequest","script":{"id":"92fbc573-95f1-4e6a-95d9-8a54d57047e4","exec":["const CryptoJS = require('crypto-js');","","function encryptData(data, key) {","    // Generate a random 16-byte IV","    const iv = CryptoJS.lib.WordArray.random(16);","","    // Encrypt the data","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {","        iv: iv,","        mode: CryptoJS.mode.CBC,","        padding: CryptoJS.pad.Pkcs7","    });","","    // Concatenate IV and encrypted data, separated by \":\"","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);","","    return encryptedData;","}","","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters","","// Get the raw JSON payload from the Body tab","const bodyPayload = pm.request.body.raw;","","try {","    // Encrypt the payload","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);","","    // Replace the request body with the encrypted payload format","    const finalPayload = {","        payload: encryptedPayload","    };","","    // Update the request body with the encrypted payload","    // pm.request.body.update(JSON.stringify(finalPayload));","    pm.request.body.raw = finalPayload","","    // Log the encrypted payload for debugging","    console.log(\"Encrypted Payload:\", finalPayload);","","} catch (error) {","    console.error(\"Error encrypting payload:\", error);","    throw new Error(\"Failed to encrypt the payload.\");","}"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"1e55c578-eca5-47cc-b3c1-aae01eedd5df","exec":[""],"type":"text/javascript","packages":{}}}],"id":"98113f3c-4829-4fa0-98bb-5302077696d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer PA_TEST_6e86868ffe1279255f96fa34153f14f963627b9090ea36093cfd9a3d","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/card","description":"<p>This API endpoint allows you to process test card payments.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The request body should be a JSON object with the following parameters:</p>\n<ul>\n<li><p><code>first_name</code> (string): The first name of the cardholder.</p>\n</li>\n<li><p><code>last_name</code> (string): The last name of the cardholder.</p>\n</li>\n<li><p><code>email</code> (string): The email address of the cardholder.</p>\n</li>\n<li><p><code>address</code> (string): The address of the cardholder.</p>\n</li>\n<li><p><code>country</code> (string): The country of the cardholder.</p>\n</li>\n<li><p><code>city</code> (string): The city of the cardholder.</p>\n</li>\n<li><p><code>state</code> (string): The state of the cardholder.</p>\n</li>\n<li><p><code>zip</code> (string): The zip code of the cardholder.</p>\n</li>\n<li><p><code>ip_address</code> (string): The IP address of the cardholder.</p>\n</li>\n<li><p><code>phone_number</code> (string): The phone number of the cardholder.</p>\n</li>\n<li><p><code>amount</code> (number): The payment amount.</p>\n</li>\n<li><p><code>currency</code> (string): The currency of the payment.</p>\n</li>\n<li><p><code>card_number</code> (string): The card number for the payment.</p>\n</li>\n<li><p><code>card_expiry_month</code> (string): The expiry month of the card.</p>\n</li>\n<li><p><code>card_expiry_year</code> (string): The expiry year of the card.</p>\n</li>\n<li><p><code>card_cvv</code> (string): The CVV of the card.</p>\n</li>\n<li><p><code>redirect_url</code> (string): The URL to redirect after payment.</p>\n</li>\n<li><p><code>terminal_id</code> (string): The terminal ID for the payment.</p>\n</li>\n</ul>\n<h2 id=\"response-body\">Response Body</h2>\n<p>The response body will be a JSON object with the relevant payment response parameters.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","card"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"98113f3c-4829-4fa0-98bb-5302077696d0"},{"name":"S2S Live Card Payment API","event":[{"listen":"prerequest","script":{"id":"f5833a6d-2daa-478b-87c9-d44cc2d53c6e","exec":["const CryptoJS = require('crypto-js');","","function encryptData(data, key) {","    // Generate a random 16-byte IV","    const iv = CryptoJS.lib.WordArray.random(16);","","    // Encrypt the data","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {","        iv: iv,","        mode: CryptoJS.mode.CBC,","        padding: CryptoJS.pad.Pkcs7","    });","","    // Concatenate IV and encrypted data, separated by \":\"","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);","    return encryptedData;","}","","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters","","// Get the raw JSON payload from the Body tab","const bodyPayload = pm.request.body.raw;","","try {","    // Encrypt the payload","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);","","    // Replace the request body with the encrypted payload format","    const finalPayload = {","        payload: encryptedPayload","    };","","    // Update the request body with the encrypted payload","    // pm.request.body.update(JSON.stringify(finalPayload));","    pm.request.body.raw = finalPayload","","    // Log the encrypted payload for debugging","    console.log(\"Encrypted Payload:\", finalPayload);","","} catch (error) {","    console.error(\"Error encrypting payload:\", error);","    throw new Error(\"Failed to encrypt the payload.\");","}"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"074638de-eb40-482f-8079-2d7600d3df33","exec":[""],"type":"text/javascript","packages":{}}}],"id":"973ca904-14f0-4526-86a7-7246aa3a6815","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer PA_LIVE_39846ee4d1a3bb3cf8d9379d1e871453dcef2e3bca51508df25e928a","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"first_name\":\"Aryan\",\n    \"last_name\":\"Triveni\",\n    \"email\":\"mukul@gmail.com\",\n    \"city\":\"Earthing\",\n    \"state\":\"AP\",\n    \"zip\":\"202122\",\n    \"ip_address\":\"127.0.0.1\",\n    \"phone_number\":\"7737474421\",\n    \"amount\":100,\n    \"currency\":\"USD\",\n    \"card_number\":\"4111111111111111\",\n    \"card_expiry_month\":\"12\",\n    \"card_expiry_year\":\"2027\",\n    \"card_cvv\":\"029\",\n    \"redirect_url\":\"https://google.com\",\n    \"webhook_url\":\"https://backend.finserve.ltd/test/webhook\"\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/live/card","description":"<p>This endpoint allows you to make an HTTP POST request to create a new live card. The request should include the following parameters in the raw request body:</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>first_name (string): The first name of the card holder.</p>\n</li>\n<li><p>last_name (string): The last name of the card holder.</p>\n</li>\n<li><p>email (string): The email address of the card holder.</p>\n</li>\n<li><p>address (string): The address of the card holder.</p>\n</li>\n<li><p>country (string): The country of the card holder.</p>\n</li>\n<li><p>city (string): The city of the card holder.</p>\n</li>\n<li><p>state (string): The state of the card holder.</p>\n</li>\n<li><p>zip (string): The zip code of the card holder.</p>\n</li>\n<li><p>ip_address (string): The IP address of the card holder.</p>\n</li>\n<li><p>phone_number (string): The phone number of the card holder.</p>\n</li>\n<li><p>amount (number): The amount for the card transaction.</p>\n</li>\n<li><p>currency (string): The currency for the transaction.</p>\n</li>\n<li><p>card_number (string): The card number for the transaction.</p>\n</li>\n<li><p>card_expiry_month (string): The expiry month of the card.</p>\n</li>\n<li><p>card_expiry_year (string): The expiry year of the card.</p>\n</li>\n<li><p>card_cvv (string): The CVV of the card.</p>\n</li>\n<li><p>redirect_url (string): The URL to redirect after the transaction.</p>\n</li>\n<li><p>webhook_url (string): The URL for webhook notifications.</p>\n</li>\n<li><p>order_id (string): The order ID for the transaction.</p>\n</li>\n</ul>\n<p>The response to the request will have a status code of 400 and a JSON content type. The response body will include the following parameters:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","live","card"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"973ca904-14f0-4526-86a7-7246aa3a6815"},{"name":"Test Hosted Card API","event":[{"listen":"prerequest","script":{"id":"42738a03-17a0-4dcd-b927-455bd3d8bb8a","exec":["const CryptoJS = require('crypto-js');","","function encryptData(data, key) {","    // Generate a random 16-byte IV","    const iv = CryptoJS.lib.WordArray.random(16);","","    // Encrypt the data","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {","        iv: iv,","        mode: CryptoJS.mode.CBC,","        padding: CryptoJS.pad.Pkcs7","    });","","    // Concatenate IV and encrypted data, separated by \":\"","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);","","    return encryptedData;","}","","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters","","// Get the raw JSON payload from the Body tab","const bodyPayload = pm.request.body.raw;","","try {","    // Encrypt the payload","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);","","    // Replace the request body with the encrypted payload format","    const finalPayload = {","        payload: encryptedPayload","    };","","    // Update the request body with the encrypted payload","    // pm.request.body.update(JSON.stringify(finalPayload));","    pm.request.body.raw = finalPayload","","    // Log the encrypted payload for debugging","    console.log(\"Encrypted Payload:\", finalPayload);","","} catch (error) {","    console.error(\"Error encrypting payload:\", error);","    throw new Error(\"Failed to encrypt the payload.\");","}"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"6907a20c-0331-4c15-9efe-c9239f99efb8","exec":[""],"type":"text/javascript","packages":{}}}],"id":"9e2655e2-42f2-4b80-941f-e565c430ea92","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer PA_TEST_6e86868ffe1279255f96fa34153f14f963627b9090ea36093cfd9a3d","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"first_name\":\"Tushar\",\n    \"last_name\":\"vashishth\",\n    \"email\":\"dean@gmail.com\",\n    \"address\":\"Aligarh Uttar Pradesh Address\",\n    \"country\":\"IN\",\n    \"city\":\"Aligarh\",\n    \"state\":\"UP\",\n    \"zip\":\"202122\",\n    \"ip_address\":\"127.0.0.1\",\n    \"phone_number\":\"77374742342\",\n    \"amount\":30,\n    \"currency\":\"INR\",\n    \"redirect_url\":\"https://google.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/hosted/card","description":"<h3 id=\"api-request-description\">API Request Description</h3>\n<p>This API endpoint allows you to process a payment using hosted card details. The request should be sent as an HTTP POST to the specified URL with the necessary payload in the raw request body.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>first_name</code> (string): The first name of the customer.</p>\n</li>\n<li><p><code>last_name</code> (string): The last name of the customer.</p>\n</li>\n<li><p><code>email</code> (string): The email address of the customer.</p>\n</li>\n<li><p><code>address</code> (string): The address of the customer.</p>\n</li>\n<li><p><code>country</code> (string): The country of the customer.</p>\n</li>\n<li><p><code>city</code> (string): The city of the customer.</p>\n</li>\n<li><p><code>state</code> (string): The state of the customer.</p>\n</li>\n<li><p><code>zip</code> (string): The zip or postal code of the customer.</p>\n</li>\n<li><p><code>ip_address</code> (string): The IP address of the customer.</p>\n</li>\n<li><p><code>phone_number</code> (string): The phone number of the customer.</p>\n</li>\n<li><p><code>amount</code> (number): The amount of the transaction.</p>\n</li>\n<li><p><code>currency</code> (string): The currency of the transaction.</p>\n</li>\n<li><p><code>redirect_url</code> (string): The URL to redirect to after the transaction.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"note\">Note</h3>\n<ul>\n<li><p>The <code>status</code> and <code>message</code> fields in the response indicate the status of the transaction.</p>\n</li>\n<li><p>The <code>redirect_url</code> field in the response provides the URL to redirect to after the transaction.</p>\n</li>\n<li><p>The <code>data</code> object contains details about the transaction, including the amount, currency, order ID, transaction ID, customer information, refund status, and chargeback status.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","v1","test","hosted","card"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"9e2655e2-42f2-4b80-941f-e565c430ea92"},{"name":"Live Hosted Card API","event":[{"listen":"prerequest","script":{"id":"21ab47a4-f978-48f4-9c21-049031731515","exec":["const CryptoJS = require('crypto-js');","","function encryptData(data, key) {","    // Generate a random 16-byte IV","    const iv = CryptoJS.lib.WordArray.random(16);","","    // Encrypt the data","    const encrypted = CryptoJS.AES.encrypt(data, CryptoJS.enc.Utf8.parse(key), {","        iv: iv,","        mode: CryptoJS.mode.CBC,","        padding: CryptoJS.pad.Pkcs7","    });","","    // Concatenate IV and encrypted data, separated by \":\"","    const encryptedData = iv.toString(CryptoJS.enc.Hex) + \":\" + encrypted.ciphertext.toString(CryptoJS.enc.Hex);","","    return encryptedData;","}","","const encryptionKey = \"532b742961ed58115dc5d99feeae3f0e\"; // 32 characters","","// Get the raw JSON payload from the Body tab","const bodyPayload = pm.request.body.raw;","","try {","    // Encrypt the payload","    const encryptedPayload = encryptData(bodyPayload, encryptionKey);","","    // Replace the request body with the encrypted payload format","    const finalPayload = {","        payload: encryptedPayload","    };","","    // Update the request body with the encrypted payload","    // pm.request.body.update(JSON.stringify(finalPayload));","    pm.request.body.raw = finalPayload","","    // Log the encrypted payload for debugging","    console.log(\"Encrypted Payload:\", finalPayload);","","} catch (error) {","    console.error(\"Error encrypting payload:\", error);","    throw new Error(\"Failed to encrypt the payload.\");","}"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"4c6edb39-bbc4-4f73-868b-64e7a59dd3c6","exec":[""],"type":"text/javascript","packages":{}}}],"id":"a433e102-9831-45c8-9111-1883581fdfa3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer PA_LIVE_39846ee4d1a3bb3cf8d9379d1e871453dcef2e3bca51508df25e928a","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"first_name\":\"Tushar\",\n    \"last_name\":\"vashishth\",\n    \"email\":\"tushar@gmail.com\",\n    \"address\":\"Aligarh Uttar Pradesh Address\",\n    \"country\":\"IN\",\n    \"city\":\"Aligarh\",\n    \"state\":\"UP\",\n    \"zip\":\"202122\",\n    \"ip_address\":\"127.0.0.1\",\n    \"phone_number\":\"77374742342\",\n    \"amount\":30,\n    \"currency\":\"INR\",\n    \"redirect_url\":\"https://google.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/live/hosted/card","description":"<p>This API endpoint allows you to process live hosted card payments.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><strong>first_name</strong> (text, required): The first name of the customer.</p>\n</li>\n<li><p><strong>last_name</strong> (text, required): The last name of the customer.</p>\n</li>\n<li><p><strong>email</strong> (text, required): The email address of the customer.</p>\n</li>\n<li><p><strong>address</strong> (text, required): The address of the customer.</p>\n</li>\n<li><p><strong>country</strong> (text, required): The country of the customer.</p>\n</li>\n<li><p><strong>city</strong> (text, required): The city of the customer.</p>\n</li>\n<li><p><strong>state</strong> (text, required): The state of the customer.</p>\n</li>\n<li><p><strong>zip</strong> (text, required): The zip code of the customer.</p>\n</li>\n<li><p><strong>ip_address</strong> (text, required): The IP address of the customer.</p>\n</li>\n<li><p><strong>phone_number</strong> (text, required): The phone number of the customer.</p>\n</li>\n<li><p><strong>amount</strong> (text, required): The amount for the transaction.</p>\n</li>\n<li><p><strong>currency</strong> (text, required): The currency for the transaction.</p>\n</li>\n<li><p><strong>redirect_url</strong> (text, required): The URL to redirect after the transaction.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","live","hosted","card"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"a433e102-9831-45c8-9111-1883581fdfa3"},{"name":"Live Status API","id":"acda685d-1b4b-4dd6-9b27-e3c9ab98e774","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer PA_LIVE_29537d846f56126bd6e17664d5efa74b09c9965d2c194cca2f254b7f","type":"text"}],"url":"https://backend.pay.agency/api/live/status/PA6945484281143674","description":"<p>This endpoint makes an HTTP GET request to retrieve the status of a specific transaction identified by the provided transaction ID. The response will include details about the transaction, such as the amount, currency, order ID, transaction ID, customer information, refund status, refund date, chargeback status, and chargeback date.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response-body\">Response Body</h3>\n<p>The response will be in JSON format and will include the following fields:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","live","status","PA6945484281143674"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"acda685d-1b4b-4dd6-9b27-e3c9ab98e774"},{"name":"Test Status API","id":"d4874be1-d601-4a1e-8a28-b218d6603b6d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer PA_LIVE_29537d846f56126bd6e17664d5efa74b09c9965d2c194cca2f254b7f","type":"text"}],"url":"https://backend.pay.agency/api/test/status/FS6945484281143674","description":"<p>This endpoint makes an HTTP GET request to retrieve the status of a specific transaction identified by the provided transaction ID. The response will include details about the transaction, such as the amount, currency, order ID, transaction ID, customer information, refund status, refund date, chargeback status, and chargeback date.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response-body\">Response Body</h3>\n<p>The response will be in JSON format and will include the following fields:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","test","status","FS6945484281143674"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4874be1-d601-4a1e-8a28-b218d6603b6d"},{"name":"Test Refund","id":"e60bdcdd-389f-4812-9196-d9d05d4eec23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"transaction_id\": \"FS5421117795961502\",\r\n    \"reason\": \"Reason for refund\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/test/refund","description":"<p>The endpoint <code>/v1/test/refund</code> is a POST request used to initiate a refund for a specific transaction. The request should include a JSON payload with the <code>transaction_id</code> and <code>reason</code> fields.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>transaction_id</code> (string) - The ID of the transaction for which the refund is being requested.</p>\n</li>\n<li><p><code>reason</code> (string) - The reason for requesting the refund.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response for this request is in the form of a JSON schema.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","test","refund"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"e60bdcdd-389f-4812-9196-d9d05d4eec23"},{"name":"Live Refund","id":"0641bcc1-bca1-4c88-a59f-5d800337f371","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"transaction_id\": \"FS5098432548233125\",\r\n    \"reason\": \"Reason for refund\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/live/refund","description":"<h3 id=\"endpoint-description\">Endpoint Description</h3>\n<p>This endpoint is used to initiate a refund for a specific transaction.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>transaction_id</code> (string) - The ID of the transaction for which the refund is being requested.</p>\n</li>\n<li><p><code>reason</code> (string) - The reason for requesting the refund.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"message\": \"\",\n  \"redirect_url\": \"\",\n  \"data\": {\n    \"amount\": 0,\n    \"currency\": \"\",\n    \"order_id\": null,\n    \"transaction_id\": \"\",\n    \"customer\": {\n      \"first_name\": \"\",\n      \"last_name\": \"\",\n      \"email\": \"\"\n    },\n    \"refund\": {\n      \"status\": true,\n      \"refund_date\": null\n    },\n    \"chargback\": {\n      \"status\": true,\n      \"chargeback_date\": null\n    }\n  }\n}\n\n</code></pre>\n<p>The request should include the <code>transaction_id</code> and <code>reason</code> in the request body, and the response will provide details about the refunded amount, customer information, refund status, and chargeback status.</p>\n","urlObject":{"protocol":"https","path":["api","v1","live","refund"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"0641bcc1-bca1-4c88-a59f-5d800337f371"},{"name":"Get payment Templates","id":"8c38a6dd-259a-42d6-b412-d80bd38c14bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://backend.pay.agency/api/v1/payment-templates","description":"<h3 id=\"endpoint-description\">Endpoint Description</h3>\n<p>This endpoint is used to retrieve payment templates.</p>\n<h3 id=\"response\">Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"SUCCESS\",\n    \"data\": [\n        {\n            \"template_id\": \"07b3ac4b-7f99-4736-b116-12862433010c\",\n            \"template_name\": \"New template\",\n            \"payment_template_id\": \"PLI36176640650233006\",\n            \"template_screenshot\": \"user/1/payment_link_template/template_screenshot/New_template_screenshot_2025-04-07T10:03:22.318Z.png\",\n            \"redirect_url\": null,\n            \"webhook_url\": null\n        },\n        {\n            \"template_id\": \"139a9287-3db6-4fae-9ee3-1847ce288b47\",\n            \"template_name\": \"Payment Link 1\",\n            \"payment_template_id\": \"PLI71677218212372533\",\n            \"template_screenshot\": \"user/1/payment_link_template/template_screenshot/Payment_screenshot_2025-04-02T09:53:15.929Z.png\",\n            \"redirect_url\": \"www.goolge.com\",\n            \"webhook_url\": null\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","payment-templates"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c38a6dd-259a-42d6-b412-d80bd38c14bc"},{"name":"Generate Payment Link","id":"87485ba5-c7db-4a04-b564-976c112b5ccb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"payment_template_id\": \"PLI36176640650233006\",\r\n    \"amount\": 100,\r\n    \"currency\": \"INR\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://backend.pay.agency/api/v1/payment-link","description":"<h3 id=\"endpoint-description\">Endpoint Description</h3>\n<p>This endpoint is used to initiate a payment link with the specified payment template, amount, and currency.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>payment_template_id</code> (string) - The ID of the payment template to be used for the payment link.</p>\n</li>\n<li><p><code>amount</code> (number) - The amount to be charged via the payment link</p>\n</li>\n<li><p><code>currency</code> (string) - The currency in which the payment is to be made.</p>\n</li>\n<li><p>expiry_date (string) - The expiry date for the payment link in <strong>YYYY-MM-DD</strong> format.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Payment link created successfully.\",\n  \"data\": \"http://localhost:3000/link/PLI36176640650233006/PAY_LINK_04385524942321460/test?encrypted_config=8e5d777865f4424cc943876df8dab01d:484e5b8330c1092b9c013607720d1aa9090fb4da8ca3a297ef151c296e11407d3de0083fc39dee20dd707b06f4454ff73b365f062fae27b972f091966326b4c3b54fadc35879f8adeaaceb0dcf034f4f55a2267af5d75449889500ef555877c2efbabc8170ed77768662e56b28d67fda79c1273970d75a81f72400728185ae89337eb35fdf44281412a3298b77d8493a5620f066d280e249ebfeed4a2a4ae5ff\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","payment-link"],"host":["backend","pay","agency"],"query":[],"variable":[]}},"response":[],"_postman_id":"87485ba5-c7db-4a04-b564-976c112b5ccb"}]}