{"info":{"_postman_id":"cec9379a-c788-4741-bce5-d8028457cf41","name":"Safepay","description":"<html><head></head><body><p>Safepay is a regulated payments service provider that enables developers to orchestrate money movement between customers and businesses with ease and speed. The Safepay API makes it simple for businesses and financial platforms to create payment sessions, manage subscriptions, issue invoices and exchange value by sending and receiving money. Our API is based upon REST principles, returns JSON responses, and uses standard HTTP response codes.</p>\n<p>Safepay offers two environments to developers - <code>production</code> and <code>sandbox</code> . Any transaction performed in our <code>sandbox</code> environment will not have any financial impact. We also provide test credentials for payment instruments that can be used while integrating.</p>\n<p>To begin integrating, we recommend you sign up for our sandbox account - its free to do so and will give you access to all of Safepay's APIs. Once you've completed your integration, please reach out to a member of our team who will guide you on how to create a production account and complete our onboarding process.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"3342320","collectionId":"cec9379a-c788-4741-bce5-d8028457cf41","publishedId":"2s9YJaXPJe","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"6685DF"},"publishDate":"2023-10-02T07:19:47.000Z"},"item":[{"name":"API Authentication","item":[{"name":"Login Company","event":[{"listen":"test","script":{"id":"e4804d4e-a897-4cb7-b85b-e53a3553767d","exec":["var jsonData = JSON.parse(responseBody);","pm.environment.set(\"clientToken\",  jsonData.data.token);"],"type":"text/javascript"}}],"id":"ac83b9db-a3fa-498b-8906-3c72a2819b98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"zparekh@getsafepay.com\",\n\t\"password\": \"azazazazaz\"\n}"},"url":"{{baseUrl}}{{auth-port}}/v1/company/login","urlObject":{"path":["v1","company","login"],"host":["{{baseUrl}}{{auth-port}}"],"query":[],"variable":[]}},"response":[{"id":"1d367db5-7295-4679-8bf8-53dfcfef19f1","name":"Login Company","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"ausmani@getsafepay.com\",\n\t\"password\": \"azazazazaz\"\n}"},"url":"{{baseUrl}}{{auth-port}}/v1/company/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Wed, 30 Nov 2022 05:59:04 GMT"},{"key":"Server","value":"nginx/1.19.1"},{"key":"Vary","value":"Accept-Encoding"},{"key":"X-Ratelimit-Limit","value":"50"},{"key":"X-Ratelimit-Remaining","value":"49"},{"key":"X-Ratelimit-Reset","value":"Wed, 30 Nov 2022 06:00:03 UTC"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"count\": 1,\n        \"list\": [\n            {\n                \"token\": \"client_bc9b141a-edce-429a-88f0-90230d0b66f1\",\n                \"name\": \"Safepay Demo\",\n                \"description\": \"\",\n                \"email\": \"ausmani@getsafepay.com\",\n                \"phone\": \"\",\n                \"api_key\": \"sec_f1c179f6-780a-46dd-8a15-0aa57b704c01\",\n                \"avatar\": \"\",\n                \"website\": \"\",\n                \"payout_terms\": \"\",\n                \"active\": 0,\n                \"suspended\": 0,\n                \"suspend_reason\": \"\",\n                \"email_settings\": null,\n                \"api_settings\": null,\n                \"organization\": null,\n                \"verification\": null,\n                \"verified\": 1,\n                \"created_at\": \"2022-11-29T08:56:36Z\",\n                \"updated_at\": \"2022-11-29T08:56:36Z\"\n            }\n        ]\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"ac83b9db-a3fa-498b-8906-3c72a2819b98"},{"name":"Create Merchant JWT","event":[{"listen":"test","script":{"id":"9881fce1-b552-4d9e-871a-4b159132361e","exec":["var jsonData = JSON.parse(responseBody);","if (jsonData.data && jsonData.data.session) {","    pm.collectionVariables.set(\"jwtToken\",  jsonData.data.session);","}"],"type":"text/javascript"}}],"id":"928e9e61-048b-4460-9e6b-7726d4bb5b21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\t\n\t\"client\": \"client_bb1d600f-f174-49dc-a34f-a79c77e237c8\",\n\t\"email\": \"zparekh@getsafepay.com\",\n\t\"password\": \"azazazazaz\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v1/company/authenticate","description":"<p>Use the <code>client</code> <code>email</code> and <code>password</code> fields to generate a JWT token. The email and password are that of the user who created the account, referred to as the Admin user.</p>\n<h5 id=\"request-body-schema\">Request Body Schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong><code>client</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>email</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>password</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTU4OTk1OTQsImlhdCI6MTY5NTg5NTk5NCwidmVyc2lvbiI6InYxIiwiZW1haWwiOiJ6cGFyZWtoQGdldHNhZmVwYXkuY29tIiwidG9rZW4iOiJjbGllbnRfMDcxZjljMjUtYzI5MS00ZGNmLWEyMWUtNzliNTc2ZGRkMGZkIiwidmVyaWZpZWQiOjEsIm1hc2siOjJ9.kLJAACzeeo-D7U1ZWLeNpbnLuvCX6LN9W5TdA3wVyXo\",\n        \"token\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The JWT token can be extracted by indexing the <code>data</code> object at the <code>session</code> property. Each session token is valid for a 24 hour period</p>\n","urlObject":{"path":["auth","v1","company","authenticate"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"3d8b9661-e1f2-45af-a205-16e0bcadd424","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\t\n\t\"client\": \"client_bb1d600f-f174-49dc-a34f-a79c77e237c8\",\n\t\"email\": \"zparekh@getsafepay.com\",\n\t\"password\": \"azazazazaz\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v1/company/authenticate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:13:14 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db365f3d8cc914-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTU4OTk1OTQsImlhdCI6MTY5NTg5NTk5NCwidmVyc2lvbiI6InYxIiwiZW1haWwiOiJ6cGFyZWtoQGdldHNhZmVwYXkuY29tIiwidG9rZW4iOiJjbGllbnRfMDcxZjljMjUtYzI5MS00ZGNmLWEyMWUtNzliNTc2ZGRkMGZkIiwidmVyaWZpZWQiOjEsIm1hc2siOjJ9.kLJAACzeeo-D7U1ZWLeNpbnLuvCX6LN9W5TdA3wVyXo\",\n        \"token\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"1962915f-c96e-40f3-b97a-5f2d0bcd791e","name":"417","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\t\n\t\"client\": \"client_bb1d600f-f174-49dc-a34f-a79c77e237c8\",\n\t\"email\": \"zparekh@getsafepay.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v1/company/authenticate"},"status":"Expectation Failed","code":417,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:13:45 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"97"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db372ff950c914-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"Expected min but got  for field: Password\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"ed5a0b35-de7d-4302-8bfb-781de04be372","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\t\n\t\"client\": \"client_bb1d600f-f174-49dc-a34f-a79c77e237c8\",\n\t\"email\": \"zparekh@getsafepay.com\",\n\t\"password\": \"123456789\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v1/company/authenticate"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:14:22 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"89"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db3812ccffc914-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"Missing authorization credentials\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"928e9e61-048b-4460-9e6b-7726d4bb5b21"},{"name":"Create Shopper JWT Using Password","id":"307aa7be-8288-4f0f-a12d-4e907ad1e048","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"password\",\n  \"email\": \"hzaidi2@getsafepay.com\",\n  \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login","description":"<p>Use the <code>type</code>, <code>email</code> and <code>password</code> fields to generate a JWT token for a Safepay Shopper. The JWT may be used to authenticate payment requests.</p>\n<h5 id=\"request-body-schema\">Request Body Schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong><code>type</code></strong></td>\n<td>enum</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>email</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>password</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["auth","v2","user","login"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"27d5be42-0666-4f4b-80f2-9928965b6e3c","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"password\",\n  \"email\": \"hzaidi2@getsafepay.com\",\n  \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:20:12 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4457b5918d1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjI5MzYwMTIsImlhdCI6MTcyMjMzMTIxMiwidmVyc2lvbiI6InYxIiwiZW1haWwiOiJoemFpZGkyQGdldHNhZmVwYXkuY29tIiwidG9rZW4iOiJ1c2VyX2Q3NTExMGU0LWY1MmUtNDY0ZC05NmJkLTQ5MGY3NWU3ZmM3MSIsIm1hc2siOjF9.Tt-YAsysrQZl9abhqyihzO6dkCqVeh6XXRm3SS4px4o\",\n        \"token\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n        \"refresh_token\": \"eyJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6Imh6YWlkaTJAZ2V0c2FmZXBheS5jb20iLCJleHAiOjE3MjIzMzQ4MTIsImlhdCI6MTcyMjMzMTIxMiwianRpIjoicmVmXzdlYmNhYmNjLWQxNTktNGIzMi1iNGUyLTAxOGNjZDJjZjNjNiJ9.-GDl7cuolo6iTq416-VJ_qTbNU3_WCUpvPtI70_acWY\"\n    }\n}"},{"id":"2aa8db05-fe76-4515-8bf8-bdbb711bd2d3","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"hzaidi2@getsafepay.com\",\n  \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:19:24 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"115"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4444e8aafd1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.bad_request\",\n    \"message\": \"Invalid authentication type. Please choose a valid authentication method.\"\n}"},{"id":"e62cc6fe-1356-4410-8770-f737be913163","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"password\",\n  \"email\": \"hzaidi2@getsafepay.com\",\n  \"password\": \"passwords\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:19:56 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"121"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab445138880d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.unauthorized_access\",\n    \"message\": \"Invalid email or password. Please check your credentials and try again.\"\n}"}],"_postman_id":"307aa7be-8288-4f0f-a12d-4e907ad1e048"},{"name":"Create Shopper JWT Using OTP","id":"0ec08da8-45e0-4f03-89fb-efe65fa2c5f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"otp\",\n  \"email\": \"ausmani@getsafepay.com\",\n  \"otp\": \"590237\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login","description":"<p>Use the <code>type</code>, <code>email</code> and <code>password</code> fields to generate a JWT token for a Safepay Shopper. The JWT may be used to authenticate payment requests.</p>\n<h5 id=\"request-body-schema\">Request Body Schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong><code>type</code></strong></td>\n<td>enum</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>email</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>password</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["auth","v2","user","login"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"a1f9bafe-5a05-48ed-aaa6-0a6838b4f566","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"otp\",\n  \"email\": \"ausmani@getsafepay.com\",\n  \"otp\": \"590237\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 23 Oct 2024 13:10:30 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8d71f7b4cc2140d0-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzAyOTM4MzAsImlhdCI6MTcyOTY4OTAzMCwidmVyc2lvbiI6InYxIiwiZW1haWwiOiJhdXNtYW5pQGdldHNhZmVwYXkuY29tIiwidG9rZW4iOiJ1c2VyXzlhYzhjYzA2LTFmYWUtNGYxMi05NjM2LWE4NzdlYjgxNzBhNCIsIm1hc2siOjF9.xwha7ApslT1Mt8fwq7V16pIbz1UVJrcd7oLXBt8rstk\",\n        \"token\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n        \"refresh_token\": \"eyJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImF1c21hbmlAZ2V0c2FmZXBheS5jb20iLCJleHAiOjE3Mjk2OTI2MzAsImlhdCI6MTcyOTY4OTAzMCwianRpIjoicmVmX2YzYmFhYjNmLTE5NGQtNGMxMC1iMzIxLWUwNDdiMmEyM2MzMCJ9.D_qHhxRfpE-JnpeqFP4Yw8qqr6qa8IPwfjp6H6-6zIc\"\n    }\n}"},{"id":"37043a64-8c5f-4da7-b56b-a1138607a9e2","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"type\": \"otp\",\n  \"email\": \"ausmani@getsafepay.com\",\n  \"otp\": \"590237\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/auth/v2/user/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 23 Oct 2024 13:10:58 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"108"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization, X-SFPY-MERCHANT-KEY"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8d71f867be5740d0-SIN"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.unauthorized_access\",\n    \"message\": \"Invalid one-time password (OTP). Please enter a valid OTP.\"\n}"}],"_postman_id":"0ec08da8-45e0-4f03-89fb-efe65fa2c5f5"},{"name":"Create Guest JWT","event":[{"listen":"test","script":{"id":"9881fce1-b552-4d9e-871a-4b159132361e","exec":["var jsonData = JSON.parse(responseBody);","if (jsonData.data && jsonData.data.session) {","    pm.collectionVariables.set(\"jwtToken\",  jsonData.data.session);","}"],"type":"text/javascript"}}],"id":"bbcaffb1-5fb3-448c-9d7f-1956dd9bdb53","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Hassan\",\n    \"last_name\": \"Zaidi\",\n    \"email\": \"hzaidi@getsafepay.com\",\n    \"country\": \"PK\",\n    \"phone\": \"+923001234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v1/guest/","description":"<p>Register a guest user. The result is a JWT token for a guest session. This can be used to authenticate the Payments Order API.</p>\n<h5 id=\"request-body-schema\">Request Body Schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong><code>email</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><strong><code>country</code></strong></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>first_name</code></td>\n<td>string</td>\n<td>N</td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>string</td>\n<td>N</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTcyNjc0NzcsImlhdCI6MTY5NjY2MjY3NywidmVyc2lvbiI6InYxIiwiZW1haWwiOiJoemFpZGlAZ2V0c2FmZXBheS5jb20iLCJ0b2tlbiI6Imd1ZXN0XzRjYTU1ZTU2LTQ1ZTYtNDZkZi04ZDY0LTY4Y2E4Njg2N2JlNSIsIm1hc2siOjR9.ADESUILYB1Nii8wysYe1MW5xF3LisW1uSuaklO8BQCo\",\n        \"token\": \"guest_4ca55e56-45e6-46df-8d64-68ca86867be5\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The JWT token can be extracted by indexing the <code>data</code> object at the <code>session</code> property. Each session token is valid for a 7 day period.</p>\n","urlObject":{"path":["user","v1","guest",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"5b9a31c5-166c-4d4c-819b-6baa4b806f21","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Hassan\",\n    \"last_name\": \"Zaidi\",\n    \"email\": \"hzaidi@getsafepay.com\",\n    \"country\": \"PK\",\n    \"phone\": \"+923001234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v1/guest/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 07 Oct 2023 07:11:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8124543919b7d1cc-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"session\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTcyNjc0NzcsImlhdCI6MTY5NjY2MjY3NywidmVyc2lvbiI6InYxIiwiZW1haWwiOiJoemFpZGlAZ2V0c2FmZXBheS5jb20iLCJ0b2tlbiI6Imd1ZXN0XzRjYTU1ZTU2LTQ1ZTYtNDZkZi04ZDY0LTY4Y2E4Njg2N2JlNSIsIm1hc2siOjR9.ADESUILYB1Nii8wysYe1MW5xF3LisW1uSuaklO8BQCo\",\n        \"token\": \"guest_4ca55e56-45e6-46df-8d64-68ca86867be5\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"373274b2-6e1e-496f-8bfd-dfd3c43b28b1","name":"417","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first_name\": \"Hassan\",\n    \"last_name\": \"Zaidi\",\n    \"country\": \"PK\",\n    \"phone\": \"+923001234567\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v1/guest/"},"status":"Expectation Failed","code":417,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 07 Oct 2023 07:12:24 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"96"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"812455e39817d1cc-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"Expected email but got  for field: Email\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"bbcaffb1-5fb3-448c-9d7f-1956dd9bdb53"},{"name":"Create API Key","id":"00e0703d-7166-4a4f-be71-fad4963aeec8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/","description":"<p>All accounts are automatically provisioned with an API key when they are created. However, if for some reason, your account does not have an API key, you can use this endpoint to create one. Alternatively, you can also create an API key from your dashboard.</p>\n<p>API keys can only be created once. To rotate or update your API key, please refer to the <code>Rotate Api Key</code> endpoint.</p>\n<p><strong>Rotating an API key will revoke access from any API endpoints that are configured with any previously generated API key. Use this endpoint only if you feel that your API key has been exposed or compromised.</strong></p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"request\">Request:</h5>\n<p>This endpoint does not require a payload</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"c44e1b93160e1ccd34ea9c40e79f5f11ea276105b563c53d9ca59e4eb8477686\",\n        \"created_at\": \"0001-01-01T00:00:00Z\",\n        \"updated_at\": \"0001-01-01T00:00:00Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The API Key can be extracted from <code>data.webhook_secret</code> and does not have an expiration date. Use this API key to authenticate against all requests that support API key based authentication</p>\n","urlObject":{"path":["client","api-settings","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"1e4095f3-0fae-4d19-ae66-4ab1e4a646db","name":"200","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:37:38 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db5a269f57c972-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"c44e1b93160e1ccd34ea9c40e79f5f11ea276105b563c53d9ca59e4eb8477686\",\n        \"created_at\": \"0001-01-01T00:00:00Z\",\n        \"updated_at\": \"0001-01-01T00:00:00Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"c5f8413b-6a12-4cfe-b87d-bf5db5e193ec","name":"400","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:34:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"78"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db55416a80c972-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"settings already exist\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"f8e6cd17-f511-4818-bcb9-708a27e0e1f3","name":"401","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:34:40 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db55d019a8c972-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"00e0703d-7166-4a4f-be71-fad4963aeec8"},{"name":"Generate Time-Based Token","id":"d5b420ca-32bf-437a-be9c-ca66ada21110","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/passport/v1/token","description":"<p>Use your merchant <strong>Secret</strong> key to generate a time-based token.</p>\n<p>The token can be extracted from <code>data</code> and has an expiration of 2 minutes. Use this token to authenticate against all requests that support time-based token authentication.</p>\n<p>To authenticate, you must set the Authorization header to <code>Bearer</code> followed by the time-based token.</p>\n","urlObject":{"path":["client","passport","v1","token"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"3e6890e8-c374-46d6-a09b-29a7b4698e04","name":"200","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/passport/v1/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 25 Oct 2023 11:15:11 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"81ba0a488a9dd1e4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": \"xnTyRgITVcHlyeKT2cf59_e836PouieQ6xPpuQiwFXD8M6HoJ283EP_zta2SKkm6B_IFNGEBmg==\"\n}"},{"id":"64c80dba-a78c-4c02-9865-d71ea1a7e5c1","name":"401","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/passport/v1/token"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 25 Oct 2023 11:15:45 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"215"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"81ba0b206b91d1e4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: could not fetch client, error: Resource with this identifier not found]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"d5b420ca-32bf-437a-be9c-ca66ada21110"}],"id":"eebdd3d9-f49a-4f34-97c9-0177f56a0758","description":"<p>For server-to-server communication, Safepay supports authentication through JWT tokens as well as API secret keys. Most APIs support both JWT and Secret Key based authentication but where an API supports a specific type of authentication, it will be mentioned.</p>\n<p>To use a JWT token, set the Authorization header to <code>Bearer</code>. To authenticate as a merchant, set a header called <code>X-SFPY-MERCHANT-SECRET</code> and use the merchant Secret Key as the value. The Secret Key can be found in the <strong>Developer</strong> section on the merchant dashboard.</p>\n<p>For client-to-server requests, a time-based token may first be generated server-side using your <strong>Secret</strong> key. This is passed similarly to the JWT token i.e. setting the Authorization header to <code>Bearer</code> followed by the time-based token (as opposed to a JWT).</p>\n","_postman_id":"eebdd3d9-f49a-4f34-97c9-0177f56a0758"},{"name":"API Keys","item":[{"name":"Find Api Key","id":"1b7e82de-97f1-4492-a1f4-c3ccf1fec39d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/","description":"<p>Retrieves details for an API key that is linked to the Safepay account</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"c44e1b93160e1ccd34ea9c40e79f5f11ea276105b563c53d9ca59e4eb8477686\",\n        \"created_at\": \"2023-09-28T10:37:38Z\",\n        \"updated_at\": \"2023-09-28T10:37:38Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The API Key can be extracted from <code>data.webhook_secret</code> and does not have an expiration date. Use this API key to authenticate against all requests that support API key based authentication</p>\n","urlObject":{"path":["client","api-settings","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"512e9ee0-e037-44ad-990d-6c2a4aed9cbd","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:52:48 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db705b6df8c904-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"c44e1b93160e1ccd34ea9c40e79f5f11ea276105b563c53d9ca59e4eb8477686\",\n        \"created_at\": \"2023-09-28T10:37:38Z\",\n        \"updated_at\": \"2023-09-28T10:37:38Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"16ac8831-8520-4461-afec-cc2e1f05b956","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 10:53:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db70c33f52c904-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"1b7e82de-97f1-4492-a1f4-c3ccf1fec39d"},{"name":"Update Api Key","id":"a8ec978e-79b3-4897-bc74-01a70cec3224","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/","description":"<p>The update endpoint generates a new API Key. If you run this endpoint, any previous implementations where the old API Key is being used will no longer work.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<p>Response:</p>\n<p>A successful request to this endpoint will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"74b1848b1c876158414d47937f392b7f67cf060ec2a1f44aae4d8a02072d1b69\",\n        \"created_at\": \"2023-09-28T10:37:38Z\",\n        \"updated_at\": \"2023-09-28T10:37:38Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The new API Key can be accessed by indexing the <code>data</code> object at the <code>webhook_secret</code> property.</p>\n","urlObject":{"path":["client","api-settings","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"aa365995-2405-4878-b372-df257c452ebd","name":"200","originalRequest":{"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:02:25 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db7e71fa77c919-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"api_b3db2bd8-5fa3-4ec4-ab47-0733dacfed69\",\n        \"client_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"webhook_secret\": \"74b1848b1c876158414d47937f392b7f67cf060ec2a1f44aae4d8a02072d1b69\",\n        \"created_at\": \"2023-09-28T10:37:38Z\",\n        \"updated_at\": \"2023-09-28T10:37:38Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"aef35d5d-924d-4039-9a94-b5e7958cd0cb","name":"401","originalRequest":{"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/client/api-settings/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:02:48 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80db7f06bf01c919-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"a8ec978e-79b3-4897-bc74-01a70cec3224"}],"id":"d688a7f7-ebfd-4ff4-a7c9-0daefa412940","description":"<p>API Key management can be performed using these endpoints. An account can have at most one API Key at any given time. This can be retrieved using the Find Api Key endpoint and it can be updated (rotated) using the Update Api Key endpoint.</p>\n","_postman_id":"d688a7f7-ebfd-4ff4-a7c9-0daefa412940"},{"name":"Merchant Shoppers","item":[{"name":"CRUD","item":[{"name":"Create Customer","id":"58553474-c95a-4edf-8840-3a18a1695cf6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n  \"email\": \"hzaidi@getsafepay.com\",\n  \"phone_number\": \"+923331234567\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/","description":"<p>Create a new <code>Customer</code>. Once created, customers may be attached to trackers for performing payments.</p>\n<h5 id=\"caution\">Caution</h5>\n<p>Before you create a new customer, make sure that the customer doesn’t already exist (with the same email or contact details). Creating multiple customer entries for the same customer can cause you problems later on, such as when you need to reconcile transaction history or coordinate saved payment methods.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>first_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Y</td>\n<td>ISO 3166-1 Alpha-2 country code.</td>\n</tr>\n<tr>\n<td><code>is_guest</code></td>\n<td>bool</td>\n<td>N</td>\n<td>False by default. Whether the Customer should represent a guest user i.e. for one-time payments.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"synthetic-customer-data\">Synthetic customer data</h5>\n<p>If you do not have the customer's contact information, you may instruct the API to generate synthetic data for you.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"use_synthetic\": true\n}\n\n</code></pre>\n<p>Note that the email defaults to <code>null@getsafepay.com</code> and no email notifications will be created for these customers.</p>\n<p>If you have partial data, you may pass that into the request using the fields above and the API will only generate values for the missing fields.</p>\n","urlObject":{"path":["user","customers","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"a171ee35-63db-4bfb-9460-af0aaacc839b","name":"201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n  \"email\": \"hzaidi@getsafepay.com\",\n  \"phone_number\": \"+923331234567\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 14:47:16 GMT"},{"key":"Content-Length","value":"428"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"cus_e927d58d-3796-4f36-a209-384906d712ea\",\n        \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n        \"email\": \"hzaidi@getsafepay.com\",\n        \"first_name\": \"Hassan\",\n        \"last_name\": \"Zaidi\",\n        \"phone_number\": \"+923331234567\",\n        \"country\": \"PK\",\n        \"is_guest\": true,\n        \"is_deleted\": false,\n        \"created_at\": {\n            \"seconds\": 1697986036,\n            \"nanos\": 25310172\n        },\n        \"updated_at\": {\n            \"seconds\": 1697986036,\n            \"nanos\": 25310589\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"0c368b47-7fb1-4c8c-aab8-31379505bf40","name":"201 - Synthetic","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"use_synthetic\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Mar 2025 08:43:32 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"428"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=BFR7VLFxCL3nrozUYylbc24%2BpF2UQYSNV8XaR4zhRe9hN6V%2BgO81QLdfJIfviPYT9KfPf%2Fa3kF5uVhA3FSEvCT8c1Ms%2BvtddtZbod62wHGECT7fv22g2UjntSN%2Bk8xAqyI2SIfgv0sYKA3S4\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"9233ec20b8ae167a-KHI"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=27834&min_rtt=26515&rtt_var=10885&sent=4&recv=5&lost=0&retrans=0&sent_bytes=2334&recv_bytes=1004&delivery_rate=108617&cwnd=251&unsent_bytes=0&cid=12b597a3f9b16329&ts=989&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"cus_ac370da3-ca11-4d7c-9699-e2a1503f3113\",\n        \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n        \"email\": \"null@getsafepay.com\",\n        \"first_name\": \" Talib\",\n        \"last_name\": \"Agha\",\n        \"phone_number\": \"+923361270164\",\n        \"country\": \"PK\",\n        \"is_guest\": false,\n        \"is_deleted\": false,\n        \"created_at\": {\n            \"seconds\": 1742460212,\n            \"nanos\": 136429183\n        },\n        \"updated_at\": {\n            \"seconds\": 1742460212,\n            \"nanos\": 136429793\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"d7ec0f9c-a5a7-4626-acb9-759ec28d5538","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n  \"email\": \"hzaidi@getsafepay.com\",\n  \"phone_number\": \"+923331234567\",\n  \"country\": \"P\",\n  \"is_guest\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:03:33 GMT"},{"key":"Content-Length","value":"108"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"country: country code unrecognized or not supported.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"21b8ed93-e6d4-4ba9-b861-dc82c568a10f","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n  \"email\": \"hzaidi@getsafepay.com\",\n  \"phone_number\": \"+923331234567\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:06:33 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"58553474-c95a-4edf-8840-3a18a1695cf6"},{"name":"Update Customer","id":"2c3da977-83fd-4a27-a8bc-aa023e057192","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Syed\",\n  \"last_name\": \"Arsalan\",\n  \"email\": \"syed@getsafepay.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","description":"<p>Update details on the customer.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>first_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Y</td>\n<td>ISO 3166-1 Alpha-2 country code.</td>\n</tr>\n<tr>\n<td><code>is_guest</code></td>\n<td>bool</td>\n<td>N</td>\n<td>False by default. Whether the Customer should represent a guest user i.e. for one-time payments.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"15c38e78-e050-4d34-a9c0-b8219b260247","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Syed\",\n  \"last_name\": \"Arsalan\",\n  \"email\": \"syed@getsafepay.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:11:02 GMT"},{"key":"Content-Length","value":"1315"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"cus_2fc20245-e0f8-447f-af75-fa651cfd54aa\",\n        \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n        \"email\": \"syed@getsafepay.com\",\n        \"first_name\": \"Syed\",\n        \"last_name\": \"Arsalan\",\n        \"phone_number\": \"+923331234567\",\n        \"country\": \"PK\",\n        \"wallet\": [\n            {\n                \"token\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n                \"customer\": \"cus_2fc20245-e0f8-447f-af75-fa651cfd54aa\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"kind\": 1,\n                \"max_usage\": 1,\n                \"usage_interval\": 0,\n                \"is_deleted\": false,\n                \"cybersource\": {\n                    \"token\": \"tms_b8543301-95ad-4eae-a86f-8d90a5ece0c7\",\n                    \"customer_payment_method\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n                    \"scheme\": 2,\n                    \"bin\": \"520000\",\n                    \"last_four\": \"1096\",\n                    \"expiry_month\": \"12\",\n                    \"expiry_year\": \"2023\",\n                    \"created_at\": {\n                        \"seconds\": 1697697321\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1697697321\n                    }\n                },\n                \"usage_count\": 0,\n                \"expires_at\": {\n                    \"seconds\": 1697783722\n                },\n                \"created_at\": {\n                    \"seconds\": 1697697321\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697697321\n                }\n            }\n        ],\n        \"is_guest\": true,\n        \"is_deleted\": false,\n        \"created_at\": {\n            \"seconds\": 1697550728\n        },\n        \"updated_at\": {\n            \"seconds\": 1697550728\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"2c397df3-e002-4ccc-ba0a-158c52bcb589","name":"400","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Syed\",\n  \"last_name\": \"Zaidi\",\n  \"email\": \"syed@getsafepay.com\",\n  \"phone_number\": \"+01234567\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:06:04 GMT"},{"key":"Content-Length","value":"91"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"phone_number: invalid country code.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"18d71e99-18fc-4db5-893e-c5657ad121e0","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Syed\",\n  \"last_name\": \"Arsalan\",\n  \"email\": \"syed@getsafepay.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:07:22 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"0d89e8aa-ac5c-4fd1-a172-bd6bbae6bcff","name":"404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Syed\",\n  \"last_name\": \"Arsalan\",\n  \"email\": \"syed@getsafepay.com\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:08:18 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"2c3da977-83fd-4a27-a8bc-aa023e057192"},{"name":"Find Customer","id":"26c44bb0-73b8-40cd-95f1-917c24fb18d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_11db365b-4d86-494b-acca-79d6e09efa67","description":"<p>Fetch details for the customer. If the user has any payment methods saved to their wallet, they will be included in the response.</p>\n","urlObject":{"path":["user","customers","v1","cus_11db365b-4d86-494b-acca-79d6e09efa67"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"1e46d49a-7ed1-464c-88c1-c07d34de56e4","name":"200","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:31:20 GMT"},{"key":"Content-Length","value":"1315"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"cus_2fc20245-e0f8-447f-af75-fa651cfd54aa\",\n        \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n        \"email\": \"syed@getsafepay.com\",\n        \"first_name\": \"Syed\",\n        \"last_name\": \"Arsalan\",\n        \"phone_number\": \"+923331234567\",\n        \"country\": \"PK\",\n        \"wallet\": [\n            {\n                \"token\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n                \"customer\": \"cus_2fc20245-e0f8-447f-af75-fa651cfd54aa\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"kind\": 1,\n                \"max_usage\": 1,\n                \"usage_interval\": 0,\n                \"is_deleted\": false,\n                \"cybersource\": {\n                    \"token\": \"tms_b8543301-95ad-4eae-a86f-8d90a5ece0c7\",\n                    \"customer_payment_method\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n                    \"scheme\": 2,\n                    \"bin\": \"520000\",\n                    \"last_four\": \"1096\",\n                    \"expiry_month\": \"12\",\n                    \"expiry_year\": \"2023\",\n                    \"created_at\": {\n                        \"seconds\": 1697697321\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1697697321\n                    }\n                },\n                \"usage_count\": 0,\n                \"expires_at\": {\n                    \"seconds\": 1697783722\n                },\n                \"created_at\": {\n                    \"seconds\": 1697697321\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697697321\n                }\n            }\n        ],\n        \"is_guest\": true,\n        \"is_deleted\": false,\n        \"created_at\": {\n            \"seconds\": 1697550728\n        },\n        \"updated_at\": {\n            \"seconds\": 1697550728\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"61f3a12e-5c66-477e-b994-81c872daec49","name":"400","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cust_2fc20245-e0f8-447f-af75-fa651cfd54aa"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:13:55 GMT"},{"key":"Content-Length","value":"131"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"incorrect merchant customer token cust_2fc20245-e0f8-447f-af75-fa651cfd54aa\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"ed54fa35-321c-4b5e-8634-b814f0c12075","name":"401","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:31:37 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"8e3ba0fe-b9d0-4e04-b6fb-f0aa57cb1a4a","name":"404","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 17:09:35 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"26c44bb0-73b8-40cd-95f1-917c24fb18d3"},{"name":"Delete Customer","id":"33a362e5-f6f1-4be6-a3b0-ed8e684b215a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52","description":"<p>Mark the customer as deleted. The response returns the <code>token</code> that identifies that customer and a <code>deleted</code> property that denotes whether the deletion was successful.</p>\n","urlObject":{"path":["user","customers","v1","cus_17febb02-b2cd-4cf8-b299-7a447530ef52"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"a8e0e4ec-c1eb-4849-9dee-fe2938a45747","name":"200","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_84dd32b1-2657-401e-902d-8cc11dd34b95"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:18:38 GMT"},{"key":"Content-Length","value":"120"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"cus_84dd32b1-2657-401e-902d-8cc11dd34b95\",\n        \"deleted\": true\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"bf409db6-54c3-49f3-9c71-9db4c9ac1616","name":"400","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cu_84dd32b1-2657-401e-902d-8cc11dd34b95"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:17:47 GMT"},{"key":"Content-Length","value":"129"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"incorrect merchant customer token cu_84dd32b1-2657-401e-902d-8cc11dd34b95\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"0de90649-2b8d-453c-8a66-b7b8cb5cd3c4","name":"401","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_84dd32b1-2657-401e-902d-8cc11dd34b95"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:18:05 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"a00f97fd-eb46-4892-a594-3482200e8929","name":"404","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_84dd32b1-2657-401e-902d-8cc11dd34b94"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:18:24 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"33a362e5-f6f1-4be6-a3b0-ed8e684b215a"},{"name":"List Customers","id":"3e786570-62fd-4520-953b-809e092a4eb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/?limit=20&page=1","description":"<p>Fetch all customers. The following query modifiers are supported.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>limit</code></td>\n<td>number</td>\n<td>Y</td>\n<td>The upper bound on the number of results.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>number</td>\n<td>Y</td>\n<td>The offset from which to fetch <code>limit</code> many results. Enables pagination.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","customers","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[{"key":"limit","value":"20"},{"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"f88af5b4-f775-436c-9a75-2b976b7fde6a","name":"200","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/?limit=20&page=1","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1",""],"query":[{"key":"limit","value":"20"},{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:41:30 GMT"},{"key":"Content-Length","value":"1785"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"customers\": [\n            {\n                \"token\": \"cus_c79ef0ed-a787-4dee-98db-f0911044614c\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"email\": \"hzaidi@getsafepay.com\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"phone_number\": \"+913331234567\",\n                \"country\": \"PK\",\n                \"is_guest\": true,\n                \"is_deleted\": false,\n                \"created_at\": {\n                    \"seconds\": 1697994236\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697994236\n                }\n            },\n            {\n                \"token\": \"cus_c3664cbc-3988-49b8-a3c7-6ad958793cf5\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"email\": \"hzaidi@getsafepay.com\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"phone_number\": \"+923331234567\",\n                \"country\": \"PK\",\n                \"is_guest\": true,\n                \"is_deleted\": false,\n                \"created_at\": {\n                    \"seconds\": 1697994232\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697994232\n                }\n            },\n            {\n                \"token\": \"cus_bc04ca6f-2bd5-45df-8ace-8c81f8172bf4\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"email\": \"hzaidi@getsafepay.com\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"phone_number\": \"+923331234567\",\n                \"country\": \"P\",\n                \"is_guest\": true,\n                \"is_deleted\": false,\n                \"created_at\": {\n                    \"seconds\": 1697986055\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697986055\n                }\n            },\n            {\n                \"token\": \"cus_e927d58d-3796-4f36-a209-384906d712ea\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"email\": \"hzaidi@getsafepay.com\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"phone_number\": \"+923331234567\",\n                \"country\": \"PK\",\n                \"is_guest\": true,\n                \"is_deleted\": false,\n                \"created_at\": {\n                    \"seconds\": 1697986036\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697986036\n                }\n            },\n            {\n                \"token\": \"cus_2fc20245-e0f8-447f-af75-fa651cfd54aa\",\n                \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n                \"email\": \"syed@getsafepay.com\",\n                \"first_name\": \"Syed\",\n                \"last_name\": \"Arsalan\",\n                \"phone_number\": \"+923331234567\",\n                \"country\": \"PK\",\n                \"is_guest\": true,\n                \"is_deleted\": false,\n                \"created_at\": {\n                    \"seconds\": 1697550728\n                },\n                \"updated_at\": {\n                    \"seconds\": 1697550728\n                }\n            }\n        ],\n        \"count\": 5\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"bf35b08c-195c-4d8a-ab18-d61df9af9482","name":"400","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/?limit=20&page=-1","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1",""],"query":[{"key":"limit","value":"20"},{"key":"page","value":"-1"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:42:16 GMT"},{"key":"Content-Length","value":"85"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"page: must be no less than 1.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"81d87499-f4e0-4847-a335-4150cdc41069","name":"401","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/?limit=20&page=0","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1",""],"query":[{"key":"limit","value":"20"},{"key":"page","value":"0"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 18:42:33 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"3e786570-62fd-4520-953b-809e092a4eb8"}],"id":"0d63472a-d71f-4814-88d1-8b7a5d2ab2be","description":"<p>Manage your customers.</p>\n","_postman_id":"0d63472a-d71f-4814-88d1-8b7a5d2ab2be"},{"name":"Customer Payment Methods","item":[{"name":"Find Payment Method","id":"84ed7202-22f1-4131-8324-1ca2d8292992","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89","description":"<p>Fetch details for the payment method.</p>\n","urlObject":{"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet","pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"c7631295-6fb3-4b9b-af7b-4ceb2047c4af","name":"200","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:06:15 GMT"},{"key":"Content-Length","value":"964"}],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"token\": \"pm_3b4a7c47-99cc-4fda-9b4c-b46b11e2cd18\",\n    \"customer\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n    \"merchant_api_key\": \"sec_efbce898-4cc4-4c00-ba45-f00001804a60\",\n    \"kind\": 1,\n    \"max_usage\": 1,\n    \"usage_interval\": 0,\n    \"is_deleted\": false,\n    \"billing_address\": {\n      \"token\": \"address_25f9c917-9d73-4e45-964a-916df314d388\",\n      \"owner\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n      \"street1\": \"house\",\n      \"city\": \"Houstan\",\n      \"state\": \"TX\",\n      \"postal_code\": \"77027\",\n      \"country\": \"US\",\n      \"is_default\": false,\n      \"created_at\": {\n        \"seconds\": 1700724454\n      },\n      \"updated_at\": {\n        \"seconds\": 1700724454\n      }\n    },\n    \"cybersource\": {\n      \"token\": \"tms_eb5660d2-e0d6-4898-8fb0-51f53ff49022\",\n      \"customer_payment_method\": \"pm_3b4a7c47-99cc-4fda-9b4c-b46b11e2cd18\",\n      \"fingerprint\": \"7d7c3ca2d742e36733aca5a7a595ed822eaaf2b7295cc9599819e3928ce85fc9\",\n      \"scheme\": 2,\n      \"bin\": \"520000\",\n      \"last_four\": \"1096\",\n      \"expiry_month\": \"12\",\n      \"expiry_year\": \"2028\",\n      \"created_at\": {\n        \"seconds\": 1700724455\n      },\n      \"updated_at\": {\n        \"seconds\": 1700724455\n      }\n    },\n    \"usage_count\": 0,\n    \"expires_at\": {\n      \"seconds\": 1700810855\n    },\n    \"created_at\": {\n      \"seconds\": 1700724455\n    },\n    \"updated_at\": {\n      \"seconds\": 1700724455\n    }\n  },\n  \"status\": {\n    \"errors\": [],\n    \"message\": \"success\"\n  }\n}"},{"id":"c6b30a2e-c76b-456f-8ad5-c642ad7c0028","name":"400","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pfd_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:39:09 GMT"},{"key":"Content-Length","value":"136"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"incorrect customer payment method token pfd_bea00774-22ba-44ce-82c5-3cdd1a342e89\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"a251824a-1287-45c6-b625-b5d91f75d37d","name":"401","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:40:25 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"cc4a5232-a963-44a8-9bcd-42607f561f68","name":"403","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e8"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:30:40 GMT"},{"key":"Content-Length","value":"126"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"the requested payment method does not belong to this customer's wallet\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"d2aef341-bbba-4703-83af-cc2742918aca","name":"404","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa61cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:40:10 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"84ed7202-22f1-4131-8324-1ca2d8292992"},{"name":"Delete Payment Method","id":"abca60ca-aa3a-496f-81f6-117aac7bce1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89","description":"<p>Mark the payment method as deleted. The response returns the <code>token</code> that identifies that payment method and a <code>deleted</code> property that denotes whether the deletion was successful.</p>\n","urlObject":{"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet","pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"199cedff-c83a-4dc3-838e-baafc8f815b9","name":"200","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 20:02:19 GMT"},{"key":"Content-Length","value":"119"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n        \"deleted\": true\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"6a6989a7-4cb8-4bb1-8fa7-41ff41fa711e","name":"200 - Deleted \"false\"","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 20:02:25 GMT"},{"key":"Content-Length","value":"120"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"pm_bea00774-22ba-44ce-82c5-3cdd1a342e89\",\n        \"deleted\": false\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"421ae25d-b253-48b2-9eaa-fbe427be7f45","name":"400","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52/wallet/p_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:59:11 GMT"},{"key":"Content-Length","value":"134"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"incorrect customer payment method token p_bea00774-22ba-44ce-82c5-3cdd1a342e89\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"dabeb32c-3940-43f5-a1a5-3657c93606c5","name":"401","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530ef52/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:59:31 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"09850c29-070d-4ff7-aec1-757a5df59bc1","name":"403","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e8"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 20:02:01 GMT"},{"key":"Content-Length","value":"126"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"the requested payment method does not belong to this customer's wallet\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"a190db5c-d0d9-4694-a5ff-db135f814d8b","name":"404","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://dev.api.getsafepay.com/user/customers/v1/cus_17febb02-b2cd-4cf8-b299-7a447530f52/wallet/pm_bea00774-22ba-44ce-82c5-3cdd1a342e89"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:59:46 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"abca60ca-aa3a-496f-81f6-117aac7bce1f"},{"name":"List Payment Methods","id":"a0a3b828-4e95-456e-ad6f-dff050d3e3c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":"https://sandbox.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/","description":"<p>Fetch all payment methods belonging to a customer.</p>\n<h6 id=\"supported-query-params\">Supported query params</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>limit</code></td>\n<td>number</td>\n<td>Y</td>\n<td>The upper bound on the number of results.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>number</td>\n<td>Y</td>\n<td>The offset from which to fetch <code>limit</code> many results. Enables pagination.</td>\n</tr>\n</tbody>\n</table>\n</div><p>The <code>wallet</code> property will contain the list of payment methods that have been searched for while the <code>count</code> will indicate how many results were returned.</p>\n","urlObject":{"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet",""],"host":["https://sandbox.api.getsafepay.com"],"query":[{"disabled":true,"key":"limit","value":"20"},{"disabled":true,"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"fb095c69-d045-4998-81a3-a6933d43fe13","name":"200","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet",""],"query":[{"key":"limit","value":"20","disabled":true},{"key":"page","value":"1","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:54:37 GMT"},{"key":"Content-Length","value":"987"}],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"wallet\": [\n      {\n        \"token\": \"pm_5543b042-bd9c-4853-995b-2405b7c72dd9\",\n        \"customer\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n        \"merchant_api_key\": \"sec_efbce898-4cc4-4c00-ba45-f00001804a60\",\n        \"kind\": 1,\n        \"max_usage\": 1,\n        \"usage_interval\": 0,\n        \"is_deleted\": false,\n        \"billing_address\": {\n          \"token\": \"address_165864ee-c9b4-4e6f-97a1-c6bf56b6bce8\",\n          \"owner\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n          \"street1\": \"house\",\n          \"city\": \"qhouse\",\n          \"country\": \"PK\",\n          \"is_default\": false,\n          \"created_at\": {\n            \"seconds\": 1700724546\n          },\n          \"updated_at\": {\n            \"seconds\": 1700724546\n          }\n        },\n        \"cybersource\": {\n          \"token\": \"tms_8ca63428-5d80-4542-8a93-401d797b91ff\",\n          \"customer_payment_method\": \"pm_5543b042-bd9c-4853-995b-2405b7c72dd9\",\n          \"fingerprint\": \"17eec1263ea9b3a244be72b5ec27bfaf02d84e180085ae67da0b981c79231eb5\",\n          \"scheme\": 1,\n          \"bin\": \"411111\",\n          \"last_four\": \"1111\",\n          \"expiry_month\": \"12\",\n          \"expiry_year\": \"2029\",\n          \"created_at\": {\n            \"seconds\": 1700724546\n          },\n          \"updated_at\": {\n            \"seconds\": 1700724546\n          }\n        },\n        \"usage_count\": 0,\n        \"expires_at\": {\n          \"seconds\": 1700810946\n        },\n        \"created_at\": {\n          \"seconds\": 1700724546\n        },\n        \"updated_at\": {\n          \"seconds\": 1700724546\n        }\n      },\n      {\n        \"token\": \"pm_3b4a7c47-99cc-4fda-9b4c-b46b11e2cd18\",\n        \"customer\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n        \"merchant_api_key\": \"sec_efbce898-4cc4-4c00-ba45-f00001804a60\",\n        \"kind\": 1,\n        \"max_usage\": 1,\n        \"usage_interval\": 0,\n        \"is_deleted\": false,\n        \"billing_address\": {\n          \"token\": \"address_25f9c917-9d73-4e45-964a-916df314d388\",\n          \"owner\": \"cus_a03d1304-d088-4a60-801f-b6a3d44b445d\",\n          \"street1\": \"house\",\n          \"city\": \"Houstan\",\n          \"state\": \"TX\",\n          \"postal_code\": \"77027\",\n          \"country\": \"US\",\n          \"is_default\": false,\n          \"created_at\": {\n            \"seconds\": 1700724454\n          },\n          \"updated_at\": {\n            \"seconds\": 1700724454\n          }\n        },\n        \"cybersource\": {\n          \"token\": \"tms_eb5660d2-e0d6-4898-8fb0-51f53ff49022\",\n          \"customer_payment_method\": \"pm_3b4a7c47-99cc-4fda-9b4c-b46b11e2cd18\",\n          \"fingerprint\": \"7d7c3ca2d742e36733aca5a7a595ed822eaaf2b7295cc9599819e3928ce85fc9\",\n          \"scheme\": 2,\n          \"bin\": \"520000\",\n          \"last_four\": \"1096\",\n          \"expiry_month\": \"12\",\n          \"expiry_year\": \"2028\",\n          \"created_at\": {\n            \"seconds\": 1700724455\n          },\n          \"updated_at\": {\n            \"seconds\": 1700724455\n          }\n        },\n        \"usage_count\": 0,\n        \"expires_at\": {\n          \"seconds\": 1700810855\n        },\n        \"created_at\": {\n          \"seconds\": 1700724455\n        },\n        \"updated_at\": {\n          \"seconds\": 1700724455\n        }\n      }\n    ],\n    \"count\": 2\n  },\n  \"status\": {\n    \"errors\": [],\n    \"message\": \"success\"\n  }\n}"},{"id":"8ee4060a-457e-434b-8496-dafca19ec423","name":"400","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/cs_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1","cs_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet",""],"query":[{"key":"limit","value":"20","disabled":true},{"key":"page","value":"1","disabled":true}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:56:15 GMT"},{"key":"Content-Length","value":"129"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"incorrect merchant customer token cs_2fc20245-e0f8-447f-af75-fa651cfd54aa\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"294a0fec-de55-4c24-9fd3-d7ae495db63c","name":"401","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd54aa/wallet/","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd54aa","wallet",""],"query":[{"key":"limit","value":"20","disabled":true},{"key":"page","value":"1","disabled":true}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:55:46 GMT"},{"key":"Content-Length","value":"222"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"ecafb3de-782e-4ab7-994c-5ad8cd9b5228","name":"404","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"text"}}},"url":{"raw":"https://dev.api.getsafepay.com/user/customers/v1/cus_2fc20245-e0f8-447f-af75-fa651cfd5aa/wallet/","host":["https://dev.api.getsafepay.com"],"path":["user","customers","v1","cus_2fc20245-e0f8-447f-af75-fa651cfd5aa","wallet",""],"query":[{"key":"limit","value":"20","disabled":true},{"key":"page","value":"1","disabled":true}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Sun, 22 Oct 2023 19:56:01 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"customer not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"a0a3b828-4e95-456e-ad6f-dff050d3e3c4"}],"id":"32303749-a3cc-446d-8866-c17915d11f6b","description":"<p>Manage payment methods belonging to your customers' wallets. To create payment methods, a customer must go through a checkout session and consent to saving their payment method details for future use.</p>\n<h5 id=\"payment-method-object\">Payment Method Object</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>token</code></td>\n<td>string</td>\n<td>A unique identifier for the payment method.</td>\n</tr>\n<tr>\n<td><code>customer</code></td>\n<td>string</td>\n<td>The ID for the customer that owns this payment method.</td>\n</tr>\n<tr>\n<td><code>merchant_api_key</code></td>\n<td>string</td>\n<td>The API key of the merchant who owns the customer.</td>\n</tr>\n<tr>\n<td><code>kind</code></td>\n<td>enum</td>\n<td>The category of this payment method.</td>\n</tr>\n<tr>\n<td><code>max_usage</code></td>\n<td>number</td>\n<td>The maximum number of uses allowed for this payment method.</td>\n</tr>\n<tr>\n<td><code>usage_interval</code></td>\n<td>enum</td>\n<td>The interval over which the <code>max_usage</code> is applicable.</td>\n</tr>\n<tr>\n<td><code>is_deleted</code></td>\n<td>bool</td>\n<td>Whether the payment method is marked as deleted.</td>\n</tr>\n<tr>\n<td><code>contact</code></td>\n<td>object</td>\n<td>The contact details for the customer that owns this payment method.</td>\n</tr>\n<tr>\n<td><code>billing_address</code></td>\n<td>object</td>\n<td>The billing address associated with the payment method.</td>\n</tr>\n<tr>\n<td><code>cybersource</code></td>\n<td>object</td>\n<td>The <em>Cybersource</em> payment method details. This will be populated if the <code>kind</code> is <code>1</code>.</td>\n</tr>\n<tr>\n<td><code>usage_count</code></td>\n<td>number</td>\n<td>The total number of uses for this payment method.</td>\n</tr>\n<tr>\n<td><code>expires_at</code></td>\n<td>timestamp</td>\n<td>When this payment method is set to expire if at all.</td>\n</tr>\n</tbody>\n</table>\n</div><p>The <code>kind</code> may take the following values:</p>\n<ul>\n<li><p><code>1</code> - <code>CYBERSOURCE</code></p>\n</li>\n<li><p><code>2</code> - <code>MPGS</code></p>\n</li>\n</ul>\n<h6 id=\"usage\">Usage</h6>\n<p>The <code>usage_interval</code> may take the following values:</p>\n<ul>\n<li><p><code>0</code> - <code>LIFETIME</code></p>\n</li>\n<li><p><code>1</code> - <code>DAY</code></p>\n</li>\n</ul>\n<p>Example: a <code>max_usage</code> of <strong>5</strong> with <code>usage_interval</code> <strong>1</strong> signifies that a payment method may be used up to a maximum of 5 times within a day. A <code>max_usage</code> of <strong>-1</strong> denotes unlimited use.</p>\n<h6 id=\"cybersource\"><strong>Cybersource</strong></h6>\n<p>The <em>Cybersource</em> object is document below:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>token</code></td>\n<td>string</td>\n<td>Uniquely identifies the card.</td>\n</tr>\n<tr>\n<td><code>customer_payment_method</code></td>\n<td>string</td>\n<td>The payment method associated with this card.</td>\n</tr>\n<tr>\n<td><code>scheme</code></td>\n<td>enum</td>\n<td>The card brand.</td>\n</tr>\n<tr>\n<td><code>bin</code></td>\n<td>string</td>\n<td>The first 4 or 6 digits of the PAN that identify the issuer.</td>\n</tr>\n<tr>\n<td><code>last_four</code></td>\n<td>string</td>\n<td>The last four digits of the PAN.</td>\n</tr>\n<tr>\n<td><code>expiration_month</code></td>\n<td>string</td>\n<td>The month for when this card is slated to expire.</td>\n</tr>\n<tr>\n<td><code>expiration_year</code></td>\n<td>string</td>\n<td>The year for when this card is slated to expire.</td>\n</tr>\n</tbody>\n</table>\n</div><p>The <code>scheme</code> may take the following values:</p>\n<ul>\n<li><p><code>1</code> - Visa</p>\n</li>\n<li><p><code>2</code> - Mastercard</p>\n</li>\n</ul>\n","_postman_id":"32303749-a3cc-446d-8866-c17915d11f6b"},{"name":"Addresses","item":[{"name":"Create Address","id":"b4f401ad-ea42-48d0-9055-9f743b92303e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"street1\": \"House 54, St 11A\",\n  \"street2\": \"Royal Canyon Vistas\",\n  \"city\": \"Islamabad\",\n  \"state\": \"Capital Territory\",\n  \"postal_code\": \"44000\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/address/v2/","description":"<p>Create a new address. You must authenticate with your secret key. Once created, an address may be passed to the checkout session to be used as the billing details for the payment.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street1</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The primary address line.</td>\n</tr>\n<tr>\n<td><code>street2</code></td>\n<td>string</td>\n<td>N</td>\n<td>The secondary address line.</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The locality.</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>N</td>\n<td>The province or state.</td>\n</tr>\n<tr>\n<td><code>postal_code</code></td>\n<td>string</td>\n<td>N</td>\n<td>The zip code.</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","address","v2",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"363b51c3-e8f5-4182-8b9c-66efa6bec9f0","name":"201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"street1\": \"House 54, St 11A\",\n  \"street2\": \"Royal Canyon Vistas\",\n  \"city\": \"Islamabad\",\n  \"state\": \"Capital Territory\",\n  \"postal_code\": \"44000\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:06:02 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"379"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258f23de8d8d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"address_5ce54f87-a823-4da6-8990-7b26d048ce00\",\n        \"street1\": \"House 54, St 11A\",\n        \"street2\": \"Royal Canyon Vistas\",\n        \"city\": \"Islamabad\",\n        \"state\": \"Capital Territory\",\n        \"postal_code\": \"44000\",\n        \"country\": \"PK\",\n        \"is_default\": false,\n        \"created_at\": {\n            \"seconds\": 1699898762,\n            \"nanos\": 38301558\n        },\n        \"updated_at\": {\n            \"seconds\": 1699898762,\n            \"nanos\": 38302407\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"78a58b4a-9290-4543-bbb1-f654d06ce85d","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:05:32 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"157"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258f1800eefd1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"city: cannot be blank; country: country code unrecognized or not supported; street1: cannot be blank.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"c2b4a49d-3a43-4f23-af6f-91c6f04f453f","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"street1\": \"House 54, St 11A\",\n  \"street2\": \"Royal Canyon Vistas\",\n  \"city\": \"Islamabad\",\n  \"state\": \"Capital Territory\",\n  \"postal_code\": \"44000\",\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:06:24 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"222"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258f2cb5c15d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"b4f401ad-ea42-48d0-9055-9f743b92303e"},{"name":"Update Address","id":"f359701f-ec57-438a-8a03-1edfbdcbc90b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00","description":"<p>Update an address. You must authenticate with your secret key.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street1</code></td>\n<td>string</td>\n<td>N</td>\n<td>The primary address line.</td>\n</tr>\n<tr>\n<td><code>street2</code></td>\n<td>string</td>\n<td>N</td>\n<td>The secondary address line.</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>N</td>\n<td>The locality.</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>N</td>\n<td>The province or state.</td>\n</tr>\n<tr>\n<td><code>postal_code</code></td>\n<td>string</td>\n<td>N</td>\n<td>The zip code.</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>N</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","address","v2","address_5ce54f87-a823-4da6-8990-7b26d048ce00"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"cf624782-236a-4a11-8f1a-1e3ae357447a","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"street1\": \"House 34, St 12A\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:12:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258fb5f9ebbd1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"address_5ce54f87-a823-4da6-8990-7b26d048ce00\",\n        \"street1\": \"House 34, St 12A\",\n        \"street2\": \"Royal Canyon Vistas\",\n        \"city\": \"Islamabad\",\n        \"state\": \"Capital Territory\",\n        \"postal_code\": \"44000\",\n        \"country\": \"PK\",\n        \"is_default\": false,\n        \"created_at\": {\n            \"seconds\": 1699898762\n        },\n        \"updated_at\": {\n            \"seconds\": 1699899136,\n            \"nanos\": 49865133\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"8b34fcf7-bb50-4f34-ba96-7532a34d2cdc","name":"400","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"country\": \"Pakistan\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:12:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"108"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258fc50ed60d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"country: country code unrecognized or not supported.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"7ee3ca98-f3b1-4e31-8f5a-62809fa28d8e","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:13:18 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"222"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258fce7d9a5d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: could not fetch client, error: Resource with this identifier not found, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"960841d5-b474-4748-8183-cf1da7e3c68f","name":"404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"country\": \"PK\"\n}","options":{"raw":{"language":"json"}}},"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce09"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:14:25 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258fe812a5ed1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"address not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"f359701f-ec57-438a-8a03-1edfbdcbc90b"},{"name":"Find Address","id":"50ea3738-beb0-4f77-b465-9d3afc159a5a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00","description":"<p>Find an address using its <code>token</code>. You must authenticate using your secret key.</p>\n","urlObject":{"path":["user","address","v2","address_5ce54f87-a823-4da6-8990-7b26d048ce00"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"0123ff5b-6b32-4776-88fa-b93ad742e538","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:15:48 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8259008faab0d1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"address_5ce54f87-a823-4da6-8990-7b26d048ce00\",\n        \"street1\": \"House 34, St 12A\",\n        \"street2\": \"Royal Canyon Vistas\",\n        \"city\": \"Islamabad\",\n        \"state\": \"Capital Territory\",\n        \"postal_code\": \"44000\",\n        \"country\": \"PK\",\n        \"is_default\": false,\n        \"created_at\": {\n            \"seconds\": 1699898762\n        },\n        \"updated_at\": {\n            \"seconds\": 1699899136\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"117a5339-faac-44f4-bec8-8167d69e4ab2","name":"400","originalRequest":{"method":"GET","header":[],"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce0"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:16:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"98"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"825900f38e47d1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"invalid token format: must be a valid UUID\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"04b01a23-3bd4-4f65-8458-df014560afd5","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce00"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:15:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"207"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8258ffc7883ed1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/secret: merchant webhook secret not found in the request header, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"3ec9043e-bdaa-4c64-8752-6342ea2f4b8e","name":"404","originalRequest":{"method":"GET","header":[],"url":"https://dev.api.getsafepay.com/user/address/v2/address_5ce54f87-a823-4da6-8990-7b26d048ce01"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 13 Nov 2023 18:15:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"825900444c29d1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"address not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"50ea3738-beb0-4f77-b465-9d3afc159a5a"}],"id":"27074e81-754f-49ff-bf6f-45ab178fa6e5","description":"<p>Create addresses to associate with customer payment methods. Creating addresses server-side allows you to pre-populate addresses for your customers. These can then be passed to the checkout session, saving the customer from having to re-enter their billing details.</p>\n<h5 id=\"address-object\">Address Object</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>token</code></td>\n<td>string</td>\n<td>A unique identifier for the address.</td>\n</tr>\n<tr>\n<td><code>street1</code></td>\n<td>string</td>\n<td>The primary address line.</td>\n</tr>\n<tr>\n<td><code>street2</code></td>\n<td>string</td>\n<td>The secondary address line.</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>The locality.</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>The province or state.</td>\n</tr>\n<tr>\n<td><code>postal_code</code></td>\n<td>string</td>\n<td>The zip code.</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>ISO 3166-1 Alpha-2 country code.</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>timestamp</td>\n<td>When this address object was created.</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>timestamp</td>\n<td>When this address object was last updated.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"27074e81-754f-49ff-bf6f-45ab178fa6e5"}],"id":"67d144ef-fad9-43ea-8595-6f710f203305","description":"<p>Create and manage <code>customers</code> linked to your store. The <code>customer</code> object encapsulates the contact details of a user along with payment methods that a user wants to save to their wallet. Customers may also be marked as guests to support one time payments.</p>\n<p>All <code>customer</code> related endpoints may be authenticated with your merchant <strong>Secret</strong> key.</p>\n","_postman_id":"67d144ef-fad9-43ea-8595-6f710f203305"},{"name":"Payments","item":[{"name":"Setup","item":[{"name":"Payment","id":"647f1146-d656-4868-a695-34ad8fcabeb2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"user\": \"customer_token\",\n  \"amount\": 5000,\n  \"entry_mode\": \"raw\",\n  \"metadata\": {\n    \"source\": \"shopify\",\n    \"order_id\": \"41231X\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/","description":"<p>Create a <code>tracker</code> with mode <code>payment</code>.</p>\n","urlObject":{"path":["order","payments","v3",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"4ecaeaa0-c01b-4446-97b9-b5e9be9d7a58","name":"201 - raw","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"user\": \"customer_token\",\n  \"mode\": \"payment\",\n  \"entry_mode\": \"raw\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 12:08:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"627"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab53bb1fef2d1e8-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_895ca125-8bd3-438e-82ea-ce93e5845933\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"raw\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"CREATE_SESSION\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"f9809007-eee6-481c-869b-2eeb0e00b7e2","name":"201 - flex","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 12:07:26 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"626"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab53a700db4d1e8-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_36b30a36-e42e-475a-a60e-fbc97c6cf9cc\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"flex\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"GENERATE_CAPTURE_CONTEXT\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"39ef55dc-5e0a-4615-a584-bf8d6b1ae90b","name":"201 - unscheduled-raw","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"user\": \"customer_token\",\n  \"mode\": \"payment\",\n  \"entry_mode\": \"unscheduled_raw\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 12:08:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"627"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab53bb1fef2d1e8-MCT"}],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"tracker\": {\n      \"token\": \"track_f8664c1d-5b2f-4389-9c1d-39059e5b8786\",\n      \"client\": \"sec_d8233453-7b13-49f5-bffa-1675dad71b92\",\n      \"environment\": \"sandbox\",\n      \"state\": \"TRACKER_STARTED\",\n      \"payment_method_kind\": \"card\",\n      \"intent\": \"CYBERSOURCE\",\n      \"mode\": \"payment\",\n      \"entry_mode\": \"unscheduled_raw\",\n      \"customer\": \"cus_fa03ab2f-a74d-4523-beb8-8dbde3ab84b5\",\n      \"next_actions\": {\n        \"CYBERSOURCE\": {\n          \"kind\": \"AUTHORIZATION\"\n        },\n        \"MPGS\": {\n          \"kind\": \"NOOP\"\n        }\n      },\n      \"purchase_totals\": {\n        \"quote_amount\": {\n          \"currency\": \"PKR\",\n          \"amount\": 156050\n        },\n        \"base_amount\": {\n          \"currency\": \"PKR\",\n          \"amount\": 156050\n        },\n        \"conversion_rate\": {\n          \"base_currency\": \"PKR\",\n          \"quote_currency\": \"PKR\",\n          \"rate\": 1\n        }\n      },\n      \"metadata\": {}\n    },\n    \"capabilities\": {\n      \"CYBERSOURCE\": true,\n      \"MPGS\": true\n    }\n  },\n  \"status\": {\n    \"errors\": [],\n    \"message\": \"success\"\n  }\n}"},{"id":"54edfa37-fc52-471c-8d55-cb82ce6c1ab3","name":"201 - tms","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"entry_mode\": \"tms\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 12:08:31 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"617"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab53c08f9d5d1e8-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_61414d0f-7740-4297-903a-3aca4b04bca8\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"tms\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"6717c337-d7e5-4b40-a4dd-b348a44b69e3","name":"201 - with network_token","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchant_api_key\": \"sec_9021583d-b77b-40ef-ac7f-a8fa931097d0\",\n    \"intent\": \"CYBERSOURCE\",\n    \"user\": \"customer_token\",\n    \"mode\": \"payment\",\n    \"entry_mode\": \"network_token\",\n    \"currency\": \"PKR\",\n    \"amount\": 1244\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_94b6cbf6-b4a0-4f9b-81a7-1837639f5e22\",\n            \"client\": \"sec_9021583d-b77b-40ef-ac7f-a8fa931097d0\",\n            \"environment\": \"local\",\n            \"state\": \"TRACKER_STARTED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"network_token\",\n            \"customer\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true,\n            \"PAYFAST\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"71215058-2c29-4eb6-af9d-d1124625c022","name":"201 - with metadata","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"user\": \"customer_token\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"amount\": 500000,\n  \"entry_mode\": \"raw\",\n  \"metadata\": {\n    \"source\": \"shopify\",\n    \"order_id\": \"41231X\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 06 Mar 2025 04:16:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"757"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=zn0UuxJlg7SELU1%2BgvEG%2FDgvEoCSTMZC6%2BYkgCJPGSyuYtp2vOqUuhp6gy%2FeMZKPKhpU0BrsgFIRB8%2Feie7twQ%2Fc%2Fd0cHJFYwKLK9Kl0kBYO8FH2qHdIMUYprRKEnzAUTSeN8IlV1vt3iWWf\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"91bf09fece4c3890-KHI"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=28627&min_rtt=25965&rtt_var=6512&sent=87&recv=88&lost=0&retrans=0&sent_bytes=6153&recv_bytes=2256&delivery_rate=149418&cwnd=4&unsent_bytes=0&cid=910d942a875b680a&ts=80862&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_66fca62d-0777-4c35-916e-0fe40cc60a98\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"raw\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"CREATE_SESSION\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"CUSTOMER_VALIDATE\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {\n                \"data\": {\n                    \"order_id\": \"41231X\",\n                    \"source\": \"shopify\"\n                }\n            }\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true,\n            \"PAYFAST\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"ff2eec98-58ac-4a2d-afa8-49c54a4ed912","name":"201 - network_token cit","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchant_api_key\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\",\n    \"intent\": \"CYBERSOURCE\",\n    \"user\": \"customer_token\",\n    \"mode\": \"payment\",\n    \"entry_mode\": \"network_token\",\n    \"currency\": \"PKR\",\n    \"amount\": 1244\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_88f7e3e8-1673-4ab9-9818-e169d38ca0c0\",\n            \"client\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\",\n            \"environment\": \"local\",\n            \"state\": \"TRACKER_STARTED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"subscription\",\n            \"entry_mode\": \"network_token\",\n            \"customer\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true,\n            \"PAYFAST\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"ad91074d-0823-497f-950f-a67e403e73ee","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce4155\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 06:42:42 GMT"},{"key":"Content-Length","value":"133"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"merchant_api_key: invalid key part in merchant_api_key: must be a valid UUID.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"f03f186f-ddd7-43f1-86ed-6251c8098219","name":"404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41553\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 06:42:13 GMT"},{"key":"Content-Length","value":"130"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"merchant with api key 'sec_edeade52-46aa-483b-b87d-009d3ce41553' not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"6711c500-9265-49f7-ae87-6092c05b173b","name":"500","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"currency\": \"PKR\",\n  \"amount\": 0\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 06:46:49 GMT"},{"key":"Content-Length","value":"74"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"amount cannot be 0\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"647f1146-d656-4868-a695-34ad8fcabeb2"},{"name":"Subscription","id":"0be47b05-2cb6-4608-9764-6a37ab450081","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\", \n  \"user\":\"user_793f7a42-80c4-4191-8df6-31d6b3ab829b\",\n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"subscription\",\n  \"currency\": \"PKR\",\n  \"amount\": 500000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/","description":"<p>Create a <code>tracker</code> with mode <code>payment</code>.</p>\n","urlObject":{"path":["order","payments","v3",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"6224aeaf-98a7-4778-82e2-cc6c4f815a0a","name":"201 - subscription-mit-nt","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"merchant_api_key\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\",\n    \"intent\": \"CYBERSOURCE\",\n    \"user\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n    \"mode\": \"subscription\",\n    \"entry_mode\": \"mit\",\n    \"currency\": \"PKR\",\n    \"amount\": 1244\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_88f7e3e8-1673-4ab9-9818-e169d38ca0c0\",\n            \"client\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\",\n            \"environment\": \"local\",\n            \"state\": \"TRACKER_STARTED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"subscription\",\n            \"entry_mode\": \"mit\",\n            \"customer\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true,\n            \"PAYFAST\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"0be47b05-2cb6-4608-9764-6a37ab450081"},{"name":"Instrument","id":"73d24fdb-8cf5-4af9-aa89-f2a6ff327cf2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"user\": \"cus_00e2092d-b54e-4d5f-8dbb-cdb96ed0eccc\",\n    \"merchant_api_key\": \"sec_067a9859-0198-4f5a-b609-be0d305f88ab\",\n    \"intent\": \"CYBERSOURCE\",\n    \"mode\": \"instrument\",\n    \"currency\": \"PKR\",\n    \"entry_mode\": \"raw\",\n    \"is_account_verification\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/","description":"<p>Create a <code>tracker</code> with mode <code>instrument</code>. This tracker will save a payment method for future use.  </p>\n<h4 id=\"zero-amount-authorizations\">Zero amount authorizations</h4>\n<p>For cards, there is an option to save the payment method with a zero amount authorization. To achieve this, add the following to the request body:</p>\n<p><code>\"is_account_verification\": true</code></p>\n<p>Note that if this is set then there is no need to perform a reversal as is required in the standard flow.</p>\n","urlObject":{"path":["order","payments","v3",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"3acbafa5-12f9-45df-81a0-392c78a006dd","name":"201 - flex","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"instrument\",\n  \"currency\": \"PKR\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 17:35:37 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"623"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbda46d29174619-SIN"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_c6ee552a-f166-4ec2-bae1-5f38a9b45c8d\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"entry_mode\": \"flex\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"GENERATE_CAPTURE_CONTEXT\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"78bc5e1f-74f6-4dc0-a370-c2fb85892d95","name":"201 - raw","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"user\": \"cus_00e2092d-b54e-4d5f-8dbb-cdb96ed0eccc\",\n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"instrument\",\n  \"entry_mode\": \"raw\",\n  \"currency\": \"PKR\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 17:36:33 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"614"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbda5c93ca84619-SIN"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_55944ce6-f1e3-4227-9ab9-56484718dc53\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"entry_mode\": \"raw\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"82d84375-2689-409f-988c-68f86a7bc47d","name":"201 - With merchant shopper","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n  \"user\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"instrument\",\n  \"entry_mode\": \"raw\",\n  \"currency\": \"PKR\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 17:54:11 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"668"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbdbf9e7cfa401a-SIN"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_e244f1fa-4af4-4dc4-8d6f-8101b36bedf6\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"entry_mode\": \"raw\",\n            \"customer\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"e839facd-a8fa-465c-a58c-02f1b2aaf662","name":"201 - Zero amount authorization","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\", \n  \"intent\": \"CYBERSOURCE\",\n  \"user\": \"cus_00e2092d-b54e-4d5f-8dbb-cdb96ed0eccc\",\n  \"mode\": \"instrument\",\n  \"entry_mode\": \"raw\",\n  \"is_account_verification\": true,\n  \"currency\": \"PKR\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 05 Dec 2024 06:41:56 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"658"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=V9ldFt3mH9AHZNIC37r0eZ%2FHVRoRtDtrWRl%2BbqOuQuMt6jWcob%2FJ0E98iDS4nuxcVt23Sc7c11QXJWOfj5prZsWMXB0zbK9cwb7LM3adpVE26o4a88GgjS19dtfAnwb%2FoelxKW8jdCsIMxib\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ed20da7fc7f9d10-SIN"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=124159&min_rtt=123978&rtt_var=35226&sent=23&recv=22&lost=0&retrans=0&sent_bytes=4414&recv_bytes=1570&delivery_rate=34461&cwnd=253&unsent_bytes=0&cid=a721e0784bc1778a&ts=19290&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_fb614ed6-718f-414d-906b-4453b5706392\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"entry_mode\": \"raw\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_SETUP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\"\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\"\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true,\n            \"PAYFAST\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"73d24fdb-8cf5-4af9-aa89-f2a6ff327cf2"},{"name":"Unscheduled COF","id":"62bb1994-41ba-4d71-9175-d29a5001dec0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n  \"user\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"unscheduled_cof\",\n  \"currency\": \"PKR\",\n  \"amount\": 10050\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/","urlObject":{"path":["order","payments","v3",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"421be90f-1682-4cc7-8109-eeab1f8a1dbf","name":"201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n  \"user\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"unscheduled_cof\",\n  \"currency\": \"PKR\",\n  \"amount\": 10050\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 18:11:49 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"674"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbdd97659b39b96-SIN"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_da499080-3c67-4f82-8f33-c4338c8020c5\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"unscheduled_cof\",\n            \"entry_mode\": \"tms\",\n            \"customer\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true,\n            \"MPGS\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"d21e7c51-8962-4160-80a7-7c5ffe7f69e0","name":"404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"merchant_api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a2\",\n  \"user\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\", \n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"unscheduled_cof\",\n  \"currency\": \"PKR\",\n  \"amount\": 10050\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 18:11:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbdd8ad0afd9b96-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"could not find customer: sql: no rows in result set\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"62bb1994-41ba-4d71-9175-d29a5001dec0"}],"id":"7fcfa13f-bf41-4b86-80c6-5ca178d80baa","description":"<p>Create payment trackers. A <code>tracker</code> captures all events that pertain to to a single order for example attempts to pay using a particular payment method, authorization responses from issuing banks, error messages and more. Before an order can be processed, a <code>tracker</code> needs to be created with some initial configuration.</p>\n<h4 id=\"intent\">Intent</h4>\n<p>An <code>intent</code> must be provided. This denotes the payment integration which will be used to pay this <code>tracker</code>. Note that this can be changed dynamically when a customer wishes to pay using an alternative payment method. Supported values are:</p>\n<ul>\n<li><code>CYBERSOURCE</code> for card payments with Visa or Mastercard branded cards.</li>\n</ul>\n<h4 id=\"mode\">Mode</h4>\n<p>A <code>mode</code> may also specified when requesting creation of a <code>tracker</code>. The <code>mode</code> describes the purpose of the <code>tracker</code>. For now, it may take the following value:</p>\n<ul>\n<li><p><code>payment</code> for regular payments as a guest user.</p>\n</li>\n<li><p><code>instrument</code> for saving a payment method to a customer's wallet.</p>\n</li>\n<li><p><code>subscription</code> for recurring payments with a saved card or Network Token.</p>\n</li>\n<li><p><code>unscheduled_cof</code> for making a merchant initiated payment using a merchant shopper's saved card.</p>\n</li>\n<li><p><code>unscheduled_raw</code> for non-cvv and non-3Ds payments and raw card details.</p>\n</li>\n</ul>\n<blockquote>\n<p>Note that the legacy <code>payment-raw</code> mode has now been deprecated and can be triggered using the <code>raw</code> entry mode instead </p>\n</blockquote>\n<blockquote>\n<p>Note that unscheduled_cof applies to trackers where a customer object has been attached. </p>\n</blockquote>\n<p>Support for other modes will be available in the future. If no mode is specified, then by default the mode is set to <code>payment</code>.</p>\n<h4 id=\"entry-mode\">Entry Mode</h4>\n<p>An <code>entry_mode</code> may also be specified to denote the way in which the customer's payment method details are collected. The options are as follows:</p>\n<ul>\n<li><p><code>flex</code> for paying via Cybersource Flex Microform transient tokens</p>\n</li>\n<li><p><code>raw</code> for paying via payment method details in plaintext</p>\n</li>\n<li><p><code>tms</code> for paying via Cybersource TMS (tokenization)</p>\n</li>\n<li><p><code>network_token</code> for payments and CITs (Customer Initiated Transaction) with Network Tokens</p>\n</li>\n<li><p><code>mit</code> for MITs (Merchant Initiated Transaction) via Cybersource TMS (tokenization)</p>\n</li>\n</ul>\n<p>Support for other entry modes will be available in the future. If no entry mode is specified, then by default the mode is set to <code>flex</code>.</p>\n<h5 id=\"request-body-schema\">Request body schema</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_api_key</code></td>\n<td>string</td>\n<td>Y (except when the <code>mode</code> is <code>subscription</code>)</td>\n<td>To identify the merchant this <code>tracker</code> is intended for.</td>\n</tr>\n<tr>\n<td><code>user</code></td>\n<td>string</td>\n<td>N</td>\n<td>The customer token. Add this to attach the customer to this tracker.</td>\n</tr>\n<tr>\n<td><code>intent</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The default payment channel for performing the transactions.</td>\n</tr>\n<tr>\n<td><code>mode</code></td>\n<td>string</td>\n<td>N</td>\n<td>The purpose of this <code>tracker</code>. One of <code>payment</code>, <code>instrument</code>, <code>subscription</code>, or <code>unscheduled_cof</code>.</td>\n</tr>\n<tr>\n<td><code>entry_mode</code></td>\n<td>string</td>\n<td>N</td>\n<td>Defines the way in which payment method details are collected from the customer. One of <code>raw</code>, <code>flex</code>, or <code>tms</code>.</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>int64</td>\n<td>Y (except when the <code>mode</code> is <code>instrument</code>)</td>\n<td>The base price amount to be charged, should be in a currency's lowest denomination.</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The base price currency. Three-letter ISO currency code, in uppercase.</td>\n</tr>\n<tr>\n<td><code>is_account_verification</code></td>\n<td>bool</td>\n<td>N</td>\n<td>Set this to <code>true</code> to save a card with a zero amount authorization. This only applies if the <code>mode</code> is set to <code>instrument</code>.</td>\n</tr>\n<tr>\n<td><code>include_fees</code></td>\n<td>bool</td>\n<td>N</td>\n<td>Set this to <code>true</code> to include the fees in the order total. Note that the tracker amount will not be updated until the <a href=\"https://apidocs.getsafepay.com/#250ed8ec-7f84-4dcf-843b-f169ad7f4538\">Order API</a> has been called to provide the payment method.</td>\n</tr>\n<tr>\n<td><code>metadata</code></td>\n<td>map</td>\n<td>N</td>\n<td>To optionally add metadata to the tracker. This may also be done later using the <a href=\"https://apidocs.getsafepay.com/#cde678e3-be61-4cb4-9cc3-ed171df0f4ad\">Add Metadata API</a>.</td>\n</tr>\n<tr>\n<td><code>settlement_fees</code></td>\n<td>int64</td>\n<td>N</td>\n<td>The amount in minor units for specifying a fixed settlement fees payout. Note that this is only for book keeping and does not affect the amount that is charged.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"7fcfa13f-bf41-4b86-80c6-5ca178d80baa"},{"name":"Order","item":[{"name":"Generate Capture Context","id":"95c3336f-131e-474d-8d24-2513eb0f52af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_7233ed61-fe50-4836-8a84-c5e17ae90f4d","description":"<p>Perform the <code>GENERATE_CAPTURE_CONTEXT</code> action. Generates a JWT token that is used to generate the card fields on the checkout form. The capture context essentially establishes a payment session.</p>\n<p>The capture context is necessary for generating the Cybersource Flex Microform. These are card fields hosted on Cybersource that are used to capture the customer's card details. The form is embedded in your checkout UI.</p>\n<p>For more details on how to generate the form, please refer to the <a href=\"https://developer.cybersource.com/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2.html\">Microform </a> guide. Specifically, you should refer to the <a href=\"https://developer.cybersource.com/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2/micro-getting-started-pay-card/micro-getting-started-pay-card-cs-setup.html\">Client Side</a> documentation. This process should help you obtain the <strong>transient token</strong> JWT from the card fields which you will require for the next action.</p>\n<p>The capture context also specifies a target origin for which it is valid. By default, this is set to Safepay Checkout. However, this may be modified by authenticating as a merchant via the Secret Key and passing the <code>origin</code> as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"payload\": {\n    \"origin\": \"https://api-example.com\"\n  }\n}\n\n</code></pre>\n<p>If targeting Safepay Checkout, this can be left as an empty body: <code>{}</code>. Note that setting a custom origin is only honoured when authenticated as a merchant. For merchant authentication, refer to the <em>API Authentication</em> section.</p>\n","urlObject":{"path":["order","payments","v3","track_7233ed61-fe50-4836-8a84-c5e17ae90f4d"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"c42490fe-1521-4534-852c-042ece63f5fd","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_8bc892ec-694c-434e-a287-47c010554b6b"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 08:54:29 GMT"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_8bc892ec-694c-434e-a287-47c010554b6b\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PROCESS_TRANSIENT_TOKEN\",\n                    \"request_id\": \"req_2aa80d38-a263-45ba-8343-266316858fad\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_2aa80d38-a263-45ba-8343-266316858fad\",\n            \"flex\": {\n                \"origin\": \"https://sandbox.api.getsafepay.com\",\n                \"capture_context_jwt\": \"eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0.eyJmbHgiOnsicGF0aCI6Ii9mbGV4L3YyL3Rva2VucyIsImRhdGEiOiI4ejBtdmltcVY3cXl5YlRZRW5qTzFCQUFFR3luS01DRzZ6WDEzT0UzeFNyeWtJQVN4a29PWlVGQVNmQnFuWjUrbUUvVDRxUkplSzBvODJXaXgxQlVBb2dxWGtGNXN2aDlDem9vcFdnNkQrY0VUbUJJYXN2cU80bXJMem9SSUpyek5xTC8iLCJvcmlnaW4iOiJodHRwczovL3Rlc3RmbGV4LmN5YmVyc291cmNlLmNvbSIsImp3ayI6eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsInVzZSI6ImVuYyIsIm4iOiJwQ1o4blZjYmNaN0dSN2Nrd29RcDNBZVFBQjJKQzE0LUgtTW9oVGlZR0tLZGF6dXJHWnBjS2p2ZkVsV1ZqTWZyanI4cXpVdGRrTGNXdTdQMm1HRTFDOVMzQmFzRkthRHlGRmhCTlZuRWlxTjl2N2JtM1VYLWxocXc2MEpJeFd5RXltaGIxWnRCT3BrMU95UXJLOFJpWUxWbndMYXR4QUxHazVtajMtaTRGSlZ3aGtBZnpqLVc2MTJITVgtTW9VUnNOZENHOE9sZTIwVEpXdldaQk0wT0RnSkkwb1dCWHpwRGpXNkxwQ0Qwc3p4TlptaktRZkg1UkI0LUhiRFhwU2FrcjFkZEIyREtVaUljOF95SDVuVGZ6ZnNqMnoyVUdyVnpMcWo4TG5aVE5aWEZQYlh1UU5YOXZ2enF1MUVzcl9hUG9uWWVRZTdhUklHazBiNllsRnIzSVEiLCJraWQiOiIwN2FrVjJqOE9Jc2F4TWZ3RlFWTjJRQXJYN2JVdnl2SCJ9fSwiY3R4IjpbeyJkYXRhIjp7InRhcmdldE9yaWdpbnMiOlsiaHR0cDovL2xvY2FsaG9zdDozMDAxIl0sIm1mT3JpZ2luIjoiaHR0cHM6Ly90ZXN0ZmxleC5jeWJlcnNvdXJjZS5jb20ifSwidHlwZSI6Im1mLTAuMTEuMCJ9XSwiaXNzIjoiRmxleCBBUEkiLCJleHAiOjE2OTY1ODMzODEsImlhdCI6MTY5NjU4MjQ4MSwianRpIjoiVW42cXFscjBSYW1BVHE1MyJ9.G7va82_vgNSDaHWjpjez8s07lZa9Fj8Ilon9c7kzaiKLSeyt5EdxZoVhU5w0UgerQuy1pMP4YYQENEXzaScIHQAZI5o597jtn77_JkGs0W9BgSoyTjhMn8CiibMPg6fZva3NWyziUBkHpj33ulxtKp0oDz6hoy9DH1E8TVvtlI2wSCj8HvBsBP6envtKta_na66CQgv14FTkEpFx0lGrmOf84CjnZ2NW2f_kdXEmmZmyVVbYbQsRptX8Pi-IkdW4Ws30IFQvdeMgBH0znc_zR8Xl8VxHxrgOoHSAffHj0ejLnzzCWswhdIRA3l-e9dpBOAP2v6ednPG0BQnaBk2stA\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"a2be3e34-d6f4-4429-888b-5480f6bdeb24","name":"200 - Custom","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"origin\": \"https://api-example.com\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_d663e3f2-c6c5-47a1-8ded-a6dfc7b7dbd1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 08:53:27 GMT"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_d663e3f2-c6c5-47a1-8ded-a6dfc7b7dbd1\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PROCESS_TRANSIENT_TOKEN\",\n                    \"request_id\": \"req_62629b03-a8ef-495d-a8c0-72903ff475ec\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_62629b03-a8ef-495d-a8c0-72903ff475ec\",\n            \"flex\": {\n                \"origin\": \"https://api-example.com\",\n                \"capture_context_jwt\": \"eyJraWQiOiJ6dSIsImFsZyI6IlJTMjU2In0.eyJmbHgiOnsicGF0aCI6Ii9mbGV4L3YyL3Rva2VucyIsImRhdGEiOiJrYkZyNk9wVU0rd1NJeGNoQ0ZVVFF4QUFFT0FmcXNBbisyRmE0TWtoZGZuVEcwZW9ZZnFxOVZJVXYvMXhVcE5kdUF4Tm1yd3dMeGYxdnE1VkdFR2FQTnFpWVNuZ3owOE5URldGYTc2S2haYWRqVVRNdWp6c2VOdm9SSFJ6WS8yTktGNmUiLCJvcmlnaW4iOiJodHRwczovL3Rlc3RmbGV4LmN5YmVyc291cmNlLmNvbSIsImp3ayI6eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsInVzZSI6ImVuYyIsIm4iOiJnVDJHSTd2bFJSeVJ1elpibHBlV2hQQ0pzNi1oNnBsNFhtSU44am54SHpHbmtLSkVWQXo0NXpHcGZFMXVfaXhXbzRseFh5d3ppZGw4U0luS3E1ck5JdThxbkZBNzBaTXdvUFJUdkhhZlZ6RmhZNW42cGlvRnZ0M05WUVFzUEo3V0NNZXBBVl94c0ZEREtvNzdoZ0hISEdFZ3pETXNKRnF0RW5ZaTFUcFBDRzZhdnVscElxN3d3bUc0X1RVTzVyYU5Wdm9KdHBleUxvd1I1NjZqY2Job25LaHZnUl83VU55OWh2NTlicVh1ejlfQ3ZOVDRtZklUdF9rVTlCbkVqWTY1RlEtNmVwZEpmMVJsV0kwQ19HY2NNSHpZU0ZobUdaQ1RmdWhvbzdMTE43Tk4tclRqN3hIUmllU19ybUNRX002N2ZWSjRjX2Y1T0t0aldUQVhyRXotSHciLCJraWQiOiIwN2x4Z0RweHdRODFQVE5iSmFtQm5DN3VqcFFmb0t3MSJ9fSwiY3R4IjpbeyJkYXRhIjp7InRhcmdldE9yaWdpbnMiOlsiaHR0cHM6Ly9hcGktZXhhbXBsZS5jb20iXSwibWZPcmlnaW4iOiJodHRwczovL3Rlc3RmbGV4LmN5YmVyc291cmNlLmNvbSJ9LCJ0eXBlIjoibWYtMC4xMS4wIn1dLCJpc3MiOiJGbGV4IEFQSSIsImV4cCI6MTY5NjU4MzMxNywiaWF0IjoxNjk2NTgyNDE3LCJqdGkiOiJnNGFUVDBFVW45RUFlamZ6In0.YeX8huXHlj28HMNYG9bjvKQmc5i85JNUy65MEf5sFl0rHznDoXTXMNVI_CBctqHFMbv0fk0nQfaKOTW7D1ZQPUiCOwg66BSt5QMaOaDrJoSYbsv1QE1hTeoHEBkrqVnE-0Z3wk3zXhkSOH7e29Mh-fm5WI_RXsqnVv_gyzL0O6H1k-dqBQ9JBIFeuS3LLZ4_Q86IMwG1CEVVByZ-z7MelpJgmg15JINF8uFr5IUwWBE8qsK8FMC7dN9YPNhMpYPBcFUhbl_ARV3UTqQBzZQEMumELqP1BHHtalZAjiYQOomaurlAaIYTiMSpOJnxBFbjUnHWfVOILhNXVt7S-czt4w\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"d516b90c-167b-4f8b-9472-008e91adeebc","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_99e23690-ab8b-4790-bb86-364303dc1cae"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 09:09:09 GMT"},{"key":"Content-Length","value":"78"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"malformed request: EOF\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"13c7a835-70dd-4666-84a3-5be61df3e760","name":"403","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"origin\": \"://htt-mal,formed-url.co.m\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_99e23690-ab8b-4790-bb86-364303dc1cae"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 08:58:58 GMT"},{"key":"Content-Length","value":"137"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"error performing action 'GENERATE_CAPTURE_CONTEXT': origin: must be a valid URL. \"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"95c3336f-131e-474d-8d24-2513eb0f52af"},{"name":"Process Transient Token","id":"d6437213-eb8b-4692-9490-53ce3e638811","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"flex\": {\n        \"transient_token_jwt\": \"eyJraWQiOiIwOGlUMXJQYkFCMGliTXdBYzduMmVLd3lwZFVsWWszZiIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7ImV4cGlyYXRpb25ZZWFyIjoiMjAyMyIsIm51bWJlciI6IjUyMDAwMFhYWFhYWDEwOTYiLCJleHBpcmF0aW9uTW9udGgiOiIxMiIsInR5cGUiOiIwMDIifSwiaXNzIjoiRmxleC8wOCIsImV4cCI6MTY5NjYxODI1MCwidHlwZSI6Im1mLTAuMTEuMCIsImlhdCI6MTY5NjYxNzM1MCwianRpIjoiMUU1NlhTNEY1S0VCUVE4TTZIOE0wTlc1SVI4QjdKS0VZTjdPVVU5NTc5TVIwVFk1U1FLRTY1MjA1NzBBQUIxMyIsImNvbnRlbnQiOnsicGF5bWVudEluZm9ybWF0aW9uIjp7ImNhcmQiOnsiZXhwaXJhdGlvblllYXIiOnsidmFsdWUiOiIyMDIzIn0sIm51bWJlciI6eyJtYXNrZWRWYWx1ZSI6IlhYWFhYWFhYWFhYWDEwOTYiLCJiaW4iOiI1MjAwMDAifSwic2VjdXJpdHlDb2RlIjp7fSwiZXhwaXJhdGlvbk1vbnRoIjp7InZhbHVlIjoiMTIifSwidHlwZSI6eyJ2YWx1ZSI6IjAwMiJ9fX19fQ.UXynZWMX-269Okkq6me3sCkqorfSJEA_U634-GaDRfZUhQCJ-c7RZIW6pzB-Du1v1-MaRwAN8K_HZnDrjnmwsUw3bQGpqCSYRnwPU9oNURkoWiTm5bZu1PtRuGgid3UvZ77C7fPV_8NHqxLv9WRx6W_QYYk0J9xKulql6PVFDS0Mmpew0tkQfKlGda8u995seV24OPJa7UOp0oWzaJYMmrEP9HoGwQJo2EKYpIko_9eqaKxFQDJ9VOG64IdfIR0NxpCiKGL9Yyf9V5RRZclM0BFu8CvFTmpGW4890haE0yINapgg7mfjUMDewk803zacnNuRLTueMvy2l4DE8NGxag\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dccdef16-008e-4fae-81cc-1b7d81bf6c44","description":"<p>Perform the <code>PROCESS_TRANSIENT_TOKEN</code> action. This decodes and processes the provided transient token JWT to setup payer authentication.</p>\n<p>The transient token can be obtained once the customer has entered their card details (PAN, expiry and CVV/CVN). Please refer to the Cybersource <a href=\"https://developer.cybersource.com/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2.html\">Microform</a> documentation for details.</p>\n<p>The response for this action yields the card details along with the <code>payer_authentication_setup</code> object which carries the <code>access_token</code> and the <code>device_data_collection_url</code>. These are necessary for collecting the user's device data and passing the resulting fingerprint in the enrollment step.</p>\n","urlObject":{"path":["order","payments","v3","track_dccdef16-008e-4fae-81cc-1b7d81bf6c44"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"0ed16520-49ab-4930-bfa6-4d0f6d39210b","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"flex\": {\n        \"transient_token_jwt\": \"eyJraWQiOiIwOGlUMXJQYkFCMGliTXdBYzduMmVLd3lwZFVsWWszZiIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7ImV4cGlyYXRpb25ZZWFyIjoiMjAyMyIsIm51bWJlciI6IjUyMDAwMFhYWFhYWDEwOTYiLCJleHBpcmF0aW9uTW9udGgiOiIxMiIsInR5cGUiOiIwMDIifSwiaXNzIjoiRmxleC8wOCIsImV4cCI6MTY5NjYxODI1MCwidHlwZSI6Im1mLTAuMTEuMCIsImlhdCI6MTY5NjYxNzM1MCwianRpIjoiMUU1NlhTNEY1S0VCUVE4TTZIOE0wTlc1SVI4QjdKS0VZTjdPVVU5NTc5TVIwVFk1U1FLRTY1MjA1NzBBQUIxMyIsImNvbnRlbnQiOnsicGF5bWVudEluZm9ybWF0aW9uIjp7ImNhcmQiOnsiZXhwaXJhdGlvblllYXIiOnsidmFsdWUiOiIyMDIzIn0sIm51bWJlciI6eyJtYXNrZWRWYWx1ZSI6IlhYWFhYWFhYWFhYWDEwOTYiLCJiaW4iOiI1MjAwMDAifSwic2VjdXJpdHlDb2RlIjp7fSwiZXhwaXJhdGlvbk1vbnRoIjp7InZhbHVlIjoiMTIifSwidHlwZSI6eyJ2YWx1ZSI6IjAwMiJ9fX19fQ.UXynZWMX-269Okkq6me3sCkqorfSJEA_U634-GaDRfZUhQCJ-c7RZIW6pzB-Du1v1-MaRwAN8K_HZnDrjnmwsUw3bQGpqCSYRnwPU9oNURkoWiTm5bZu1PtRuGgid3UvZ77C7fPV_8NHqxLv9WRx6W_QYYk0J9xKulql6PVFDS0Mmpew0tkQfKlGda8u995seV24OPJa7UOp0oWzaJYMmrEP9HoGwQJo2EKYpIko_9eqaKxFQDJ9VOG64IdfIR0NxpCiKGL9Yyf9V5RRZclM0BFu8CvFTmpGW4890haE0yINapgg7mfjUMDewk803zacnNuRLTueMvy2l4DE8NGxag\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dccdef16-008e-4fae-81cc-1b7d81bf6c44"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 18:39:04 GMT"},{"key":"Content-Length","value":"1341"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_dccdef16-008e-4fae-81cc-1b7d81bf6c44\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_ENROLLMENT\",\n                    \"request_id\": \"req_f3810877-fc7c-45ca-bc6c-f2f00e72cb1a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_f3810877-fc7c-45ca-bc6c-f2f00e72cb1a\",\n            \"payment_method\": {\n                \"token\": \"card_880b612a-ec45-4768-abd0-6b645c892e48\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2023\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            },\n            \"payer_authentication_setup\": {\n                \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhNjU3ZWQ1NS0wZTI2LTQzNzctOWM0My1lZGJmNzA0OGRmYjQiLCJpYXQiOjE2OTY2MTc1NTcsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTY5NjYyMTE1NywiT3JnVW5pdElkIjoiNjI0YmYwNjVjZDhmMTM3MzVkNzYwYzc5IiwiUmVmZXJlbmNlSWQiOiIyZjY2ZWNkMy04OGY0LTQ3NTQtYWE2NS0zYjgyYTE4YzQ1MDYifQ.pN2SGCuTmmwKQTSNR3xpxQtxgYjQse7IjSmvqGNuDyU\",\n                \"device_data_collection_url\": \"https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"7ba7bfac-0b45-49c3-8fa8-e83eb323be95","name":"403","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"flex\": {\n        \"transient_token_jwt\": \"eyJraWQiOiIwN2NLSVB1clpMSDcxZ1YxVGNoUEJxZG1JQ2ZMczNuaSIsImFsZyI6IlJTMjU2In0.eyJkYXRhIjp7ImV4cGlyYXRpb25ZZWFyIjoiMjAyNCIsIm51bWJlciI6IjUyMDAwMFhYWFhYWDEwOTYiLCJleHBpcmF0aW9uTW9udGgiOiIxMiIsInR5cGUiOiIwMDIifSwiaXNzIjoiRmxleC8wNyIsImV4cCI6MTcyMjI1NDM1MiwidHlwZSI6Im1mLTAuMTEuMCIsImlhdCI6MTcyMjI1MzQ1MiwianRpIjoiMUMxSTJKMlo4RlpENTIwWDNNME9VSTZNWDlLTEoxNkcxS0dZTEpBSERCNFJOTVc3Mjc3TzY2QTc4NDEwQzIzNCIsImNvbnRlbnQiOnsicGF5bWVudEluZm9ybWF0aW9uIjp7ImNhcmQiOnsiZXhwaXJhdGlvblllYXIiOnsidmFsdWUiOiIyMDI0In0sIm51bWJlciI6eyJtYXNrZWRWYWx1ZSI6IlhYWFhYWFhYWFhYWDEwOTYiLCJiaW4iOiI1MjAwMDAifSwic2VjdXJpdHlDb2RlIjp7fSwiZXhwaXJhdGlvbk1vbnRoIjp7InZhbHVlIjoiMTIifSwidHlwZSI6eyJ2YWx1ZSI6IjAwMiJ9fX19fQ.ElKHfyixw9Eu7DYv6MtJvkIFBbdQ-L3_zlzBortJvMGl33ijaJk9qUpypuYLZycSsG-ltfzOnXOkJU_eaQEG9pqzpJ7banOL-UIVB_-6DUV_aY5tXN1k_EAEzdhRgMgBizA39Wqgdu-m9pygDnCC05MWr85qDUXVl6nyV9BVjTZdhRP38CvhWgy_bAMXgdS2jD1x6QyoWbK11lMJegDwA0b2RYi2IIdq7McM2RbLsV2qAyFc0sbB8JSO0Hr4mJVzBGVSdc3GjuqSX9Ev_ap_NVXFxo_v1_BbEWfyClX07JboJJp9iAB23rhpqqEb9FJh0UejuhFytYLHke4J4Gj50Q\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1c8f1e48-76ca-4418-afd6-44212d38e761"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 29 Jul 2024 11:45:30 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8aacdcf5393ad1cc-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"error performing action 'PROCESS_TRANSIENT_TOKEN': the given key ID was not found in the JWKS \"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"d6437213-eb8b-4692-9490-53ce3e638811"},{"name":"Payer Authentication Setup","id":"43a20d43-75ea-4868-a912-dfd6c0a636dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"payload\": {\n        \"payment_method\": {\n            \"card\": {\n                \"card_number\": \"5200000000001096\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"cvv\": \"123\"\n            }\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_a6f9b00c-8a25-4cbf-95f9-cd6bc440eca6","description":"<p>Perform the <code>PAYER_AUTHENTICATION_SETUP</code> action. This action is the starting point for a tracker that has <code>raw</code> or <code>tms</code> entry modes. It is the entry point for a payment flow where we setup the 3DS enrollment journey for the customer.</p>\n<p>Explore the example payloads to see how to pass the payment method details for <code>raw</code> and <code>tms</code> entry modes. For <code>flex</code> you may pass an empty body <code>{}</code>.</p>\n<p>The response for this action yields the card details along with the <code>payer_authentication_setup</code> object which carries the <code>access_token</code> and the <code>device_data_collection_url</code>. These are necessary for collecting the user's device data and passing the resulting fingerprint in the enrollment step.</p>\n","urlObject":{"path":["order","payments","v3","track_a6f9b00c-8a25-4cbf-95f9-cd6bc440eca6"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"531844b9-695b-412f-ae36-d38c04f4ceed","name":"200 - raw","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"card\": {\n        \"card_number\": \"5200000000001096\",\n        \"expiration_month\": \"12\",\n        \"expiration_year\": \"2028\",\n        \"cvv\": \"123\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_fabda958-1f90-4ba5-8963-295708a2c7b0"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 08 Feb 2024 08:49:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"85229f39aa07d1e4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_fabda958-1f90-4ba5-8963-295708a2c7b0\",\n            \"client\": \"sec_98a7ebf8-87da-4587-8d72-634a592c3111\",\n            \"environment\": \"development\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment-raw\",\n            \"customer\": \"guest_0eba3a92-3069-4839-898c-8a3f8f636108\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_ENROLLMENT\",\n                    \"request_id\": \"req_db4e9c41-4c02-46fc-a92f-959f67664ab7\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_db4e9c41-4c02-46fc-a92f-959f67664ab7\",\n            \"payment_method\": {\n                \"token\": \"card_139ff474-6024-4bd5-ad52-3bab42870ae3\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            },\n            \"payer_authentication_setup\": {\n                \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmY2JkOWY5Zi0zOTM0LTQ5MTctOWNjMS0wYmQ3MDY0ZThmZTkiLCJpYXQiOjE3MDczODIxOTQsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTcwNzM4NTc5NCwiT3JnVW5pdElkIjoiNjI0YmYwNjVjZDhmMTM3MzVkNzYwYzc5IiwiUmVmZXJlbmNlSWQiOiJkNjhkYjQyNC0wYmE4LTQ3ODctODg0Mi0xNDIzYTUyOTI0YzEifQ.nYJEEiEkYiT-iDGfOisdLsTg_O3nWzD-t9QSb_OS0YE\",\n                \"device_data_collection_url\": \"https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"cf9599c2-8c5a-4915-adda-1577ba529e3e","name":"200 - tms","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"tokenized_card\": {\n        \"token\": \"pm_ad4b0519-c700-4c7f-8ed1-e0f06944bcab\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_61414d0f-7740-4297-903a-3aca4b04bca8"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 12:10:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab53e4dda6fd1e8-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_61414d0f-7740-4297-903a-3aca4b04bca8\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"tms\",\n            \"customer\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_ENROLLMENT\",\n                    \"request_id\": \"req_ac4307d3-be62-4ea7-ab5f-e950125940df\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_ac4307d3-be62-4ea7-ab5f-e950125940df\",\n            \"payment_method\": {\n                \"token\": \"card_f116867e-955a-4d03-802d-1f4d06fe1921\",\n                \"pointer\": \"inst_ad4b0519-c700-4c7f-8ed1-e0f06944bcab\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2025\",\n                \"card_type_code\": \"001\",\n                \"card_type\": \"Visa\",\n                \"bin_number\": \"411111\",\n                \"last_four\": \"1111\"\n            },\n            \"payer_authentication_setup\": {\n                \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNjc0MjE5Yy0zMTdhLTQzOTYtOTBmMC02MzZlMGI2NTFhMTkiLCJpYXQiOjE3MjIzNDE0MDQsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTcyMjM0NTAwNCwiT3JnVW5pdElkIjoiNjI0YmYwNjVjZDhmMTM3MzVkNzYwYzc5IiwiUmVmZXJlbmNlSWQiOiJlYzZlN2I1Zi00MzViLTQyOGEtOWQ5Ni1mNmI2NjNmNWQ1YjQifQ.q7KFjFdElxZqejuI5PkyrENTyw_8WIIgfl1semzQYHs\",\n                \"device_data_collection_url\": \"https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"e2abb808-9c99-41f2-9721-69c9881caffe","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"payment_method\": {\n      \"card\": {\n        \"card_number\": \"5200000000001096\",\n        \"expiration_month\": \"12\",\n        \"expiration_year\": \"2028\",\n        \"cvv\": \"123\"\n      }\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_fabda958-1f90-4ba5-8963-295708a2c7b0"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 08 Feb 2024 08:49:33 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"371"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"85229eb3887ad1e4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: token is expired, strategies/jwt: token is expired, strategies/api_key: merchant api key not found in the request header, strategies/secret: merchant webhook secret not found in the request header, strategies/tbt: decode error: illegal base64 data at input byte 36]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"43a20d43-75ea-4868-a912-dfd6c0a636dd"},{"name":"Enrollment","id":"98dbaee4-2946-4621-ba8f-06f182e6cb85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    },\n    \"authentication_setup\": {\n      \"success_url\": \"https://dev.api.getsafepay.com/drops/threeds/success\",\n      \"failure_url\": \"https://dev.api.getsafepay.com/drops/threeds/failure\",\n      \"device_fingerprint_session_id\": \"d7a63ecf-d635-4641-9533-2ad5a727611f\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_f3adbae6-6402-47fe-948b-ee82244ac372","description":"<p>Perform the <code>PAYER_AUTH_ENROLLMENT</code> action. This marks the start of the payer authentication process. For details please refer to the Cybersource <a href=\"https://developer.cybersource.com/docs/cybs/en-us/payer-authentication/developer/all/so/payer-auth/pa-about-guide.html\">Payer Authentication</a> documentation.</p>\n<p>As the documentation states, there are 5 steps for the complete process. Note that Steps 1, 3, and 5 are to be performed server side and are handled by the Safepay API. You will need to perform <a href=\"https://developer.cybersource.com/docs/cybs/en-us/payer-authentication/developer/all/so/payer-auth/pa2-ccdc-ddc-intro.html\">Step 2: Device Data Collection</a> before calling this action. And you will need to perform <a href=\"https://developer.cybersource.com/docs/cybs/en-us/payer-authentication/developer/all/so/payer-auth/pa2-ccdc-stepup-frame-intro.html\">Step 4: Step-Up Iframe</a> after receiving the response for this action.</p>\n<p>To succeed enrollment and trigger liability shift you must pass the <code>device_fingerprint_session_id</code> which you will obtain after performing <a href=\"https://developer.cybersource.com/docs/cybs/en-us/payer-authentication/developer/all/so/payer-auth/pa2-ccdc-ddc-intro.html\">Step 2: Device Data Collection</a>.</p>\n<p>You must provide the customer's billing details under <code>payload.billing</code>:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>street_1</code></td>\n<td>string</td>\n<td>Y</td>\n<td>Primary street address.</td>\n</tr>\n<tr>\n<td><code>street_2</code></td>\n<td>string</td>\n<td>N</td>\n<td>Secondary street address (optional).</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>Y</td>\n<td>Locality.</td>\n</tr>\n<tr>\n<td><code>state</code></td>\n<td>string</td>\n<td>Y</td>\n<td>Province or state. Use 2-letter state code for USA and Canada.</td>\n</tr>\n<tr>\n<td><code>postal_code</code></td>\n<td>string</td>\n<td>N</td>\n<td>The local postal code.</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string</td>\n<td>Y</td>\n<td>ISO 3166-1 Alpha-2 country code.</td>\n</tr>\n</tbody>\n</table>\n</div><p>If you do not have this information, you may instruct the API to generate synthetic data by making use of the <code>use_synthetic</code> field as shown below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"payload\": {\n  ...\n  \"billing\": {\n    \"use_synthetic\": true\n  }\n  ...\n}\n\n</code></pre>\n<p>You must also provide authorization configuration under <code>payload.authorization</code>. Additional configuration options will be made available in the future. We recommend this default:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>do_capture</code></td>\n<td>boolean</td>\n<td>Y</td>\n<td>If <code>true</code>, this will combine capture in the same request.</td>\n</tr>\n<tr>\n<td><code>do_card_on_file</code></td>\n<td>boolean</td>\n<td>N</td>\n<td>If <code>true</code>, this will save the card. This only applies when the request is authenticated by a Safepay or Merchant shopper.</td>\n</tr>\n</tbody>\n</table>\n</div><p>You must also provide payer authentication configuration under <code>payload.authentication_setup</code>:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>success_url</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The url to which successful enrollment will redirect to.</td>\n</tr>\n<tr>\n<td><code>failure_url</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The url to which enrollment will redirect to in the event of errors.</td>\n</tr>\n<tr>\n<td><code>device_fingerprint_session_id</code></td>\n<td>string</td>\n<td>N</td>\n<td>Obtained from device data collection.</td>\n</tr>\n</tbody>\n</table>\n</div><p>You must also authenticate using JWT that represents the guest user. Refer to the documentation for <em>API Authentication</em>.</p>\n<p>Note that while <code>device_fingerprint_session_id</code> is optional, not passing it will default to 3DS v1 on Cybersource's end which they have dropped support for. Therefore to ensure successful enrollment and liability shift, you should include this in the request.</p>\n<h4 id=\"interpreting-the-enrollment-response\">Interpreting the enrollment response</h4>\n<p>If enrollment is successful, you should obtain the appropriate ECI values and the <code>access_token</code> in the <code>payer_authentication_enrollment</code> object.</p>\n<p>The response will also yield an <code>authentication_status</code> field that may take the following values. Here is how to interpret these:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>authentication_status</code></strong> <strong>Value</strong></th>\n<th>Recommended action</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>REQUIRED</code></td>\n<td>Proceed with the 3DS challenge using the <code>access_token</code> and the <code>step_up_url</code></td>\n</tr>\n<tr>\n<td><code>FRICTIONLESS</code></td>\n<td>Skip step-up and proceed to authorization</td>\n</tr>\n<tr>\n<td><code>ATTEMPTED</code></td>\n<td>Skip step-up and proceed to authorization</td>\n</tr>\n<tr>\n<td><code>UNAVAILABLE</code></td>\n<td>Do not proceed</td>\n</tr>\n<tr>\n<td><code>FAILED</code></td>\n<td>Do not proceed</td>\n</tr>\n<tr>\n<td><code>REJECTED</code></td>\n<td>Do not proceed</td>\n</tr>\n<tr>\n<td><code>NOT_ELIGIBLE</code></td>\n<td>Do not proceed</td>\n</tr>\n</tbody>\n</table>\n</div><p>The values for <code>eci</code> or <code>eci_raw</code> denote whether enrollment was successful:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>eci</code></strong> <strong>Value</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>01</code></td>\n<td>Authentication attempted (Mastercard)</td>\n</tr>\n<tr>\n<td><code>02</code></td>\n<td>Successful authentication (Mastercard)</td>\n</tr>\n<tr>\n<td><code>05</code></td>\n<td>Successful authentication (Visa, American Express, JCB, Diners Club, and Discover)</td>\n</tr>\n<tr>\n<td><code>06</code></td>\n<td>Authentication attempted (Visa, American Express, JCB, Diners Club, and Discover)</td>\n</tr>\n<tr>\n<td><code>07</code></td>\n<td>The card cannot be enrolled. No liability shift.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Rendering the issuer step-up challenge is documented in <a href=\"https://developer.cybersource.com/docs/cybs/en-us/payer-authentication/developer/all/so/payer-auth/pa2-ccdc-stepup-frame-intro.html\">Step 4: Step-Up Iframe</a>.</p>\n<p>The user will go through the 3DS flow by entering the OTP code received on their phone (or alternative methods proposed by the issuer). On a successful response, the user will be redirected to Safepay and then ultimately to the <code>success_url</code> that you have provided. Similarly, failures will redirect to the <code>failure_url</code>.</p>\n<p>Returning to the <code>success_url</code> yields a successful authorization. Note that for the frictionless flow you may proceed to authorization.</p>\n","urlObject":{"path":["order","payments","v3","track_f3adbae6-6402-47fe-948b-ee82244ac372"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"d59bb8d3-09e5-4115-97f7-37297405634d","name":"200 - Step-up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"use_action_chaining\": false,    \n  \"payload\": {\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    },\n    \"authentication_setup\": {\n      \"success_url\": \"http://localhost:3001/external/success?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"failure_url\": \"http://localhost:3001/external/failure?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"device_fingerprint_session_id\": \"daf7d3a7-3a06-417b-af7b-c62d8d57493b\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_b65ba6ae-2b11-4606-920b-24d70a2de5c2"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 04 Nov 2024 04:58:34 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dd207948d748337-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_b65ba6ae-2b11-4606-920b-24d70a2de5c2\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENROLLED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"raw\",\n            \"customer\": \"guest_ed01c60e-e3da-4426-b211-a3e57dd1056f\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_VALIDATION\",\n                    \"request_id\": \"req_5df341f9-bad5-423e-806a-350c8fe4d85e\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"CREATE_SESSION\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_5df341f9-bad5-423e-806a-350c8fe4d85e\",\n            \"payment_method\": {\n                \"token\": \"card_5acccafc-3597-4a75-89d4-14803d52ea12\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            },\n            \"payer_authentication_enrollment\": {\n                \"rid\": \"7306963143896843404951\",\n                \"enrollment_status\": \"PENDING_AUTHENTICATION\",\n                \"veres_enrolled\": \"Y\",\n                \"veres_enrolled_description\": \"Card enrolled; you must authenticate. Liability shift.\",\n                \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJjNDk0NmMxMS1mZmNiLTQzZTYtOTUwNS03ZGFmNDk1ZjBiMmUiLCJpYXQiOjE3MzA2OTYzMTQsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTczMDY5OTkxNCwiT3JnVW5pdElkIjoiNjI0YmYwNjVjZDhmMTM3MzVkNzYwYzc5IiwiUGF5bG9hZCI6eyJBQ1NVcmwiOiJodHRwczovLzBtZXJjaGFudGFjc3N0YWcuY2FyZGluYWxjb21tZXJjZS5jb20vTWVyY2hhbnRBQ1NXZWIvY3JlcS5qc3AiLCJQYXlsb2FkIjoiZXlKdFpYTnpZV2RsVkhsd1pTSTZJa05TWlhFaUxDSnRaWE56WVdkbFZtVnljMmx2YmlJNklqSXVNUzR3SWl3aWRHaHlaV1ZFVTFObGNuWmxjbFJ5WVc1elNVUWlPaUpoT1RVM1pETTBZUzA0TkRBMUxUUmlPRFl0WWpBNVpTMWlNVE01TW1NMVlUaGtNamtpTENKaFkzTlVjbUZ1YzBsRUlqb2lPVGhsTVRBeVpXRXRZekk1WVMwME1qZ3pMV0UxTXpBdFpHRXdNVFE0WWpnMVpUWTVJaXdpWTJoaGJHeGxibWRsVjJsdVpHOTNVMmw2WlNJNklqQXlJbjAiLCJUcmFuc2FjdGlvbklkIjoiUzI1SUttRDlpVVZlNGprcVAxZTAifSwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUmV0dXJuVXJsIjoiaHR0cHM6Ly9zYW5kYm94LmFwaS5nZXRzYWZlcGF5LmNvbS9vcmRlci9wYXltZW50cy92My90cmFja19iNjViYTZhZS0yYjExLTQ2MDYtOTIwYi0yNGQ3MGEyZGU1YzIvdGhyZWUtZC1zZWN1cmU_dG9rZW49cmVxXzVkZjM0MWY5LWJhZDUtNDIzZS04MDZhLTM1MGM4ZmU0ZDg1ZSZ1c2VyPWd1ZXN0X2VkMDFjNjBlLWUzZGEtNDQyNi1iMjExLWEzZTU3ZGQxMDU2ZiZkb19jYXB0dXJlPWZhbHNlJmRvX2NhcmRfb25fZmlsZT1mYWxzZSZ1c2Vfb25jZT1mYWxzZSZpbnN0cnVtZW50X3Rva2VuPSJ9.fuEepCd0g8Rvy_sUGZVjd48mjcmeHF-hqqRGJZ3jMQI\",\n                \"step_up_url\": \"https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp\",\n                \"challenge_window_size\": \"02\",\n                \"challenge_window_size_description\": \"390 x 400\",\n                \"specification_version\": \"2.1.0\",\n                \"authentication_status\": \"REQUIRED\",\n                \"authentication_transaction_id\": \"S25IKmD9iUVe4jkqP1e0\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"9892b6d6-810a-4a31-8514-632b76ab5d7e","name":"200 - Frictionless","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"use_action_chaining\": false,\n  \"payload\": {\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    },\n    \"authentication_setup\": {\n      \"success_url\": \"http://localhost:3001/external/success?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"failure_url\": \"http://localhost:3001/external/failure?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"device_fingerprint_session_id\": \"33db9629-af39-4a5c-a59c-cf27d90440d7\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_61b8a5c7-7186-47df-86a0-07372e7237e5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 04 Nov 2024 05:00:37 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dd20a98aaa98337-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_61b8a5c7-7186-47df-86a0-07372e7237e5\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENROLLED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"raw\",\n            \"customer\": \"guest_ed01c60e-e3da-4426-b211-a3e57dd1056f\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\",\n                    \"request_id\": \"req_3328a23b-9d1c-437b-a501-42a0085af83b\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"CREATE_SESSION\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_3328a23b-9d1c-437b-a501-42a0085af83b\",\n            \"payment_method\": {\n                \"token\": \"card_d8b672e0-9eb9-43dd-8236-79429a243fe7\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"001\",\n                \"card_type\": \"Visa\",\n                \"bin_number\": \"411111\",\n                \"last_four\": \"1111\"\n            },\n            \"payer_authentication_enrollment\": {\n                \"rid\": \"7306964371626759204953\",\n                \"enrollment_status\": \"AUTHENTICATION_SUCCESSFUL\",\n                \"veres_enrolled\": \"Y\",\n                \"veres_enrolled_description\": \"Card enrolled; you must authenticate. Liability shift.\",\n                \"specification_version\": \"2.2.0\",\n                \"pares_status\": \"Y\",\n                \"pares_description\": \"Customer was successfully authenticated.\",\n                \"authentication_status\": \"FRICTIONLESS\",\n                \"authentication_transaction_id\": \"GoS0LMBV02OiV4wa1gp0\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"c27acb24-13ee-4b37-af4a-f7a05ec35270","name":"200 - Not-Eligible","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    },\n    \"authentication_setup\": {\n      \"success_url\": \"http://localhost:3001/external/success?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"failure_url\": \"http://localhost:3001/external/failure?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"device_fingerprint_session_id\": \"daf7d3a7-3a06-417b-af7b-c62d8d57493b\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_4b9ad561-4fb8-4cdc-b8ce-1e494c1da841"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 04 Nov 2024 04:59:30 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dd208f3686a8337-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_4b9ad561-4fb8-4cdc-b8ce-1e494c1da841\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENROLLED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"entry_mode\": \"raw\",\n            \"customer\": \"guest_ed01c60e-e3da-4426-b211-a3e57dd1056f\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"AUTHORIZATION\",\n                    \"request_id\": \"req_fc0621ed-4bcb-4790-be4e-c4cbc5515c64\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"CREATE_SESSION\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_fc0621ed-4bcb-4790-be4e-c4cbc5515c64\",\n            \"payment_method\": {\n                \"token\": \"card_7d37d7cc-59f2-4ccb-8c45-077373a139af\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"001\",\n                \"card_type\": \"Visa\",\n                \"bin_number\": \"411111\",\n                \"last_four\": \"1111\"\n            },\n            \"payer_authentication_enrollment\": {\n                \"rid\": \"7306963697066743704953\",\n                \"enrollment_status\": \"AUTHENTICATION_SUCCESSFUL\",\n                \"veres_enrolled\": \"U\",\n                \"veres_enrolled_description\": \"Unable to authenticate regardless of the reason. No liability shift.\",\n                \"specification_version\": \"2.1.0\",\n                \"authentication_status\": \"NOT_ELIGIBLE\",\n                \"authentication_transaction_id\": \"1eIu5Pi7fIVvDsHnL8b0\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"bbcb8667-7b6e-46ce-bd9d-90688550d23c","name":"200 - Instrument with merchant shopper","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"customer\": {\n      \"first_name\": \"Hassan\",\n      \"last_name\": \"Zaidi\",\n      \"email\": \"hzaidi@getsafepay.com\",\n      \"phone_number\": \"+923001234567\"\n    },\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    },\n    \"authentication_setup\": {\n      \"success_url\": \"http://localhost:3001/external/success?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"failure_url\": \"http://localhost:3001/external/failure?env=local&beacon=track_1a46dc70-91f9-4892-8e25-0bb5205b69c7&xcomponent=1\",\n      \"device_fingerprint_session_id\": \"15e8bd6b-0774-4baa-bc46-da7ff04a7438\"\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_e244f1fa-4af4-4dc4-8d6f-8101b36bedf6"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 18:03:48 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbdcdafbae85f8a-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_e244f1fa-4af4-4dc4-8d6f-8101b36bedf6\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENROLLED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"entry_mode\": \"raw\",\n            \"customer\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PAYER_AUTH_VALIDATION\",\n                    \"request_id\": \"req_aef265a1-ecde-4866-8061-ec8e64864551\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 500\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_aef265a1-ecde-4866-8061-ec8e64864551\",\n            \"payment_method\": {\n                \"token\": \"card_45f198ab-619a-4900-9cbf-d2ac8009b890\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            },\n            \"payer_authentication_enrollment\": {\n                \"rid\": \"7304842281426671203955\",\n                \"enrollment_status\": \"PENDING_AUTHENTICATION\",\n                \"veres_enrolled\": \"Y\",\n                \"veres_enrolled_description\": \"Card enrolled; you must authenticate. Liability shift.\",\n                \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxODQwNTQyYy1mZGI0LTQ2MzQtYmU5Yi05ZGIzNWM0NjFkZTkiLCJpYXQiOjE3MzA0ODQyMjgsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTczMDQ4NzgyOCwiT3JnVW5pdElkIjoiNjI0YmYwNjVjZDhmMTM3MzVkNzYwYzc5IiwiUGF5bG9hZCI6eyJBQ1NVcmwiOiJodHRwczovLzBtZXJjaGFudGFjc3N0YWcuY2FyZGluYWxjb21tZXJjZS5jb20vTWVyY2hhbnRBQ1NXZWIvY3JlcS5qc3AiLCJQYXlsb2FkIjoiZXlKdFpYTnpZV2RsVkhsd1pTSTZJa05TWlhFaUxDSnRaWE56WVdkbFZtVnljMmx2YmlJNklqSXVNUzR3SWl3aWRHaHlaV1ZFVTFObGNuWmxjbFJ5WVc1elNVUWlPaUpqTTJZek5XSmtNUzAzWVRabUxUUTJPVEF0WW1ZME9TMWlOVEpsTkRjMk1ESmpPR1FpTENKaFkzTlVjbUZ1YzBsRUlqb2lPVFEwT0dJNE9XUXROVGxsWVMwMFlqUXpMV0U0T0dFdE9EWmlNR1V3TVRCbVlXUTVJaXdpWTJoaGJHeGxibWRsVjJsdVpHOTNVMmw2WlNJNklqQXlJbjAiLCJUcmFuc2FjdGlvbklkIjoicmh4NFdsZkZnVzQ3bjBJdEtQYzAifSwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUmV0dXJuVXJsIjoiaHR0cHM6Ly9zYW5kYm94LmFwaS5nZXRzYWZlcGF5LmNvbS9vcmRlci9wYXltZW50cy92My90cmFja19lMjQ0ZjFmYS00YWY0LTRkYzQtOGQ2Zi04MTAxYjM2YmVkZjYvdGhyZWUtZC1zZWN1cmU_dG9rZW49cmVxX2FlZjI2NWExLWVjZGUtNDg2Ni04MDYxLWVjOGU2NDg2NDU1MSZ1c2VyPWN1c19iNGFmZDYzOC00MWJmLTQ4MzEtYWYwNy01ODdiNTEyNjlmMzgmZG9fY2FwdHVyZT1mYWxzZSZkb19jYXJkX29uX2ZpbGU9dHJ1ZSZ1c2Vfb25jZT1mYWxzZSZpbnN0cnVtZW50X3Rva2VuPSJ9.WcmP94E1HmxbB1wGHIMcHhI6ZYQO4ILOmt6jG6LcbF0\",\n                \"step_up_url\": \"https://centinelapistag.cardinalcommerce.com/V2/Cruise/StepUp\",\n                \"challenge_window_size\": \"02\",\n                \"challenge_window_size_description\": \"390 x 400\",\n                \"specification_version\": \"2.1.0\",\n                \"authentication_status\": \"REQUIRED\",\n                \"authentication_transaction_id\": \"rhx4WlfFgW47n0ItKPc0\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"98dbaee4-2946-4621-ba8f-06f182e6cb85"},{"name":"Authorization","id":"6145b078-c3e7-4621-88de-373187bf6147","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {    \n    \"authorization\": {\n      \"do_capture\": false\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dccdef16-008e-4fae-81cc-1b7d81bf6c44","description":"<p>Perform the <code>AUTHORIZATION</code> action.</p>\n<p>Note that you will call Authorization when enrollment was frictionless (i.e. no challenge was applicable) or if enrollment could not be completed by the issuer.If enrollment follows up with the challenge and the customer has been redirected to your checkout, then you must proceed to Capture instead.</p>\n<p>For this action, you need to pass in the <code>authorization</code> configuration.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>do_capture</code></td>\n<td>boolean</td>\n<td>Y</td>\n<td>If <code>true</code>, this will combine capture in the same request.</td>\n</tr>\n<tr>\n<td><code>do_card_on_file</code></td>\n<td>boolean</td>\n<td>N</td>\n<td>If <code>true</code>, this will save the card. This only applies when the request is authenticated by a Safepay or Merchant shopper.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"action-chaining\">Action chaining</h4>\n<p>Actions are chained by default by the Order API where actions that do not require additional input from the client will execute in a loop. Since <code>CAPTURE</code> is one such action, it will be chained and executed even when <code>authorization.do_capture</code> is set to false.</p>\n<p>Setting <code>authorization.do_capture</code> to true essentially performs a <em><strong>sale</strong></em> as opposed to an authorization followed by capture.</p>\n<p>If you wish to perform captures manually, you may run this request by setting <code>use_action_chaining</code> to false in the request body (outside of the <code>payload</code>). This will then only perform the <code>AUTHORIZATION</code> action and allow you to perform the capture (or a reversal) at a later time.</p>\n<h4 id=\"authorizing-cits\">Authorizing CITs</h4>\n<p>When we set the <code>mode</code> to <code>payment</code> and the <code>entry_mode</code> to <code>network_token</code> in the <strong>setup</strong> api, we are initating a <strong>CIT</strong> (Customer Initiated Transaction). When we are dealing with <strong>Network Tokens</strong>, the next action after setup will be <strong>AUTHORIZATION</strong>, so we will have to send the extra information in the Authorization request which we otherwise wouldn't have needed to. This includes the <strong>Billing</strong> information, as well as the <strong>Payment Method</strong> in the form of a <strong>Network Token.</strong> As per usual the authorization settings are also required. The response will include a <strong>TMS-Token</strong> that can be used for subsequent MITs. The response contains the tms token like so: <code>action.token.payment_method.token: \"tms_ea7323a9......\".</code></p>\n<h4 id=\"authorizing-mits\">Authorizing MITs</h4>\n<p>When we set the <code>mode</code> to <code>subscription</code> and the <code>entry_mode</code> to <code>mit</code> in the <strong>setup</strong> api, we are initating a <strong>MIT</strong> (Merchant Initiated Transaction). <strong>MITs</strong> function fairly similarly to <strong>Subscriptions</strong> with <strong>TMS</strong> tokens, since in this case you are expected to pass a <strong>TMS</strong> token in the request alongside the authorization settings. However, a <strong>MIT</strong> must always have an attached <strong>CIT</strong>. As mentioned above a CIT can be initated using a Network Token, however a <code>raw</code> payment will also work, as long as the <code>do_card_on_file</code> setting was set to true and a pm_ token was returned in the response. This token can also be used for MITs.</p>\n","urlObject":{"path":["order","payments","v3","track_dccdef16-008e-4fae-81cc-1b7d81bf6c44"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"9e66d8f0-2176-4dc2-8620-a5441adeae7e","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {    \n    \"authorization\": {\n      \"do_capture\": false\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dccdef16-008e-4fae-81cc-1b7d81bf6c44"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 18:44:07 GMT"},{"key":"Content-Length","value":"824"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_dccdef16-008e-4fae-81cc-1b7d81bf6c44\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_f3810877-fc7c-45ca-bc6c-f2f00e72cb1a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_f3810877-fc7c-45ca-bc6c-f2f00e72cb1a\",\n            \"payment_method\": {\n                \"token\": \"card_880b612a-ec45-4768-abd0-6b645c892e48\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2023\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"25a87c9f-88e3-4820-9386-e36b365aacf3","name":"200 - unscheduled_cof","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {    \n    \"payment_method\": {\n      \"tokenized_card\": {\n        \"token\": \"pm_4697103f-1285-4b05-88fb-0435afb2df18\"\n      }\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_da499080-3c67-4f82-8f33-c4338c8020c5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 18:20:00 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbde565ce6d9cad-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_da499080-3c67-4f82-8f33-c4338c8020c5\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"unscheduled_cof\",\n            \"entry_mode\": \"tms\",\n            \"customer\": \"cus_b4afd638-41bf-4831-af07-587b51269f38\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {}\n        },\n        \"action\": {\n            \"token\": \"req_04c5d24c-155c-40b6-aa68-4b78df116c91\",\n            \"payment_method\": {\n                \"token\": \"tms_0b980ebc-e00f-44f4-80fa-fe635cf7510d\",\n                \"pointer\": \"pm_4697103f-1285-4b05-88fb-0435afb2df18\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"86d94fd5-cb91-4b74-96a0-53b46097822b","name":"200 - unscheduled_raw","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"payload\": {\n    \"billing\": {\n      \"street_1\": \"St 1\",\n      \"street_2\": \"\",\n      \"city\": \"Islamabad\",\n      \"state\": \"\",\n      \"postal_code\": \"44000\",\n      \"country\": \"PK\"\n    },\n    \"payment_method\": {\n      \"card\": {\n        \"card_number\": \"4111 1111 1111 1111\",\n        \"expiration_month\": \"01\",\n        \"expiration_year\": \"2030\"\n      }\n    },\n    \"authorization\": {\n      \"do_capture\": true,\n      \"do_card_on_file\": false\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_da499080-3c67-4f82-8f33-c4338c8020c5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 01 Nov 2024 18:20:00 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dbde565ce6d9cad-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"tracker\": {\n      \"token\": \"track_f8664c1d-5b2f-4389-9c1d-39059e5b8786\",\n      \"client\": \"sec_d8233453-7b13-49f5-bffa-1675dad71b92\",\n      \"environment\": \"sandbox\",\n      \"state\": \"TRACKER_ENDED\",\n      \"payment_method_kind\": \"card\",\n      \"intent\": \"CYBERSOURCE\",\n      \"mode\": \"payment\",\n      \"entry_mode\": \"unscheduled_raw\",\n      \"customer\": \"cus_fa03ab2f-a74d-4523-beb8-8dbde3ab84b5\",\n      \"next_actions\": {\n        \"CYBERSOURCE\": {\n          \"kind\": \"NOOP\",\n          \"request_id\": \"req_0e6bddc6-52ad-42dd-b8e6-e4ea28677243\"\n        },\n        \"MPGS\": {\n          \"kind\": \"NOOP\"\n        }\n      },\n      \"purchase_totals\": {\n        \"quote_amount\": {\n          \"currency\": \"PKR\",\n          \"amount\": 156050\n        },\n        \"base_amount\": {\n          \"currency\": \"PKR\",\n          \"amount\": 156050\n        },\n        \"conversion_rate\": {\n          \"base_currency\": \"PKR\",\n          \"quote_currency\": \"PKR\",\n          \"rate\": 1\n        }\n      },\n      \"metadata\": {},\n      \"authorization\": {\n        \"token\": \"auth_a6c1d431-7e32-4e7d-89af-daa709200fb9\",\n        \"tracker\": \"track_f8664c1d-5b2f-4389-9c1d-39059e5b8786\",\n        \"attempt\": \"attemp_d170a45f-4474-4175-b651-8e6b0c90eeab\",\n        \"intent\": \"CYBERSOURCE\",\n        \"cybersource_rid\": \"7495319004966649804807\",\n        \"totals\": {\n          \"currency\": \"PKR\",\n          \"amount\": 156050\n        },\n        \"created_at\": {\n          \"seconds\": 1749531902,\n          \"nanos\": 191846713\n        },\n        \"updated_at\": {\n          \"seconds\": 1749531902,\n          \"nanos\": 191846803\n        }\n      }\n    },\n    \"action\": {\n      \"token\": \"req_0e6bddc6-52ad-42dd-b8e6-e4ea28677243\",\n      \"payment_method\": {\n        \"token\": \"card_2092ffed-30e2-4cdc-b726-a24d7176619d\",\n        \"pointer\": \"pm_e6019391-45e8-4b38-929c-48e116968351\",\n        \"expiration_month\": \"01\",\n        \"expiration_year\": \"2030\",\n        \"card_type_code\": \"001\",\n        \"card_type\": \"Visa\",\n        \"bin_number\": \"411111\",\n        \"last_four\": \"1111\",\n        \"issuer\": \"CONOTOXIA SP. Z O.O\"\n      }\n    }\n  },\n  \"status\": {\n    \"errors\": [],\n    \"message\": \"success\"\n  }\n}"},{"id":"8252b105-2f1c-45cb-af1b-6dd0acee2609","name":"200 - No action chaining","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"use_action_chaining\": false,\n  \"payload\": {   \n    \"payment_method\": {\n      \"tokenized_card\": {\n        \"token\": \"pm_408aed40-7959-45ab-9da4-c7614f5065bf\"\n      }\n    },\n    \"authorization\": {\n      \"do_capture\": false\n    }\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_fe25142f-2598-43a8-aa34-962102997f91"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 04 Nov 2024 12:26:31 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8dd497b85c4e5ce5-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_fe25142f-2598-43a8-aa34-962102997f91\",\n            \"client\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_AUTHORIZED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"unscheduled_cof\",\n            \"entry_mode\": \"tms\",\n            \"customer\": \"cus_5a4a8308-8790-494b-95be-74c84a5b47f9\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"CAPTURE\",\n                    \"request_id\": \"req_147d9c57-a92d-4152-a0b9-3838c4d5cb5d\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {},\n            \"authorization\": {\n                \"token\": \"auth_773c612c-d8d0-4209-9d45-176d536993bb\",\n                \"tracker\": \"track_fe25142f-2598-43a8-aa34-962102997f91\",\n                \"attempt\": \"attemp_525280d1-1a83-4115-ae90-ae69cdd7e0ee\",\n                \"intent\": \"CYBERSOURCE\",\n                \"cybersource_rid\": \"7307231899066388304953\",\n                \"is_reversible\": true,\n                \"totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 10050\n                },\n                \"created_at\": {\n                    \"seconds\": 1730723190,\n                    \"nanos\": 901513141\n                },\n                \"updated_at\": {\n                    \"seconds\": 1730723190,\n                    \"nanos\": 901513241\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_147d9c57-a92d-4152-a0b9-3838c4d5cb5d\",\n            \"payment_method\": {\n                \"token\": \"tms_8eeb7a04-a8ed-4662-94b3-b578834de100\",\n                \"pointer\": \"pm_408aed40-7959-45ab-9da4-c7614f5065bf\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"520000\",\n                \"last_four\": \"1096\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"946903ed-ab18-4500-b7d5-7b24fa266a78","name":"200 - network_token-cit with chaining","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"payload\": {\n        \"authorization\": {\n            \"do_capture\": true,\n            \"do_card_on_file\": true\n        },\n        \"billing\": {\n            \"street_1\": \"St 1\",\n            \"street_2\": \"\",\n            \"city\": \"Islamabad\",\n            \"state\": \"\",\n            \"postal_code\": \"44000\",\n            \"country\": \"PK\"\n        },\n        \"payment_method\": {\n            \"network_token\": {\n                \"card_number\": \"5214150081249256\",\n                \"expiration_month\": \"11\",\n                \"expiration_year\": \"2028\",\n                \"cryptogram\": \"ADi0/udnhaElAAEiUZBTAAADFA==\",\n                \"eci_indicator\": \"07\"\n            }\n        }\n    },\n    \"use_action_chaining\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_792ba696-f740-4392-81bd-803cccdc8576"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_792ba696-f740-4392-81bd-803cccdc8576\",\n            \"client\": \"sec_9286c6a3-a159-492d-9f72-dbe424517fb5\",\n            \"environment\": \"local\",\n            \"state\": \"TRACKER_ENDED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"subscription\",\n            \"entry_mode\": \"network_token\",\n            \"customer\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_5494c78d-a934-41c7-a9a9-182c0faf9be4\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {},\n            \"authorization\": {\n                \"token\": \"auth_1f34b788-e127-4250-bddd-f4521cd50d04\",\n                \"tracker\": \"track_792ba696-f740-4392-81bd-803cccdc8576\",\n                \"attempt\": \"attemp_cdd52897-a228-4519-8299-a483092627d7\",\n                \"intent\": \"CYBERSOURCE\",\n                \"cybersource_rid\": \"7616454998636332003814\",\n                \"totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"created_at\": {\n                    \"seconds\": 1761645497,\n                    \"nanos\": 817463845\n                },\n                \"updated_at\": {\n                    \"seconds\": 1761645497,\n                    \"nanos\": 817463887\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_5494c78d-a934-41c7-a9a9-182c0faf9be4\",\n            \"payment_method\": {\n                \"token\": \"tms_ea7364d0-a1ff-47b8-8c12-444cdf10fcbf\",\n                \"expiration_month\": \"11\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"521415\",\n                \"last_four\": \"9256\",\n                \"issuer\": \"BAWAG P.S.K. BANK\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"6519addf-78f8-42bf-92a5-b9a1e2c4c835","name":"200 - subscription-mit with chaining","originalRequest":{"method":"POST","header":[{"key":"","value":"","type":"text","disabled":true}],"body":{"mode":"raw","raw":"{\n    \"payload\": {\n        \"authorization\": {\n            \"do_capture\": true\n        },\n        \"payment_method\": {\n            \"tokenized_card\": {\n                \"token\": \"tms_853b476d-33d0-46bb-8fed-12e6912746ee\" // or a pm_ token like so:\n            }                                                       // pm_b924b59a-1c44-4b44-944a-a1148f7d6e06\n        }\n    },\n    \"use_action_chaining\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dcddef16-008e-4fae-81cc-1b7d81bf6c44"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_dcddef16-008e-4fae-81cc-1b7d81bf6c44\",\n            \"client\": \"sec_9021583d-b77b-40ef-ac7f-a8fa931097d0\",\n            \"environment\": \"local\",\n            \"state\": \"TRACKER_ENDED\",\n            \"payment_method_kind\": \"card\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"subscription\",\n            \"entry_mode\": \"mit\",\n            \"customer\": \"cus_1c1e4d51-aaaf-42a3-99ce-884d9aba94fa\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_85a7feca-4418-4f99-981a-37fd28d71664\"\n                },\n                \"MPGS\": {\n                    \"kind\": \"NOOP\"\n                },\n                \"PAYFAST\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {},\n            \"authorization\": {\n                \"token\": \"auth_51096fb8-6d36-4f42-b31b-865f985b0f17\",\n                \"tracker\": \"track_dcddef16-008e-4fae-81cc-1b7d81bf6c44\",\n                \"attempt\": \"attemp_397ec298-7132-434e-8b8c-df19a57d8d4c\",\n                \"intent\": \"CYBERSOURCE\",\n                \"cybersource_rid\": \"7616453014066303103814\",\n                \"totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 1244\n                },\n                \"created_at\": {\n                    \"seconds\": 1761645299,\n                    \"nanos\": 284791545\n                },\n                \"updated_at\": {\n                    \"seconds\": 1761645299,\n                    \"nanos\": 284791587\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_85a7feca-4418-4f99-981a-37fd28d71664\",\n            \"payment_method\": {\n                \"token\": \"tms_853b476d-33d0-46bb-8fed-12e6912746ee\",\n                \"pointer\": \"tms_853b476d-33d0-46bb-8fed-12e6912746ee\",\n                \"expiration_month\": \"11\",\n                \"expiration_year\": \"2028\",\n                \"card_type_code\": \"002\",\n                \"card_type\": \"Mastercard\",\n                \"bin_number\": \"521415\",\n                \"last_four\": \"9256\",\n                \"issuer\": \"BAWAG P.S.K. BANK\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"6145b078-c3e7-4621-88de-373187bf6147"},{"name":"Capture","id":"ea313d8e-d0c2-41f3-9c57-aefa9a0563e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7","description":"<p>Perform the <code>CAPTURE</code> action. The request body may be empty. Note that this action is expected for the regular 3DS flow where the customer is redirected to your checkout after enrollment.</p>\n","urlObject":{"path":["order","payments","v3","track_1a46dc70-91f9-4892-8e25-0bb5205b69c7"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"2ff54b11-9630-4248-bd77-3437c9d650d3","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 18:58:16 GMT"},{"key":"Content-Length","value":"818"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_1a46dc70-91f9-4892-8e25-0bb5205b69c7\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\",\n            \"payment_method\": {\n                \"token\": \"card_353d4bd9-1d72-4f4d-a358-b277833795a4\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2023\",\n                \"card_type_code\": \"001\",\n                \"card_type\": \"Visa\",\n                \"bin_number\": \"445653\",\n                \"last_four\": \"1096\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"ea313d8e-d0c2-41f3-9c57-aefa9a0563e9"},{"name":"Reversal","id":"fe7c2a1b-ea88-4b80-99bf-77369ea713e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7","description":"<p>Perform the <code>REVERSAL</code> action. The request body may be empty. Note that this action is expected for the regular 3DS flow where the customer is redirected to your checkout after enrollment.</p>\n<p>This is relevant for the <code>instrument</code> mode used to save a payment method. In this scenario, the authoirzation hold on the customer's funds must be removed by requesting a reversal.</p>\n<p>This request must be authenticated by a Safepay shopper or merchant shopper.</p>\n","urlObject":{"path":["order","payments","v3","track_1a46dc70-91f9-4892-8e25-0bb5205b69c7"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"4fd9b56a-681d-4479-929a-b43f71ccf1b6","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 06 Oct 2023 18:58:16 GMT"},{"key":"Content-Length","value":"818"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_1a46dc70-91f9-4892-8e25-0bb5205b69c7\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_ENDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {\n            \"token\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\",\n            \"payment_method\": {\n                \"token\": \"card_353d4bd9-1d72-4f4d-a358-b277833795a4\",\n                \"expiration_month\": \"12\",\n                \"expiration_year\": \"2023\",\n                \"card_type_code\": \"001\",\n                \"card_type\": \"Visa\",\n                \"bin_number\": \"445653\",\n                \"last_four\": \"1096\"\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"fe7c2a1b-ea88-4b80-99bf-77369ea713e2"}],"id":"250ed8ec-7f84-4dcf-843b-f169ad7f4538","description":"<p>Process a <code>tracker</code>. A <code>tracker</code> is ultimately a state machine that tracks the life of a payment. This endpoint allows you to add progress to a tracker's state.</p>\n<h5 id=\"actions\">Actions</h5>\n<p>An important concept to understand here is <code>next_actions</code> for a <code>tracker</code>. Given an <code>intent</code> and a <code>mode</code> set during the <em><strong>Setup</strong></em> endpoint, the <code>tracker</code> returns the <code>next_actions</code> that need to be executed. For example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"intent\": \"CYBERSOURCE\",\n  \"mode\": \"payment\",\n  \"next_actions\": {\n    \"CYBERSOURCE\": {\n      \"kind\": \"GENERATE_CAPTURE_CONTEXT\"\n    }\n  }\n}\n\n</code></pre>\n<p>This means that to progress the <code>tracker</code> for a card payment (via <em>Cybersource</em>), the next action to be executed is <code>GENERATE_CAPTURE_CONTEXT</code>.</p>\n<p>Executing actions requires running the <em><strong>Order</strong></em> endpoint with appropriate payloads. The client may run the <em><strong>Order</strong></em> endpoint repeatedly until no more actions remain. This is signified by the <code>NO_OP</code> action at which point the payment would be complete (refer to the <strong>Capture</strong> example).</p>\n<p>The response returns the updated <code>tracker</code> and the result of the action inside the <code>action</code> object. This is often necessary for preparing the payload for the subsequent action.</p>\n<h5 id=\"payloads\">Payloads</h5>\n<p>All actions and their payloads are documented within the requests and their examples.</p>\n<h5 id=\"location-and-device\">Location and Device</h5>\n<p>Our backend will try resolve the location and device information from the requests made to our server. You may want to explicitly pass these to our APIs for more accurate reporting.</p>\n<p>You may pass the IP address as in the header with key: <code>X-SFPY-IP-ADDRESS</code>.</p>\n<p>And you may pass the user agent string in the header with key: <code>X-SFPY-USER-AGENT</code>.</p>\n","_postman_id":"250ed8ec-7f84-4dcf-843b-f169ad7f4538"},{"name":"Configuration","item":[{"name":"Reset","id":"48686db8-81bd-4aa0-b99f-7a34760a8d84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_aefeaefe-c21a-4678-ab1e-181bfe2920be","description":"<p>Reset the <code>tracker</code> to its original state. This sets the default <code>state</code> and <code>next_actions</code> based on the <code>mode</code> and <code>intent</code>.</p>\n<p>No body is required for this request but it requires user (JWT) or merchant authentication (JWT, api key, or secret key).</p>\n","urlObject":{"path":["order","payments","v3","track_aefeaefe-c21a-4678-ab1e-181bfe2920be"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"9a794671-8f68-4fdb-ae69-3fb2ea143638","name":"200","originalRequest":{"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_dccdef16-008e-4fae-81cc-1b7d81bf6c44"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 10:08:48 GMT"},{"key":"Content-Length","value":"611"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_dccdef16-008e-4fae-81cc-1b7d81bf6c44\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"GENERATE_CAPTURE_CONTEXT\",\n                    \"request_id\": \"req_f3810877-fc7c-45ca-bc6c-f2f00e72cb1a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"capabilities\": {\n            \"CYBERSOURCE\": true\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"a990974c-64a4-4f61-b3e9-69e9e44c24a7","name":"400","originalRequest":{"method":"PUT","header":[],"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 10:11:51 GMT"},{"key":"Content-Length","value":"109"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"cannot reset tracker in inactive state TRACKER_VOIDED\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"48686db8-81bd-4aa0-b99f-7a34760a8d84"},{"name":"Add Metadata","id":"cde678e3-be61-4cb4-9cc3-ed171df0f4ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"data\": {\n    \"source\": \"shopify\",\n    \"order_id\": \"41231X\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_aa38d5b7-a3a2-45c5-bed8-586b0bae8d06/metadata","description":"<p>Add custom metadata to the <code>tracker</code> as key-value pairs.</p>\n<p>We support the following keys at this time:</p>\n<ul>\n<li><p><code>source</code> For example \"shopify\", \"magento\", \"woocommerce\" or \"custom\" for SDK integrations.</p>\n</li>\n<li><p><code>order_id</code> For tying an ID relevant to your store to this tracker for reconciliation</p>\n</li>\n</ul>\n<p>This request requires merchant authentication (via JWT, api key, or secret key).</p>\n","urlObject":{"path":["order","payments","v3","track_aa38d5b7-a3a2-45c5-bed8-586b0bae8d06","metadata"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"715fca7b-2016-4c42-8e2c-b2dd3e3af3e9","name":"201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"data\": {\n    \"source\": \"shopify\",\n    \"order_id\": \"41231X\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_aa38d5b7-a3a2-45c5-bed8-586b0bae8d06/metadata"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 10:32:28 GMT"},{"key":"Content-Length","value":"635"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_aa38d5b7-a3a2-45c5-bed8-586b0bae8d06\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_STARTED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"PROCESS_TRANSIENT_TOKEN\",\n                    \"request_id\": \"req_1f1382bd-826f-46a3-a2b2-fc6d5aa8a18d\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 700000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 700000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            },\n            \"metadata\": {\n                \"data\": {\n                    \"order_id\": \"41231X\",\n                    \"source\": \"shopify\"\n                }\n            }\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"69c07353-69f7-4d4c-bdb8-44605d0e3615","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"data\": {\n    \"source\": \"shopify\",\n    \"order_id\": \"41231X\"\n  }\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/metadata"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 10:12:57 GMT"},{"key":"Content-Length","value":"131"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"could not set metadata: cannot edit metadata when session is TRACKER_VOIDED\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"cde678e3-be61-4cb4-9cc3-ed171df0f4ad"}],"id":"ee13c297-e725-4b1f-8030-316a058f5a57","description":"<p>A <code>tracker</code> may also be configured in the following ways.</p>\n<h5 id=\"reset\">Reset</h5>\n<p>Reset the <code>next_actions</code> and <code>state</code> for the <code>tracker</code> to the default. Note that this is only possible when the <code>tracker</code> is active (i.e. not paid).</p>\n<h5 id=\"add-metadata\">Add Metadata</h5>\n<p>For adding custom values to the <code>tracker</code> for example an external ID from your store.</p>\n","_postman_id":"ee13c297-e725-4b1f-8030-316a058f5a57"},{"name":"Cancellations","item":[{"name":"Reverse","id":"e55809d4-b8c6-4639-a3ab-527ffaa795aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"authorization\": \"auth_621f9b56-9dba-46b6-92e3-3cd13516c6a5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_9d765b77-608f-46bc-84d2-5f4392753ca3/reversal","description":"<p>Reverse a card authorization. You must pass the token for the authorization in question. You will find this in the tracker details page on your merchant dashboard.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>authorization</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The authorization object <em><strong>Token</strong></em>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["order","payments","v3","track_9d765b77-608f-46bc-84d2-5f4392753ca3","reversal"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"ea602a2e-5f7b-4ffb-8e48-c0aeb31486aa","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"authorization\": \"auth_621f9b56-9dba-46b6-92e3-3cd13516c6a5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_9d765b77-608f-46bc-84d2-5f4392753ca3/reversal"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 08:48:05 GMT"},{"key":"Content-Length","value":"565"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_9d765b77-608f-46bc-84d2-5f4392753ca3\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_REVERSED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"instrument\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_55e5ef0a-9081-498b-80b2-ce65f5f0efda\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 100\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 100\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"f75dc2f1-09cf-40b1-b4c5-c5bdce36de1e","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"authorization\": \"auth_621f9b56-9dba-46b6-92e3-3cd13516c6a5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/reversal"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 08:44:17 GMT"},{"key":"Content-Length","value":"101"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"cannot reverse tracker in state TRACKER_ENDED\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"0c7dd6e3-b3a3-4e3d-b2dc-84b96ba65acb","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"authorization\": \"auth_621f9b56-9dba-46b6-92e3-3cd13516c6a5\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_9d765b77-608f-46bc-84d2-5f4392753ca3/reversal"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 08:48:33 GMT"},{"key":"Content-Length","value":"320"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/jwt: missing jwt token, strategies/api_key: merchant api key not found in the request header, strategies/secret: could not fetch client, error: Resource with this identifier not found]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"e55809d4-b8c6-4639-a3ab-527ffaa795aa"},{"name":"Refund","id":"1e7734ea-8478-42cf-9efa-94265e7777e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"currency\": \"PKR\",\n  \"amount\": 1000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/refund","description":"<p>Perform a refund.</p>\n<p>Note that card refunds are only applicable for up to 90 days after the transaction has completed.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The base price currency. Three-letter ISO currency code, in uppercase.</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>int64</td>\n<td>Y</td>\n<td>The base price amount to be charged, should be in a currency's lowest denomination.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["order","payments","v3","track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26","refund"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"dab083b0-cfef-438f-98e4-97146017e306","name":"200 - Partial","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"currency\": \"PKR\",\n  \"amount\": 1000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7/refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 08:59:40 GMT"},{"key":"Content-Length","value":"574"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_1a46dc70-91f9-4892-8e25-0bb5205b69c7\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_PARTIAL_REFUND\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"e3b8a9b5-9d4d-4f4c-8bea-309dd4f5c14d","name":"200 - Full","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"currency\": \"PKR\",\n  \"amount\": 600000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:07:00 GMT"},{"key":"Content-Length","value":"568"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_REFUNDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_41429bc1-7807-482d-b046-2cabee424314\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"e66e4a04-fb64-4035-ac2c-e35be18247f7","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"currency\": \"PKR\",\n  \"amount\": 1000\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/refund"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:07:14 GMT"},{"key":"Content-Length","value":"103"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"cannot refund tracker in state TRACKER_REFUNDED\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"1e7734ea-8478-42cf-9efa-94265e7777e0"},{"name":"Void","id":"845c859f-8212-43b3-889c-3a1adcaf99c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"kind\": \"VOID_CAPTURE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7/void","description":"<p>Perform a void. You may request to void the following events:</p>\n<ul>\n<li><p><code>VOID_CAPTURE</code> for voiding a regular standalone capture</p>\n</li>\n<li><p><code>VOID_PAYMENT</code> for voiding a combined authorization with capture. This is revelant for subscription payments as well as any regular payments where <code>do_capture</code> was set to <code>true</code> when configuring the authorization options.</p>\n</li>\n<li><p><code>VOID_REFUND</code> for voiding a refund. You must provide the refund <em>Token</em> which can be found from the tracker details page.</p>\n</li>\n</ul>\n<p>Note that a void may not take effect if the settlement cycle has already run.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>kind</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The kind of void. One of <code>VOID_CAPTURE</code>, <code>VOID_PAYMENT</code>, and <code>VOID_REFUND</code></td>\n</tr>\n<tr>\n<td><code>refund</code></td>\n<td>string</td>\n<td>N (except when <code>kind</code> is set to <code>VOID_REFUND</code>)</td>\n<td>The refund <em>Token</em>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["order","payments","v3","track_1a46dc70-91f9-4892-8e25-0bb5205b69c7","void"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"8eb85ef4-70d6-4596-97d7-564b2d523258","name":"200 - Capture","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"kind\": \"VOID_CAPTURE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7/void"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:49:42 GMT"},{"key":"Content-Length","value":"566"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_1a46dc70-91f9-4892-8e25-0bb5205b69c7\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_VOIDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"ff029e36-4b67-4a92-8e07-c4f54ae31666","name":"200 - Payment","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"kind\": \"VOID_PAYMENT\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_70fdbb06-bbf7-44e1-b50a-672d9f1d8b26/void"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:44:56 GMT"},{"key":"Content-Length","value":"515"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_a549b4ce-11e7-424e-80df-6efca46e598c\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_VOIDED\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"subscription\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 300000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 300000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"8b575623-a93c-431a-aa43-a46261c6948e","name":"200 - Refund","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"kind\": \"VOID_REFUND\",\n  \"refund\": \"refund_2054f956-d998-42ad-8e99-3f9891b33fc7\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7/void"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:48:43 GMT"},{"key":"Content-Length","value":"574"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"tracker\": {\n            \"token\": \"track_1a46dc70-91f9-4892-8e25-0bb5205b69c7\",\n            \"client\": \"sec_edeade52-46aa-483b-b87d-009d3ce41554\",\n            \"environment\": \"sandbox\",\n            \"state\": \"TRACKER_PARTIAL_REFUND\",\n            \"intent\": \"CYBERSOURCE\",\n            \"mode\": \"payment\",\n            \"next_actions\": {\n                \"CYBERSOURCE\": {\n                    \"kind\": \"NOOP\",\n                    \"request_id\": \"req_9ea53be5-828f-4730-b187-9d3d350ab72a\"\n                }\n            },\n            \"purchase_totals\": {\n                \"quote_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"base_amount\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 600000\n                },\n                \"conversion_rate\": {\n                    \"base_currency\": \"PKR\",\n                    \"quote_currency\": \"PKR\",\n                    \"rate\": 1\n                }\n            }\n        },\n        \"action\": {}\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"59f7a7eb-cfbe-4306-bf9e-f178eaaf9f57","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"kind\": \"VOID_CAPTURE\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/order/payments/v3/track_1a46dc70-91f9-4892-8e25-0bb5205b69c7/void"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 09 Oct 2023 09:50:20 GMT"},{"key":"Content-Length","value":"99"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"cannot void tracker in state TRACKER_VOIDED\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"845c859f-8212-43b3-889c-3a1adcaf99c9"}],"id":"170e6887-a78e-492f-beea-0c5479129e85","description":"<p>Often times you may run into situations where funds need to be returned to the customer due to unexpected circumstances. You have the following options depending on the situation:</p>\n<h5 id=\"authorization-reversals\">Authorization Reversals</h5>\n<p>If the customer's funds have been put on hold (authorized) but not captured, you have the option of requesting a reversal. This removes the hold on the customer's funds.</p>\n<h5 id=\"voids\">Voids</h5>\n<p>If you wish to cancel a capture soon after it has taken place, you may request to void the capture which will ultimately result in the funds being returned to the customer. A void on a capture will automatically trigger an authorization reversal.</p>\n<p>Note that refunds may also be voided and is useful for situations where an unwanted refund must be reverted.</p>\n<h5 id=\"refunds\">Refunds</h5>\n<p>A void on a capture can only succeed if the funds have not been settled. For situations where the customer's funds must be returned long after the transaction date, you may perform a refund for a partial or full amount of the order total.</p>\n<p>Note that you must authenticate as a merchant (either via api key or secret key) to execute these requests.</p>\n","_postman_id":"170e6887-a78e-492f-beea-0c5479129e85"},{"name":"Reporting","item":[{"name":"Fetch Payment","id":"68957253-f58e-4165-adea-ecb0fc30b328","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/reporter/api/v1/payments/track_f865abdd-3a61-4842-8000-1cffa38f1fbc","description":"<p>Fetch details for a payment using the tracker token.</p>\n","urlObject":{"path":["reporter","api","v1","payments","track_f865abdd-3a61-4842-8000-1cffa38f1fbc"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"d2977087-1253-42e0-a6cd-5becf47bac2f","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/reporter/api/v1/payments/track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 02 Sep 2024 09:11:33 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8bcc5f93aa740da7-MRS"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"ok\": true,\n    \"data\": {\n        \"token\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n        \"environment\": \"sandbox\",\n        \"state\": \"TRACKER_ENDED\",\n        \"intent\": \"CYBERSOURCE\",\n        \"mode\": \"payment\",\n        \"entry_mode\": \"raw\",\n        \"metadata\": {\n            \"order_id\": {\n                \"token\": \"meta_1592f0b7-4f51-4c54-9340-17457c53495e\",\n                \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                \"key\": \"order_id\",\n                \"value\": \"rMF0crLNoQd1uyw9JCxEM1C4O\",\n                \"created_at\": {\n                    \"seconds\": 1724659902\n                },\n                \"updated_at\": {\n                    \"seconds\": 1724659902\n                }\n            },\n            \"source\": {\n                \"token\": \"meta_5c05f186-50eb-4087-af76-078628a72670\",\n                \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                \"key\": \"source\",\n                \"value\": \"shopify\",\n                \"created_at\": {\n                    \"seconds\": 1724659902\n                },\n                \"updated_at\": {\n                    \"seconds\": 1724659902\n                }\n            }\n        },\n        \"client\": {\n            \"token\": \"client_160977e1-3ffc-49b9-88f3-88df96a78049\",\n            \"api_key\": \"sec_a8e0a889-b987-4b7e-9757-a6bf28e4d4e2\",\n            \"name\": \"Safepay Merchant\",\n            \"email\": \"safepaymerchant@gmail.com\",\n            \"avatar\": \"https://storage.googleapis.com/safepay-assets/27ed6ce0-929a-4ee7-9610-4579e58bb78d-logo.png\"\n        },\n        \"customer\": {\n            \"token\": \"guest_d559e694-aa91-4eff-83bb-6ed8ebd18bc4\",\n            \"first_name\": \"fatima\",\n            \"last_name\": \"aurangzeb\",\n            \"email\": \"faurangzeb@getsafepay.com\",\n            \"phone\": \"+92 343 0210640\"\n        },\n        \"next_actions\": {\n            \"CYBERSOURCE\": {\n                \"kind\": \"NOOP\",\n                \"request_id\": \"req_3848ba7a-22ab-4dd4-9b8a-c72d96e33c72\"\n            },\n            \"MPGS\": {\n                \"kind\": \"CREATE_SESSION\"\n            }\n        },\n        \"purchase_totals\": {\n            \"quote_amount\": {\n                \"currency\": \"PKR\",\n                \"amount\": 290000\n            },\n            \"base_amount\": {\n                \"currency\": \"PKR\",\n                \"amount\": 290000\n            },\n            \"conversion_rate\": {\n                \"base_currency\": \"PKR\",\n                \"quote_currency\": \"PKR\",\n                \"rate\": 1\n            }\n        },\n        \"charge\": {\n            \"token\": \"ch_0eada1c4-6651-4d19-9a48-71d06d0568ac\",\n            \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n            \"client\": \"sec_a8e0a889-b987-4b7e-9757-a6bf28e4d4e2\",\n            \"user\": \"guest_d559e694-aa91-4eff-83bb-6ed8ebd18bc4\",\n            \"amount\": {\n                \"currency\": \"PKR\",\n                \"amount\": 290000\n            },\n            \"fees\": {\n                \"currency\": \"PKR\",\n                \"amount\": 9503\n            },\n            \"tax\": {\n                \"currency\": \"PKR\",\n                \"amount\": 1093\n            },\n            \"net\": {\n                \"currency\": \"PKR\",\n                \"amount\": 280497\n            },\n            \"signature\": \"5da24f8e9085d86677afe35c72b3fa9ba5c7fdb184e9d7e32282f38258db57b7\",\n            \"capture\": {\n                \"token\": \"cap_4cec6b5e-fbbf-4055-b77f-a2434e61a58c\",\n                \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                \"intent\": \"CYBERSOURCE\",\n                \"cybersource_rid\": \"7246601491246940904953\",\n                \"is_voidable\": true,\n                \"kind\": \"CAPTURE\",\n                \"totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 290000\n                },\n                \"created_at\": {\n                    \"seconds\": 1724660149\n                },\n                \"updated_at\": {\n                    \"seconds\": 1724660149\n                }\n            },\n            \"balance\": {\n                \"currency\": \"PKR\",\n                \"amount\": 290000\n            },\n            \"created_at\": {\n                \"seconds\": 1724660149\n            },\n            \"updated_at\": {\n                \"seconds\": 1724660149\n            }\n        },\n        \"events\": [\n            {\n                \"intent\": \"CYBERSOURCE\",\n                \"type\": \"ENROLLMENT\",\n                \"intent_request_id\": \"7246599431926829104951\",\n                \"reason\": \"Successful enrollment\",\n                \"created_at\": {\n                    \"seconds\": 1724659944\n                }\n            },\n            {\n                \"intent\": \"CYBERSOURCE\",\n                \"type\": \"AUTHORIZATION\",\n                \"intent_request_id\": \"7246601446636939804953\",\n                \"reason\": \"Successful authorization\",\n                \"purchase_totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 290000\n                },\n                \"created_at\": {\n                    \"seconds\": 1724660146\n                }\n            },\n            {\n                \"intent\": \"CYBERSOURCE\",\n                \"type\": \"CAPTURE\",\n                \"intent_request_id\": \"7246601491246940904953\",\n                \"reason\": \"Successful transaction\",\n                \"purchase_totals\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": 290000\n                },\n                \"created_at\": {\n                    \"seconds\": 1724660149\n                }\n            }\n        ],\n        \"attempts\": [\n            {\n                \"token\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                \"intent\": \"CYBERSOURCE\",\n                \"idempotency_key\": \"req_3848ba7a-22ab-4dd4-9b8a-c72d96e33c72\",\n                \"kind\": 1,\n                \"actions_performed\": [\n                    {\n                        \"token\": \"act_f89128d2-5d6c-453d-ac03-db60b3dde8ac\",\n                        \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                        \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                        \"kind\": \"PAYER_AUTH_SETUP\",\n                        \"created_at\": {\n                            \"seconds\": 1724659902\n                        },\n                        \"updated_at\": {\n                            \"seconds\": 1724659902\n                        }\n                    },\n                    {\n                        \"token\": \"act_22092131-37f1-43f6-bc1f-5d17f3b71fbd\",\n                        \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                        \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                        \"kind\": \"PAYER_AUTH_ENROLLMENT\",\n                        \"created_at\": {\n                            \"seconds\": 1724659943\n                        },\n                        \"updated_at\": {\n                            \"seconds\": 1724659943\n                        }\n                    },\n                    {\n                        \"token\": \"act_ed9a7951-b647-4235-ae2a-66b66146e0bb\",\n                        \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                        \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                        \"kind\": \"PAYER_AUTH_VALIDATION\",\n                        \"created_at\": {\n                            \"seconds\": 1724660145\n                        },\n                        \"updated_at\": {\n                            \"seconds\": 1724660145\n                        }\n                    },\n                    {\n                        \"token\": \"act_f9401b2c-9c0b-4096-a169-131bc431c752\",\n                        \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                        \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                        \"kind\": \"CAPTURE\",\n                        \"created_at\": {\n                            \"seconds\": 1724660149\n                        },\n                        \"updated_at\": {\n                            \"seconds\": 1724660149\n                        }\n                    }\n                ],\n                \"payment_method\": {\n                    \"token\": \"method_466fbc51-dcb0-4c15-9c0a-4ba558c0669b\",\n                    \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"last_four\": \"1096\",\n                    \"kind\": \"CARD\",\n                    \"scheme\": \"Mastercard\",\n                    \"bin\": \"520000\",\n                    \"expiration_month\": \"02\",\n                    \"expiration_year\": \"2029\",\n                    \"created_at\": {\n                        \"seconds\": 1724659903\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724659903\n                    }\n                },\n                \"billing\": {\n                    \"token\": \"bill_6c2ba4f5-a31c-484c-ae0e-e5c4b2c09799\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"street_1\": \"fefeg\",\n                    \"city\": \"khi\",\n                    \"postal_code\": \"12345\",\n                    \"country\": \"PK\",\n                    \"created_at\": {\n                        \"seconds\": 1724659944\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724659944\n                    }\n                },\n                \"enrollment\": {\n                    \"token\": \"enroll_9e940ccb-75a2-4cd0-96b0-c83baa14e4bc\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"cybersource_rid\": \"7246599431926829104951\",\n                    \"specification_version\": \"2.1.0\",\n                    \"veres_enrolled\": \"Y\",\n                    \"eci\": \"02\",\n                    \"created_at\": {\n                        \"seconds\": 1724659944\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724659944\n                    }\n                },\n                \"risk\": {\n                    \"token\": \"risk_16a82fba-fc08-4867-ba6d-8cd961cd4d56\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"score\": \"3\",\n                    \"factor_codes\": [\n                        \"H\"\n                    ],\n                    \"info_codes\": [\n                        \"MM-BIN\",\n                        \"UNV-ADDR\",\n                        \"VEL-NAME\",\n                        \"VELI-CC\",\n                        \"VELI-FP\",\n                        \"VELI-TIP\",\n                        \"VELL-CC\",\n                        \"VELL-TIP\",\n                        \"VELS-CC\",\n                        \"VELV-CC\",\n                        \"ID-M-HPOS\",\n                        \"ID-X-HPOS\",\n                        \"MORPH-C\",\n                        \"MORPH-E\",\n                        \"MORPH-FB\",\n                        \"MORPH-FE\",\n                        \"MORPH-FP\",\n                        \"MORPH-FS\",\n                        \"MORPH-P\",\n                        \"MUL-EM\",\n                        \"RISK-SD\"\n                    ],\n                    \"created_at\": {\n                        \"seconds\": 1724660146\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724660146\n                    }\n                },\n                \"authorization\": {\n                    \"token\": \"auth_b49e55ae-5806-4899-85f7-234e6fb1cdf9\",\n                    \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"intent\": \"CYBERSOURCE\",\n                    \"cybersource_rid\": \"7246601446636939804953\",\n                    \"totals\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": 290000\n                    },\n                    \"created_at\": {\n                        \"seconds\": 1724660146\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724660146\n                    }\n                },\n                \"capture\": {\n                    \"token\": \"cap_4cec6b5e-fbbf-4055-b77f-a2434e61a58c\",\n                    \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n                    \"attempt\": \"attemp_a14d3180-47c6-4c1e-99a9-d801108f17a7\",\n                    \"intent\": \"CYBERSOURCE\",\n                    \"cybersource_rid\": \"7246601491246940904953\",\n                    \"is_voidable\": true,\n                    \"kind\": \"CAPTURE\",\n                    \"totals\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": 290000\n                    },\n                    \"created_at\": {\n                        \"seconds\": 1724660149\n                    },\n                    \"updated_at\": {\n                        \"seconds\": 1724660149\n                    }\n                },\n                \"is_success\": true,\n                \"created_at\": {\n                    \"seconds\": 1724659902\n                },\n                \"updated_at\": {\n                    \"seconds\": 1724659902\n                },\n                \"mode\": \"payment\",\n                \"entry_mode\": \"raw\",\n                \"customer\": {\n                    \"token\": \"guest_d559e694-aa91-4eff-83bb-6ed8ebd18bc4\",\n                    \"first_name\": \"fatima\",\n                    \"last_name\": \"aurangzeb\",\n                    \"email\": \"faurangzeb@getsafepay.com\",\n                    \"phone\": \"+92 343 0210640\"\n                }\n            }\n        ],\n        \"location\": {\n            \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n            \"token\": \"loc_8bcde9df-6bb5-4fbc-b178-91a9768dff13\",\n            \"ip_address\": \"203.130.3.66\",\n            \"city\": \"Karachi\",\n            \"country\": \"PK\",\n            \"latitude\": 24.883,\n            \"longitude\": 67.058,\n            \"region\": \"Sindh\",\n            \"created_at\": {\n                \"seconds\": 1724660149\n            },\n            \"updated_at\": {\n                \"seconds\": 1724660149\n            }\n        },\n        \"device\": {\n            \"tracker\": \"track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1\",\n            \"token\": \"dev_e33ec87f-b818-439c-94a0-f747a3efc94f\",\n            \"user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.\",\n            \"entity\": \"browser\",\n            \"browser\": \"Chrome\",\n            \"browser_version\": \"128.0.0.0\",\n            \"device\": \"Mac\",\n            \"device_type\": \"desktop\",\n            \"platform\": \"macOS 10.15 Catalina\",\n            \"platform_icon\": \"https://assets.userstack.com/icon/os/macosx.png\",\n            \"created_at\": {\n                \"seconds\": 1724660149\n            },\n            \"updated_at\": {\n                \"seconds\": 1724660149\n            }\n        },\n        \"created_at\": {\n            \"seconds\": 1724659902\n        },\n        \"updated_at\": {\n            \"seconds\": 1724659902\n        }\n    }\n}"},{"id":"8154f5e3-ac42-45a3-8d6a-a5376301116e","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/reporter/api/v1/payments/track_ac6afa9c-7f8b-4789-b84e-b39e6422bef1"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 02 Sep 2024 09:11:47 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"418"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8bcc5fe9bb170da7-MRS"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.unauthorized_access\",\n    \"message\": \"strategies/union: [strategies/jwt_client: token is malformed, strategies/jwt_user: token is malformed, strategies/jwt_user_v2: token is malformed, strategies/secret: merchant webhook secret not found in the request header, strategies/tbt: decode error: illegal base64 data at input byte 72, strategies/jwt_admin: token inactive, could not find email key against token]\"\n}"}],"_postman_id":"68957253-f58e-4165-adea-ecb0fc30b328"},{"name":"Search Payments","id":"6f7d144a-cc31-4328-969f-f8e36b04faad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/reporter/api/v1/payments?limit=5&page=1&sort_by=created_at&direction=DESC","description":"<p>Search payments based on various search criteria. The response returns a count of all trackers and a paginated list of trackers.</p>\n<p>The following search options are supported:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>start_at</code></td>\n<td>int</td>\n<td>UTC timestamp in seconds for the lower bound of when payments were created</td>\n</tr>\n<tr>\n<td><code>end_at</code></td>\n<td>int</td>\n<td>UTC timestamp in seconds for the upper bound of when payments were created</td>\n</tr>\n<tr>\n<td><code>states</code></td>\n<td>[enum]</td>\n<td>A list of states that the payments are in. Options are <code>TRACKER_STARTED</code>, <code>TRACKER_AUTHORIZED</code>, <code>TRACKER_ENROLLED</code>, <code>TRACKER_ENDED</code>, <code>TRACKER_CANCELLED</code>, <code>TRACKER_EXPIRED</code>, <code>TRACKER_REFUNDED</code>, <code>TRACKER_PARTIAL_REFUND</code>, <code>TRACKER_DISPUTED</code>, <code>TRACKER_REVERSED</code>, and <code>TRACKER_VOIDED</code>. States are documented <a href=\"https://safepay-docs.netlify.app/concepts/tracker-states/\">here</a>.</td>\n</tr>\n<tr>\n<td><code>intents</code></td>\n<td>[enum]</td>\n<td>A list of payment channels or integrations that Safepay routes payments through. Options are <code>CYBERSOURCE</code>, <code>MPGS</code>, and <code>PAYFAST</code>. Intents are documented <a href=\"https://safepay-docs.netlify.app/concepts/payment-intents/\">here</a>.</td>\n</tr>\n<tr>\n<td><code>modes</code></td>\n<td>[enum]</td>\n<td>A list of tracker modes that the payment is currently in. Options are <code>payment</code>, <code>instrument</code>, <code>subscription</code>, and <code>unscheduled_cof</code>. Modes are documented <a href=\"https://safepay-docs.netlify.app/concepts/payment-modes/\">here</a>.</td>\n</tr>\n<tr>\n<td><code>currencies</code></td>\n<td>[enum]</td>\n<td>A list of ISO 4217 currency codes that the tracker amount was set in. Supported currencies are <code>PKR</code>, <code>USD</code>, <code>GBP</code>, <code>CAD</code>, <code>EUR</code>, <code>AED</code>, and <code>SAR</code>.</td>\n</tr>\n<tr>\n<td><code>trackers</code></td>\n<td>[string]</td>\n<td>A list of tracker tokens.</td>\n</tr>\n<tr>\n<td><code>customer_email</code></td>\n<td>string</td>\n<td>The paying customer's email address.</td>\n</tr>\n<tr>\n<td><code>customers</code></td>\n<td>[string]</td>\n<td>A list of customer tokens. These may identify guests, Safepay shoppers, or merchant shoppers.</td>\n</tr>\n<tr>\n<td><code>meta_keys</code></td>\n<td>[string]</td>\n<td>A list of metadata keys. Note that this must be used in conjunction with the <code>meta_values</code> field. Options are <code>source</code> and <code>order_id</code>.</td>\n</tr>\n<tr>\n<td><code>meta_values</code></td>\n<td>[string]</td>\n<td>A list of metadata values. Note that this must be used in conjunction with the <code>meta_keys</code> field. For example, <code>meta_keys</code> may take the values [ <code>\"source\"</code>, <code>\"order_id\"</code>] and <code>meta_values</code> may be [ <code>\"custom\"</code>, <code>\"\"</code>].</td>\n</tr>\n<tr>\n<td><code>amount_lower</code></td>\n<td>int</td>\n<td>A lower bound on the payment amount. Note that this must be in the lowest denomination of the currency e.g. paisas for <code>PKR</code> and cents for <code>USD</code>.</td>\n</tr>\n<tr>\n<td><code>amount_upper</code></td>\n<td>int</td>\n<td>An upper bound on the payment amount. Note that this must be in the lowest denomination of the currency e.g. paisas for <code>PKR</code> and cents for <code>USD</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><p>As mentioned above, the response is paginated. To control the pagination, there are some additional options:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>limit</code></td>\n<td>int</td>\n<td>Limit the number of search results to the specified value. The default is <code>20</code>.</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>int</td>\n<td>Specify the page number to offset the batch of results being retrieved. The first page starts at the value <code>1</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Results are sorted chronologically by the tracker's <code>created_at</code> timestamp in descending order.</p>\n<h3 id=\"expanding-params\">Expanding params</h3>\n<p>The list response of trackers contains a minified view of the payment. However, some paramaters may be expanded to provide additional information. This can be achieved using the <code>expand</code> parameter which takes a list of items that may be expanded. The options are:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Options</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>customer</code></td>\n<td>Details for the customer such as their names and email.</td>\n</tr>\n<tr>\n<td><code>charge</code></td>\n<td>Details for the payment charge including fees and any discounts applied.</td>\n</tr>\n<tr>\n<td><code>risk</code></td>\n<td>Details on the risk score determined by the fraud tool. This only applies to <code>CYBERSOURCE</code> payments for now.</td>\n</tr>\n<tr>\n<td><code>dispute</code></td>\n<td>Details for a dispute that is associated with the payment (if any).</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["reporter","api","v1","payments"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"description":{"content":"<p>Limit search results to a value</p>\n","type":"text/plain"},"key":"limit","value":"5"},{"description":{"content":"<p>Paginate search results</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>Sort by specifies the field use to sort data e.g. <code>created_at</code></p>\n","type":"text/plain"},"key":"sort_by","value":"created_at"},{"description":{"content":"<p>Direction specifies the data sort order either ASC or DESC</p>\n","type":"text/plain"},"key":"direction","value":"DESC"}],"variable":[]}},"response":[{"id":"6bcde68a-ba98-4adc-b4ef-aac82d5beb87","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/reporter/api/v1/payments?limit=5&page=1&sort_by=created_at&direction=DESC","host":["https://sandbox.api.getsafepay.com"],"path":["reporter","api","v1","payments"],"query":[{"key":"limit","value":"5","description":"Limit search results to a value"},{"key":"page","value":"1","description":"Paginate search results"},{"key":"sort_by","value":"created_at","description":"Sort by specifies the field use to sort data e.g. `created_at`"},{"key":"direction","value":"DESC","description":"Direction specifies the data sort order either ASC or DESC"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Sep 2024 11:22:18 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8c8265583ad212ac-MRS"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"ok\": true,\n    \"data\": {\n        \"count\": 261,\n        \"list\": [\n            {\n                \"token\": \"track_182657fe-b372-4751-b4c6-2e0a7369f670\",\n                \"environment\": \"sandbox\",\n                \"client\": {\n                    \"api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\"\n                },\n                \"customer\": {\n                    \"token\": \"guest_15acc00c-970b-49e9-9258-b66992c81c11\"\n                },\n                \"state\": \"TRACKER_ENDED\",\n                \"intent\": \"CYBERSOURCE\",\n                \"mode\": \"payment\",\n                \"currency\": \"PKR\",\n                \"display_amount\": \"2500.00\",\n                \"created_at\": {\n                    \"seconds\": 1727158668\n                }\n            },\n            {\n                \"token\": \"track_be811167-76da-4d7e-8099-6003a9bc3df6\",\n                \"environment\": \"sandbox\",\n                \"client\": {\n                    \"api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\"\n                },\n                \"customer\": {\n                    \"token\": \"guest_ca946bc3-2e53-4e06-bd38-53a5160252ca\"\n                },\n                \"state\": \"TRACKER_ENDED\",\n                \"intent\": \"CYBERSOURCE\",\n                \"mode\": \"payment\",\n                \"currency\": \"PKR\",\n                \"display_amount\": \"2500.00\",\n                \"created_at\": {\n                    \"seconds\": 1727155741\n                }\n            },\n            {\n                \"token\": \"track_ea2d05d4-cc27-4d34-ad33-649dacd75f5a\",\n                \"environment\": \"sandbox\",\n                \"client\": {\n                    \"api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\"\n                },\n                \"state\": \"TRACKER_STARTED\",\n                \"intent\": \"CYBERSOURCE\",\n                \"mode\": \"payment\",\n                \"currency\": \"PKR\",\n                \"display_amount\": \"2500.00\",\n                \"created_at\": {\n                    \"seconds\": 1727155530\n                }\n            },\n            {\n                \"token\": \"track_9ea533a0-9014-46c5-8451-0d6114ec5e55\",\n                \"environment\": \"sandbox\",\n                \"client\": {\n                    \"api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\"\n                },\n                \"state\": \"TRACKER_STARTED\",\n                \"intent\": \"CYBERSOURCE\",\n                \"mode\": \"payment\",\n                \"currency\": \"PKR\",\n                \"display_amount\": \"2500.00\",\n                \"created_at\": {\n                    \"seconds\": 1727155442\n                }\n            },\n            {\n                \"token\": \"track_196c8853-56b3-4f42-96a5-97b9c3eefe3d\",\n                \"environment\": \"sandbox\",\n                \"client\": {\n                    \"api_key\": \"sec_a7cc6fc1-088d-4f35-9dac-2bab2cb234a1\"\n                },\n                \"state\": \"TRACKER_STARTED\",\n                \"intent\": \"CYBERSOURCE\",\n                \"mode\": \"payment\",\n                \"currency\": \"PKR\",\n                \"display_amount\": \"2500.00\",\n                \"created_at\": {\n                    \"seconds\": 1727155412\n                }\n            }\n        ],\n        \"meta\": {\n            \"limit\": 5,\n            \"page\": 1,\n            \"offset\": 0,\n            \"sort_by\": \"created_at\",\n            \"direction\": \"DESC\"\n        }\n    }\n}"}],"_postman_id":"6f7d144a-cc31-4328-969f-f8e36b04faad"}],"id":"60f37352-fc81-4ea6-9cf2-90d04d9ea76e","description":"<p>Fetch payment details.</p>\n","_postman_id":"60f37352-fc81-4ea6-9cf2-90d04d9ea76e"},{"name":"Meta","item":[{"name":"Countries","id":"f0d03259-9c61-40fa-bee4-e7bb5c7c98db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/meta/v2/countries?lang=en","urlObject":{"path":["user","meta","v2","countries"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"key":"lang","value":"en"}],"variable":[]}},"response":[{"id":"5940ab45-54ae-4118-ba86-11e75972f3a7","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/user/meta/v2/countries?lang=en","host":["https://sandbox.api.getsafepay.com"],"path":["user","meta","v2","countries"],"query":[{"key":"lang","value":"en"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 23 Oct 2024 10:50:04 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8d712a017a25cdfd-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"api_version\": \"v2\",\n    \"data\": [\n        {\n            \"code\": \"AF\",\n            \"name\": \"Afghanistan\"\n        },\n        {\n            \"code\": \"AX\",\n            \"name\": \"Åland Islands\"\n        },\n        {\n            \"code\": \"AL\",\n            \"name\": \"Albania\"\n        },\n        {\n            \"code\": \"DZ\",\n            \"name\": \"Algeria\"\n        },\n        {\n            \"code\": \"AS\",\n            \"name\": \"American Samoa\"\n        },\n        {\n            \"code\": \"AD\",\n            \"name\": \"Andorra\"\n        },\n        {\n            \"code\": \"AO\",\n            \"name\": \"Angola\"\n        },\n        {\n            \"code\": \"AI\",\n            \"name\": \"Anguilla\"\n        },\n        {\n            \"code\": \"AQ\",\n            \"name\": \"Antarctica\"\n        },\n        {\n            \"code\": \"AG\",\n            \"name\": \"Antigua & Barbuda\"\n        },\n        {\n            \"code\": \"AR\",\n            \"name\": \"Argentina\"\n        },\n        {\n            \"code\": \"AM\",\n            \"name\": \"Armenia\"\n        },\n        {\n            \"code\": \"AW\",\n            \"name\": \"Aruba\"\n        },\n        {\n            \"code\": \"AC\",\n            \"name\": \"Ascension Island\"\n        },\n        {\n            \"code\": \"AU\",\n            \"name\": \"Australia\"\n        },\n        {\n            \"code\": \"AT\",\n            \"name\": \"Austria\"\n        },\n        {\n            \"code\": \"AZ\",\n            \"name\": \"Azerbaijan\"\n        },\n        {\n            \"code\": \"BS\",\n            \"name\": \"Bahamas\"\n        },\n        {\n            \"code\": \"BH\",\n            \"name\": \"Bahrain\"\n        },\n        {\n            \"code\": \"BD\",\n            \"name\": \"Bangladesh\"\n        },\n        {\n            \"code\": \"BB\",\n            \"name\": \"Barbados\"\n        },\n        {\n            \"code\": \"BY\",\n            \"name\": \"Belarus\"\n        },\n        {\n            \"code\": \"BE\",\n            \"name\": \"Belgium\"\n        },\n        {\n            \"code\": \"BZ\",\n            \"name\": \"Belize\"\n        },\n        {\n            \"code\": \"BJ\",\n            \"name\": \"Benin\"\n        },\n        {\n            \"code\": \"BM\",\n            \"name\": \"Bermuda\"\n        },\n        {\n            \"code\": \"BT\",\n            \"name\": \"Bhutan\"\n        },\n        {\n            \"code\": \"BO\",\n            \"name\": \"Bolivia\"\n        },\n        {\n            \"code\": \"BA\",\n            \"name\": \"Bosnia & Herzegovina\"\n        },\n        {\n            \"code\": \"BW\",\n            \"name\": \"Botswana\"\n        },\n        {\n            \"code\": \"BV\",\n            \"name\": \"Bouvet Island\"\n        },\n        {\n            \"code\": \"BR\",\n            \"name\": \"Brazil\"\n        },\n        {\n            \"code\": \"IO\",\n            \"name\": \"British Indian Ocean Territory\"\n        },\n        {\n            \"code\": \"VG\",\n            \"name\": \"British Virgin Islands\"\n        },\n        {\n            \"code\": \"BN\",\n            \"name\": \"Brunei\"\n        },\n        {\n            \"code\": \"BG\",\n            \"name\": \"Bulgaria\"\n        },\n        {\n            \"code\": \"BF\",\n            \"name\": \"Burkina Faso\"\n        },\n        {\n            \"code\": \"BI\",\n            \"name\": \"Burundi\"\n        },\n        {\n            \"code\": \"KH\",\n            \"name\": \"Cambodia\"\n        },\n        {\n            \"code\": \"CM\",\n            \"name\": \"Cameroon\"\n        },\n        {\n            \"code\": \"CA\",\n            \"name\": \"Canada\"\n        },\n        {\n            \"code\": \"CV\",\n            \"name\": \"Cape Verde\"\n        },\n        {\n            \"code\": \"BQ\",\n            \"name\": \"Caribbean Netherlands\"\n        },\n        {\n            \"code\": \"KY\",\n            \"name\": \"Cayman Islands\"\n        },\n        {\n            \"code\": \"CF\",\n            \"name\": \"Central African Republic\"\n        },\n        {\n            \"code\": \"TD\",\n            \"name\": \"Chad\"\n        },\n        {\n            \"code\": \"CL\",\n            \"name\": \"Chile\"\n        },\n        {\n            \"code\": \"CN\",\n            \"name\": \"China\"\n        },\n        {\n            \"code\": \"CX\",\n            \"name\": \"Christmas Island\"\n        },\n        {\n            \"code\": \"CC\",\n            \"name\": \"Cocos (Keeling) Islands\"\n        },\n        {\n            \"code\": \"CO\",\n            \"name\": \"Colombia\"\n        },\n        {\n            \"code\": \"KM\",\n            \"name\": \"Comoros\"\n        },\n        {\n            \"code\": \"CG\",\n            \"name\": \"Congo - Brazzaville\"\n        },\n        {\n            \"code\": \"CD\",\n            \"name\": \"Congo - Kinshasa\"\n        },\n        {\n            \"code\": \"CK\",\n            \"name\": \"Cook Islands\"\n        },\n        {\n            \"code\": \"CR\",\n            \"name\": \"Costa Rica\"\n        },\n        {\n            \"code\": \"CI\",\n            \"name\": \"Côte d’Ivoire\"\n        },\n        {\n            \"code\": \"HR\",\n            \"name\": \"Croatia\"\n        },\n        {\n            \"code\": \"CU\",\n            \"name\": \"Cuba\"\n        },\n        {\n            \"code\": \"CW\",\n            \"name\": \"Curaçao\"\n        },\n        {\n            \"code\": \"CY\",\n            \"name\": \"Cyprus\"\n        },\n        {\n            \"code\": \"CZ\",\n            \"name\": \"Czechia\"\n        },\n        {\n            \"code\": \"DK\",\n            \"name\": \"Denmark\"\n        },\n        {\n            \"code\": \"DJ\",\n            \"name\": \"Djibouti\"\n        },\n        {\n            \"code\": \"DM\",\n            \"name\": \"Dominica\"\n        },\n        {\n            \"code\": \"DO\",\n            \"name\": \"Dominican Republic\"\n        },\n        {\n            \"code\": \"EC\",\n            \"name\": \"Ecuador\"\n        },\n        {\n            \"code\": \"EG\",\n            \"name\": \"Egypt\"\n        },\n        {\n            \"code\": \"SV\",\n            \"name\": \"El Salvador\"\n        },\n        {\n            \"code\": \"GQ\",\n            \"name\": \"Equatorial Guinea\"\n        },\n        {\n            \"code\": \"ER\",\n            \"name\": \"Eritrea\"\n        },\n        {\n            \"code\": \"EE\",\n            \"name\": \"Estonia\"\n        },\n        {\n            \"code\": \"ET\",\n            \"name\": \"Ethiopia\"\n        },\n        {\n            \"code\": \"FK\",\n            \"name\": \"Falkland Islands\"\n        },\n        {\n            \"code\": \"FO\",\n            \"name\": \"Faroe Islands\"\n        },\n        {\n            \"code\": \"FJ\",\n            \"name\": \"Fiji\"\n        },\n        {\n            \"code\": \"FI\",\n            \"name\": \"Finland\"\n        },\n        {\n            \"code\": \"FR\",\n            \"name\": \"France\"\n        },\n        {\n            \"code\": \"GF\",\n            \"name\": \"French Guiana\"\n        },\n        {\n            \"code\": \"PF\",\n            \"name\": \"French Polynesia\"\n        },\n        {\n            \"code\": \"TF\",\n            \"name\": \"French Southern Territories\"\n        },\n        {\n            \"code\": \"GA\",\n            \"name\": \"Gabon\"\n        },\n        {\n            \"code\": \"GM\",\n            \"name\": \"Gambia\"\n        },\n        {\n            \"code\": \"GE\",\n            \"name\": \"Georgia\"\n        },\n        {\n            \"code\": \"DE\",\n            \"name\": \"Germany\"\n        },\n        {\n            \"code\": \"GH\",\n            \"name\": \"Ghana\"\n        },\n        {\n            \"code\": \"GI\",\n            \"name\": \"Gibraltar\"\n        },\n        {\n            \"code\": \"GR\",\n            \"name\": \"Greece\"\n        },\n        {\n            \"code\": \"GL\",\n            \"name\": \"Greenland\"\n        },\n        {\n            \"code\": \"GD\",\n            \"name\": \"Grenada\"\n        },\n        {\n            \"code\": \"GP\",\n            \"name\": \"Guadeloupe\"\n        },\n        {\n            \"code\": \"GU\",\n            \"name\": \"Guam\"\n        },\n        {\n            \"code\": \"GT\",\n            \"name\": \"Guatemala\"\n        },\n        {\n            \"code\": \"GG\",\n            \"name\": \"Guernsey\"\n        },\n        {\n            \"code\": \"GN\",\n            \"name\": \"Guinea\"\n        },\n        {\n            \"code\": \"GW\",\n            \"name\": \"Guinea-Bissau\"\n        },\n        {\n            \"code\": \"GY\",\n            \"name\": \"Guyana\"\n        },\n        {\n            \"code\": \"HT\",\n            \"name\": \"Haiti\"\n        },\n        {\n            \"code\": \"HM\",\n            \"name\": \"Heard & McDonald Islands\"\n        },\n        {\n            \"code\": \"HN\",\n            \"name\": \"Honduras\"\n        },\n        {\n            \"code\": \"HK\",\n            \"name\": \"Hong Kong SAR China\"\n        },\n        {\n            \"code\": \"HU\",\n            \"name\": \"Hungary\"\n        },\n        {\n            \"code\": \"IS\",\n            \"name\": \"Iceland\"\n        },\n        {\n            \"code\": \"IN\",\n            \"name\": \"India\"\n        },\n        {\n            \"code\": \"ID\",\n            \"name\": \"Indonesia\"\n        },\n        {\n            \"code\": \"IR\",\n            \"name\": \"Iran\"\n        },\n        {\n            \"code\": \"IQ\",\n            \"name\": \"Iraq\"\n        },\n        {\n            \"code\": \"IE\",\n            \"name\": \"Ireland\"\n        },\n        {\n            \"code\": \"IM\",\n            \"name\": \"Isle of Man\"\n        },\n        {\n            \"code\": \"IL\",\n            \"name\": \"Israel\"\n        },\n        {\n            \"code\": \"IT\",\n            \"name\": \"Italy\"\n        },\n        {\n            \"code\": \"JM\",\n            \"name\": \"Jamaica\"\n        },\n        {\n            \"code\": \"JP\",\n            \"name\": \"Japan\"\n        },\n        {\n            \"code\": \"JE\",\n            \"name\": \"Jersey\"\n        },\n        {\n            \"code\": \"JO\",\n            \"name\": \"Jordan\"\n        },\n        {\n            \"code\": \"KZ\",\n            \"name\": \"Kazakhstan\"\n        },\n        {\n            \"code\": \"KE\",\n            \"name\": \"Kenya\"\n        },\n        {\n            \"code\": \"KI\",\n            \"name\": \"Kiribati\"\n        },\n        {\n            \"code\": \"XK\",\n            \"name\": \"Kosovo\"\n        },\n        {\n            \"code\": \"KW\",\n            \"name\": \"Kuwait\"\n        },\n        {\n            \"code\": \"KG\",\n            \"name\": \"Kyrgyzstan\"\n        },\n        {\n            \"code\": \"LA\",\n            \"name\": \"Laos\"\n        },\n        {\n            \"code\": \"LV\",\n            \"name\": \"Latvia\"\n        },\n        {\n            \"code\": \"LB\",\n            \"name\": \"Lebanon\"\n        },\n        {\n            \"code\": \"LS\",\n            \"name\": \"Lesotho\"\n        },\n        {\n            \"code\": \"LR\",\n            \"name\": \"Liberia\"\n        },\n        {\n            \"code\": \"LY\",\n            \"name\": \"Libya\"\n        },\n        {\n            \"code\": \"LI\",\n            \"name\": \"Liechtenstein\"\n        },\n        {\n            \"code\": \"LT\",\n            \"name\": \"Lithuania\"\n        },\n        {\n            \"code\": \"LU\",\n            \"name\": \"Luxembourg\"\n        },\n        {\n            \"code\": \"MO\",\n            \"name\": \"Macau SAR China\"\n        },\n        {\n            \"code\": \"MK\",\n            \"name\": \"Macedonia\"\n        },\n        {\n            \"code\": \"MG\",\n            \"name\": \"Madagascar\"\n        },\n        {\n            \"code\": \"MW\",\n            \"name\": \"Malawi\"\n        },\n        {\n            \"code\": \"MY\",\n            \"name\": \"Malaysia\"\n        },\n        {\n            \"code\": \"MV\",\n            \"name\": \"Maldives\"\n        },\n        {\n            \"code\": \"ML\",\n            \"name\": \"Mali\"\n        },\n        {\n            \"code\": \"MT\",\n            \"name\": \"Malta\"\n        },\n        {\n            \"code\": \"MH\",\n            \"name\": \"Marshall Islands\"\n        },\n        {\n            \"code\": \"MQ\",\n            \"name\": \"Martinique\"\n        },\n        {\n            \"code\": \"MR\",\n            \"name\": \"Mauritania\"\n        },\n        {\n            \"code\": \"MU\",\n            \"name\": \"Mauritius\"\n        },\n        {\n            \"code\": \"YT\",\n            \"name\": \"Mayotte\"\n        },\n        {\n            \"code\": \"MX\",\n            \"name\": \"Mexico\"\n        },\n        {\n            \"code\": \"FM\",\n            \"name\": \"Micronesia\"\n        },\n        {\n            \"code\": \"MD\",\n            \"name\": \"Moldova\"\n        },\n        {\n            \"code\": \"MC\",\n            \"name\": \"Monaco\"\n        },\n        {\n            \"code\": \"MN\",\n            \"name\": \"Mongolia\"\n        },\n        {\n            \"code\": \"ME\",\n            \"name\": \"Montenegro\"\n        },\n        {\n            \"code\": \"MS\",\n            \"name\": \"Montserrat\"\n        },\n        {\n            \"code\": \"MA\",\n            \"name\": \"Morocco\"\n        },\n        {\n            \"code\": \"MZ\",\n            \"name\": \"Mozambique\"\n        },\n        {\n            \"code\": \"MM\",\n            \"name\": \"Myanmar (Burma)\"\n        },\n        {\n            \"code\": \"NA\",\n            \"name\": \"Namibia\"\n        },\n        {\n            \"code\": \"NR\",\n            \"name\": \"Nauru\"\n        },\n        {\n            \"code\": \"NP\",\n            \"name\": \"Nepal\"\n        },\n        {\n            \"code\": \"NL\",\n            \"name\": \"Netherlands\"\n        },\n        {\n            \"code\": \"NC\",\n            \"name\": \"New Caledonia\"\n        },\n        {\n            \"code\": \"NZ\",\n            \"name\": \"New Zealand\"\n        },\n        {\n            \"code\": \"NI\",\n            \"name\": \"Nicaragua\"\n        },\n        {\n            \"code\": \"NE\",\n            \"name\": \"Niger\"\n        },\n        {\n            \"code\": \"NG\",\n            \"name\": \"Nigeria\"\n        },\n        {\n            \"code\": \"NU\",\n            \"name\": \"Niue\"\n        },\n        {\n            \"code\": \"NF\",\n            \"name\": \"Norfolk Island\"\n        },\n        {\n            \"code\": \"KP\",\n            \"name\": \"North Korea\"\n        },\n        {\n            \"code\": \"MP\",\n            \"name\": \"Northern Mariana Islands\"\n        },\n        {\n            \"code\": \"NO\",\n            \"name\": \"Norway\"\n        },\n        {\n            \"code\": \"OM\",\n            \"name\": \"Oman\"\n        },\n        {\n            \"code\": \"PK\",\n            \"name\": \"Pakistan\"\n        },\n        {\n            \"code\": \"PW\",\n            \"name\": \"Palau\"\n        },\n        {\n            \"code\": \"PS\",\n            \"name\": \"Palestinian Territories\"\n        },\n        {\n            \"code\": \"PA\",\n            \"name\": \"Panama\"\n        },\n        {\n            \"code\": \"PG\",\n            \"name\": \"Papua New Guinea\"\n        },\n        {\n            \"code\": \"PY\",\n            \"name\": \"Paraguay\"\n        },\n        {\n            \"code\": \"PE\",\n            \"name\": \"Peru\"\n        },\n        {\n            \"code\": \"PH\",\n            \"name\": \"Philippines\"\n        },\n        {\n            \"code\": \"PN\",\n            \"name\": \"Pitcairn Islands\"\n        },\n        {\n            \"code\": \"PL\",\n            \"name\": \"Poland\"\n        },\n        {\n            \"code\": \"PT\",\n            \"name\": \"Portugal\"\n        },\n        {\n            \"code\": \"PR\",\n            \"name\": \"Puerto Rico\"\n        },\n        {\n            \"code\": \"QA\",\n            \"name\": \"Qatar\"\n        },\n        {\n            \"code\": \"RE\",\n            \"name\": \"Réunion\"\n        },\n        {\n            \"code\": \"RO\",\n            \"name\": \"Romania\"\n        },\n        {\n            \"code\": \"RU\",\n            \"name\": \"Russia\"\n        },\n        {\n            \"code\": \"RW\",\n            \"name\": \"Rwanda\"\n        },\n        {\n            \"code\": \"WS\",\n            \"name\": \"Samoa\"\n        },\n        {\n            \"code\": \"SM\",\n            \"name\": \"San Marino\"\n        },\n        {\n            \"code\": \"ST\",\n            \"name\": \"São Tomé & Príncipe\"\n        },\n        {\n            \"code\": \"SA\",\n            \"name\": \"Saudi Arabia\"\n        },\n        {\n            \"code\": \"SN\",\n            \"name\": \"Senegal\"\n        },\n        {\n            \"code\": \"RS\",\n            \"name\": \"Serbia\"\n        },\n        {\n            \"code\": \"SC\",\n            \"name\": \"Seychelles\"\n        },\n        {\n            \"code\": \"SL\",\n            \"name\": \"Sierra Leone\"\n        },\n        {\n            \"code\": \"SG\",\n            \"name\": \"Singapore\"\n        },\n        {\n            \"code\": \"SX\",\n            \"name\": \"Sint Maarten\"\n        },\n        {\n            \"code\": \"SK\",\n            \"name\": \"Slovakia\"\n        },\n        {\n            \"code\": \"SI\",\n            \"name\": \"Slovenia\"\n        },\n        {\n            \"code\": \"SB\",\n            \"name\": \"Solomon Islands\"\n        },\n        {\n            \"code\": \"SO\",\n            \"name\": \"Somalia\"\n        },\n        {\n            \"code\": \"ZA\",\n            \"name\": \"South Africa\"\n        },\n        {\n            \"code\": \"GS\",\n            \"name\": \"South Georgia & South Sandwich Islands\"\n        },\n        {\n            \"code\": \"KR\",\n            \"name\": \"South Korea\"\n        },\n        {\n            \"code\": \"SS\",\n            \"name\": \"South Sudan\"\n        },\n        {\n            \"code\": \"ES\",\n            \"name\": \"Spain\"\n        },\n        {\n            \"code\": \"LK\",\n            \"name\": \"Sri Lanka\"\n        },\n        {\n            \"code\": \"BL\",\n            \"name\": \"St. Barthélemy\"\n        },\n        {\n            \"code\": \"SH\",\n            \"name\": \"St. Helena\"\n        },\n        {\n            \"code\": \"KN\",\n            \"name\": \"St. Kitts & Nevis\"\n        },\n        {\n            \"code\": \"LC\",\n            \"name\": \"St. Lucia\"\n        },\n        {\n            \"code\": \"MF\",\n            \"name\": \"St. Martin\"\n        },\n        {\n            \"code\": \"PM\",\n            \"name\": \"St. Pierre & Miquelon\"\n        },\n        {\n            \"code\": \"VC\",\n            \"name\": \"St. Vincent & Grenadines\"\n        },\n        {\n            \"code\": \"SD\",\n            \"name\": \"Sudan\"\n        },\n        {\n            \"code\": \"SR\",\n            \"name\": \"Suriname\"\n        },\n        {\n            \"code\": \"SJ\",\n            \"name\": \"Svalbard & Jan Mayen\"\n        },\n        {\n            \"code\": \"SZ\",\n            \"name\": \"Swaziland\"\n        },\n        {\n            \"code\": \"SE\",\n            \"name\": \"Sweden\"\n        },\n        {\n            \"code\": \"CH\",\n            \"name\": \"Switzerland\"\n        },\n        {\n            \"code\": \"SY\",\n            \"name\": \"Syria\"\n        },\n        {\n            \"code\": \"TW\",\n            \"name\": \"Taiwan\"\n        },\n        {\n            \"code\": \"TJ\",\n            \"name\": \"Tajikistan\"\n        },\n        {\n            \"code\": \"TZ\",\n            \"name\": \"Tanzania\"\n        },\n        {\n            \"code\": \"TH\",\n            \"name\": \"Thailand\"\n        },\n        {\n            \"code\": \"TL\",\n            \"name\": \"Timor-Leste\"\n        },\n        {\n            \"code\": \"TG\",\n            \"name\": \"Togo\"\n        },\n        {\n            \"code\": \"TK\",\n            \"name\": \"Tokelau\"\n        },\n        {\n            \"code\": \"TO\",\n            \"name\": \"Tonga\"\n        },\n        {\n            \"code\": \"TT\",\n            \"name\": \"Trinidad & Tobago\"\n        },\n        {\n            \"code\": \"TA\",\n            \"name\": \"Tristan da Cunha\"\n        },\n        {\n            \"code\": \"TN\",\n            \"name\": \"Tunisia\"\n        },\n        {\n            \"code\": \"TR\",\n            \"name\": \"Turkey\"\n        },\n        {\n            \"code\": \"TM\",\n            \"name\": \"Turkmenistan\"\n        },\n        {\n            \"code\": \"TC\",\n            \"name\": \"Turks & Caicos Islands\"\n        },\n        {\n            \"code\": \"TV\",\n            \"name\": \"Tuvalu\"\n        },\n        {\n            \"code\": \"UM\",\n            \"name\": \"U.S. Outlying Islands\"\n        },\n        {\n            \"code\": \"VI\",\n            \"name\": \"U.S. Virgin Islands\"\n        },\n        {\n            \"code\": \"UG\",\n            \"name\": \"Uganda\"\n        },\n        {\n            \"code\": \"UA\",\n            \"name\": \"Ukraine\"\n        },\n        {\n            \"code\": \"AE\",\n            \"name\": \"United Arab Emirates\"\n        },\n        {\n            \"code\": \"GB\",\n            \"name\": \"United Kingdom\"\n        },\n        {\n            \"code\": \"US\",\n            \"name\": \"United States\"\n        },\n        {\n            \"code\": \"UY\",\n            \"name\": \"Uruguay\"\n        },\n        {\n            \"code\": \"UZ\",\n            \"name\": \"Uzbekistan\"\n        },\n        {\n            \"code\": \"VU\",\n            \"name\": \"Vanuatu\"\n        },\n        {\n            \"code\": \"VA\",\n            \"name\": \"Vatican City\"\n        },\n        {\n            \"code\": \"VE\",\n            \"name\": \"Venezuela\"\n        },\n        {\n            \"code\": \"VN\",\n            \"name\": \"Vietnam\"\n        },\n        {\n            \"code\": \"WF\",\n            \"name\": \"Wallis & Futuna\"\n        },\n        {\n            \"code\": \"EH\",\n            \"name\": \"Western Sahara\"\n        },\n        {\n            \"code\": \"YE\",\n            \"name\": \"Yemen\"\n        },\n        {\n            \"code\": \"ZM\",\n            \"name\": \"Zambia\"\n        },\n        {\n            \"code\": \"ZW\",\n            \"name\": \"Zimbabwe\"\n        }\n    ]\n}"}],"_postman_id":"f0d03259-9c61-40fa-bee4-e7bb5c7c98db"},{"name":"Country","id":"628d9c62-cb19-41bb-aa15-e97946542ba5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/meta/v2/country?cc=AE","urlObject":{"path":["user","meta","v2","country"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"key":"cc","value":"AE"}],"variable":[]}},"response":[{"id":"957120c9-3245-4ae3-aab1-5cc0f302c4f2","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/user/meta/v2/country?cc=US","host":["https://sandbox.api.getsafepay.com"],"path":["user","meta","v2","country"],"query":[{"key":"cc","value":"US"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 23 Oct 2024 10:49:39 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8d7129612fb5cdfd-SIN"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"api_version\": \"v2\",\n    \"data\": {\n        \"required\": [\n            \"AdministrativeArea\",\n            \"Locality\",\n            \"PostCode\",\n            \"StreetAddress\"\n        ],\n        \"AdministrativeArea\": {\n            \"name\": \"State/Province\",\n            \"options\": [\n                {\n                    \"id\": \"AL\",\n                    \"name\": \"Alabama\"\n                },\n                {\n                    \"id\": \"AK\",\n                    \"name\": \"Alaska\"\n                },\n                {\n                    \"id\": \"AZ\",\n                    \"name\": \"Arizona\"\n                },\n                {\n                    \"id\": \"AR\",\n                    \"name\": \"Arkansas\"\n                },\n                {\n                    \"id\": \"CA\",\n                    \"name\": \"California\"\n                },\n                {\n                    \"id\": \"CO\",\n                    \"name\": \"Colorado\"\n                },\n                {\n                    \"id\": \"CT\",\n                    \"name\": \"Connecticut\"\n                },\n                {\n                    \"id\": \"DE\",\n                    \"name\": \"Delaware\"\n                },\n                {\n                    \"id\": \"DC\",\n                    \"name\": \"District of Columbia\"\n                },\n                {\n                    \"id\": \"FL\",\n                    \"name\": \"Florida\"\n                },\n                {\n                    \"id\": \"GA\",\n                    \"name\": \"Georgia\"\n                },\n                {\n                    \"id\": \"HI\",\n                    \"name\": \"Hawaii\"\n                },\n                {\n                    \"id\": \"ID\",\n                    \"name\": \"Idaho\"\n                },\n                {\n                    \"id\": \"IL\",\n                    \"name\": \"Illinois\"\n                },\n                {\n                    \"id\": \"IN\",\n                    \"name\": \"Indiana\"\n                },\n                {\n                    \"id\": \"IA\",\n                    \"name\": \"Iowa\"\n                },\n                {\n                    \"id\": \"KS\",\n                    \"name\": \"Kansas\"\n                },\n                {\n                    \"id\": \"KY\",\n                    \"name\": \"Kentucky\"\n                },\n                {\n                    \"id\": \"LA\",\n                    \"name\": \"Louisiana\"\n                },\n                {\n                    \"id\": \"ME\",\n                    \"name\": \"Maine\"\n                },\n                {\n                    \"id\": \"MD\",\n                    \"name\": \"Maryland\"\n                },\n                {\n                    \"id\": \"MA\",\n                    \"name\": \"Massachusetts\"\n                },\n                {\n                    \"id\": \"MI\",\n                    \"name\": \"Michigan\"\n                },\n                {\n                    \"id\": \"MN\",\n                    \"name\": \"Minnesota\"\n                },\n                {\n                    \"id\": \"MS\",\n                    \"name\": \"Mississippi\"\n                },\n                {\n                    \"id\": \"MO\",\n                    \"name\": \"Missouri\"\n                },\n                {\n                    \"id\": \"MT\",\n                    \"name\": \"Montana\"\n                },\n                {\n                    \"id\": \"NE\",\n                    \"name\": \"Nebraska\"\n                },\n                {\n                    \"id\": \"NV\",\n                    \"name\": \"Nevada\"\n                },\n                {\n                    \"id\": \"NH\",\n                    \"name\": \"New Hampshire\"\n                },\n                {\n                    \"id\": \"NJ\",\n                    \"name\": \"New Jersey\"\n                },\n                {\n                    \"id\": \"NM\",\n                    \"name\": \"New Mexico\"\n                },\n                {\n                    \"id\": \"NY\",\n                    \"name\": \"New York\"\n                },\n                {\n                    \"id\": \"NC\",\n                    \"name\": \"North Carolina\"\n                },\n                {\n                    \"id\": \"ND\",\n                    \"name\": \"North Dakota\"\n                },\n                {\n                    \"id\": \"OH\",\n                    \"name\": \"Ohio\"\n                },\n                {\n                    \"id\": \"OK\",\n                    \"name\": \"Oklahoma\"\n                },\n                {\n                    \"id\": \"OR\",\n                    \"name\": \"Oregon\"\n                },\n                {\n                    \"id\": \"PA\",\n                    \"name\": \"Pennsylvania\"\n                },\n                {\n                    \"id\": \"RI\",\n                    \"name\": \"Rhode Island\"\n                },\n                {\n                    \"id\": \"SC\",\n                    \"name\": \"South Carolina\"\n                },\n                {\n                    \"id\": \"SD\",\n                    \"name\": \"South Dakota\"\n                },\n                {\n                    \"id\": \"TN\",\n                    \"name\": \"Tennessee\"\n                },\n                {\n                    \"id\": \"TX\",\n                    \"name\": \"Texas\"\n                },\n                {\n                    \"id\": \"UT\",\n                    \"name\": \"Utah\"\n                },\n                {\n                    \"id\": \"VT\",\n                    \"name\": \"Vermont\"\n                },\n                {\n                    \"id\": \"VA\",\n                    \"name\": \"Virginia\"\n                },\n                {\n                    \"id\": \"WA\",\n                    \"name\": \"Washington\"\n                },\n                {\n                    \"id\": \"WV\",\n                    \"name\": \"West Virginia\"\n                },\n                {\n                    \"id\": \"WI\",\n                    \"name\": \"Wisconsin\"\n                },\n                {\n                    \"id\": \"WY\",\n                    \"name\": \"Wyoming\"\n                }\n            ]\n        },\n        \"Locality\": {\n            \"name\": \"City\"\n        },\n        \"StreetAddress\": {\n            \"name\": \"Street Address\"\n        },\n        \"PostCode\": {\n            \"name\": \"ZipCode\"\n        }\n    }\n}"}],"_postman_id":"628d9c62-cb19-41bb-aa15-e97946542ba5"}],"id":"02f52bb1-da66-4df1-8a5e-1c8ebe5b1740","description":"<p>Meta fields for checkout.</p>\n","_postman_id":"02f52bb1-da66-4df1-8a5e-1c8ebe5b1740"},{"name":"Webhooks","item":[{"name":"Test Webhook","id":"4de812b1-60f2-45ab-aa4c-438a43df1456","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"<value>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"authorization.succeeded\",\n  \"identifier\": \"evt_191b441e-a6f2-4d00-8bf3-01f8d5934fdp\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/hooks/v2/test","description":"<p>Create a test webhook notification for a particular event. Supported webhook events are documented <a href=\"https://safepay-docs.netlify.app/developers/webhooks/webhook-types/\">here</a>.</p>\n<h5 id=\"request-body-schema\">Request body schema</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>event</code></td>\n<td>string</td>\n<td>Y</td>\n<td>The event kind.</td>\n</tr>\n<tr>\n<td><code>identifier</code></td>\n<td>string</td>\n<td>N</td>\n<td>An optional identifier that will be used as the <code>token</code> field in the test webhookpayload.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["client","hooks","v2","test"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"fc4553a5-3c50-470a-9a33-71e5f35534ea","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"authorization.succeeded\",\n  \"identifier\": \"evt_191b441e-a6f2-4d00-8bf3-01f8d5934fdp\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/hooks/v2/test"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 30 Jan 2025 11:14:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"29"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=kvNvYPMhY8LfHMRVTiJwb%2B7KfmtxD%2BNLydk1ccYEzKREOdjLSUuU2dlRMLqlXVhGeUTnQyD2drUSkKIFVIW6AVHkqQEST%2FXRP6jWP79aAPcJx68q8Z49EZLk7ZcZNocsyDN1QJpzH6CbED14\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"90a10a0d8e49e86a-KHI"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=28964&min_rtt=28911&rtt_var=10879&sent=4&recv=5&lost=0&retrans=0&sent_bytes=2335&recv_bytes=1080&delivery_rate=99616&cwnd=251&unsent_bytes=0&cid=f4525ef55750a521&ts=989&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"is_success\": true\n    }\n}"},{"id":"916ea891-e851-451f-9605-98a62448e14b","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"unsupported.event\",\n  \"identifier\": \"evt_191b441e-a6f2-4d00-8bf3-01f8d5934fdp\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/hooks/v2/test"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 30 Jan 2025 11:15:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"139"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=kzna5v%2FIi6v%2Bvp4O%2Brd9ebQ9A7REBcooj5TqqsOvveesmycrXGQm3ZG%2BlJsf2sVF5lRqGjaEkJyyHqH90FIO0c375UiWcZS7TtwDF%2BUSBQVYpJOD%2FFrnGD4lDpCfupH7eqjgOwSlFNMy5QY%2B\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"90a10ac90aece86a-KHI"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=28822&min_rtt=27831&rtt_var=8443&sent=34&recv=35&lost=0&retrans=0&sent_bytes=3747&recv_bytes=1572&delivery_rate=99616&cwnd=252&unsent_bytes=0&cid=f4525ef55750a521&ts=30353&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"details\": {\n        \"event\": \"event must be a supported webhook event\"\n    },\n    \"error\": \"validation error: event: event must be a supported webhook event\"\n}"},{"id":"aa96ac29-a15a-4365-b6da-263a4be269f7","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"event\": \"unsupported.event\",\n  \"identifier\": \"evt_191b441e-a6f2-4d00-8bf3-01f8d5934fdp\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/hooks/v2/test"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 30 Jan 2025 11:15:29 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"222"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=sCsHwy4GDnHw9aqS24IaCV8rgA49Wy43wnJrlF3gKpTXUGlLi3MPoEbfeomh0YPWX413G2jEUeEBC82otLrdIyz3BpoRXnG51uDKsGolIEqvfOl1m7GP5TKmeUo0GNNUalp0e863d6Rv9M6K\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"90a10b5be96be86a-KHI"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=29164&min_rtt=27831&rtt_var=7016&sent=58&recv=59&lost=0&retrans=0&sent_bytes=4872&recv_bytes=2063&delivery_rate=99616&cwnd=253&unsent_bytes=0&cid=f4525ef55750a521&ts=53759&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt_client: missing jwt token, strategies/secret: could not fetch client, error: Resource with this identifier not found]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"4de812b1-60f2-45ab-aa4c-438a43df1456"}],"id":"145c76d5-6958-46b9-bfde-5e5972408575","description":"<p>Webhooks are crucial for a successful integration with Safepay, and the only way you'll receive automatic updates about events that are not triggered by a request from your side, for example when a shopper completes a payment, or when a store admin refunds a payment.</p>\n<p>You can use webhooks to automate business processes, for example order management or downloading reports for accounting. For more information about webhooks please follow the documentation <a href=\"https://safepay-docs.netlify.app/developers/webhooks/overview/\">here</a>.</p>\n","_postman_id":"145c76d5-6958-46b9-bfde-5e5972408575"}],"id":"a4080e5d-51b9-42be-b049-a5d5ee54499a","description":"<p>Create trackers and process them using the <em>Order</em> API.</p>\n<h5 id=\"authentication\">Authentication</h5>\n<p>Payment APIs support JWT based authorization strategies for guest users. Some endpoints also support authorization by merchant API key and secret key. Refer to the API Authentication section to understand how to use each authentication strategy.</p>\n<h3 id=\"testing\">Testing</h3>\n<p>For testing against the Safepay sandbox (or development environment), we present the following payment methods that may be used to simulate various scenarios. Use any expiry in the future and any CVV e.g. <code>123</code>.</p>\n<h5 id=\"cards\">Cards</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Card PAN</th>\n<th>Description</th>\n<th><strong>Result</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>4111 1111 1111 1111</td>\n<td>Frictionless</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>5555 5555 5555 4444</td>\n<td>Frictionless</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>4456 5300 0000 1096</td>\n<td>Enrolled Visa</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>5200 0000 0000 1096</td>\n<td>Enrolled Mastercard</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>4456 5300 0000 1104</td>\n<td>Enrolled Visa</td>\n<td>Authentication failure</td>\n</tr>\n<tr>\n<td>5200 0000 0000 1104</td>\n<td>Enrolled Mastercard</td>\n<td>Authentication failure</td>\n</tr>\n<tr>\n<td>Any</td>\n<td>Set order amount to 405100 (in minor units of the currency)</td>\n<td>Insufficient balance</td>\n</tr>\n<tr>\n<td>Any</td>\n<td>Set order amount to 400400 (in minor units of the currency)</td>\n<td>Stolen card</td>\n</tr>\n<tr>\n<td>Any</td>\n<td>Set order amount to 405400 (in minor units of the currency)</td>\n<td>Expired card</td>\n</tr>\n</tbody>\n</table>\n</div><p>Additional cards may be found <a href=\"https://safepay-docs.netlify.app/developers/payment-journeys/test-cards/\">here</a>.</p>\n","_postman_id":"a4080e5d-51b9-42be-b049-a5d5ee54499a"},{"name":"Subscriptions","item":[{"name":"Plans","item":[{"name":"Create Plan","id":"a5deb75c-fab8-4a62-86b7-423a1e630104","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"currency\": \"USD\",\n    \"interval\": \"MONTH\",\n    \"type\": \"RECURRING\",\n    \"interval_count\": 1,\n    \"product\": \"bananas\",\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/","description":"<p>To create a Plan, choose how much and how often to charge your customers. The amount to charge can be controlled by the `amount` and `currency` fields while the frequency can be controlled by the `interval`, `interval_count` and `number_of_billing_cycles`. Safepay also allows you to provide your customers with a free trial for any number of days you specify by modifying the `trial_period_days` field.</p>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Y</td>\n<td>Name, meant to be displayable to the customer.</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>int64</td>\n<td>Y</td>\n<td>The base price amount to be charged, should be in a currency's lowest denomination.</td>\n</tr>\n<tr>\n<td>currency</td>\n<td>string</td>\n<td>Y</td>\n<td>The base price currency. Three-letter ISO currency code, in uppercase.</td>\n</tr>\n<tr>\n<td>interval_count</td>\n<td>int32</td>\n<td>Y</td>\n<td>The number of intervals (specified in the interval field) between subscription billings.</td>\n</tr>\n<tr>\n<td>interval</td>\n<td>PlanInterval</td>\n<td>Y</td>\n<td>The frequecy at which a subscription is billed. One of DAY, WEEK, MONTH or YEAR.</td>\n</tr>\n<tr>\n<td>product</td>\n<td>string</td>\n<td>Y</td>\n<td>The product whose pricing this plan determines.</td>\n</tr>\n<tr>\n<td>type</td>\n<td>PlanType</td>\n<td>Y</td>\n<td>Whether the plan is for a one-time purchase or a recurring (subscription) purchase. One of ONE_TIME or RECURRING.</td>\n</tr>\n<tr>\n<td>trial_period_days</td>\n<td>int32</td>\n<td>Optional</td>\n<td>Default number of trial days when subscribing a customer to this plan.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>Optional</td>\n<td>Description, meant to be displayable to the customer.</td>\n</tr>\n<tr>\n<td>active</td>\n<td>bool</td>\n<td>Y</td>\n<td>Whether the plan could be used for new purchases.</td>\n</tr>\n<tr>\n<td>number_of_billing_cycles</td>\n<td>int32</td>\n<td>optional</td>\n<td>Specifies the number of billing cycles that the plan will last. This field is ignored for ONE_TIME plan.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"request_id\": \"\",\n        \"plan_id\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","plans","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"925b31bc-89dd-407e-8ef0-74856245c8ef","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"currency\": \"PKR\",\n    \"interval\": \"MONTH\",\n    \"type\": \"RECURRING\",\n    \"interval_count\": 1,\n    \"product\": \"bananas\",\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:05:43 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2b8fdac8121e3-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\",\n        \"plan_id\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\"\n    }\n}"},{"id":"cb66bde8-dfe0-420b-b801-56808ed66bc6","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"currency\": \"PKR\",\n    \"interval\": \"MONTHLY\",\n    \"merchant_api_key\": \"abcd\",\n    \"product\": \"bananas\",\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 07:54:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2a8341a6921e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"9984bf73-17c2-41bb-8b2f-615ac3f62c01","name":"400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"currency\": \"PKR\",\n    \"interval\": \"MONTH\",\n    \"merchant_api_key\": \"abcd\",\n    \"product\": \"bananas\",\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 07:58:09 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"35"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2ade8d9ed21e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"type: cannot be blank.\"\n}"},{"id":"a0e015f1-ab6a-4421-9b2a-cc5e43f0956a","name":"500","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"amount\": \"100\",\n    \"currency\": \"PKR\",\n    \"interval\": \"MONTHL\",\n    \"merchant_api_key\": \"abcd\",\n    \"product\": \"bananas\",\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 07:56:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"73"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2abc19e6c21e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"proto: (line 4:17): invalid value for enum type: \\\"MONTHLY\\\"\"\n}"}],"_postman_id":"a5deb75c-fab8-4a62-86b7-423a1e630104"},{"name":"Find Plan","id":"2276b2f4-c74f-495c-a9ee-e39d796ed677","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/","description":"<p>Retrieves the plan with the given ID.</p>\n<p>By passing in the Plan ID in the URL, you can retrieve details about the Plan</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the Plan object</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"plan\": {\n            \"token\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\",\n            \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n            \"name\": \"\",\n            \"amount\": \"100\",\n            \"currency\": \"PKR\",\n            \"interval_count\": 1,\n            \"interval\": \"MONTH\",\n            \"product\": \"bananas\",\n            \"type\": \"RECURRING\",\n            \"trial_period_days\": 0,\n            \"description\": \"\",\n            \"created_at\": \"2023-09-29T08:05:44Z\",\n            \"updated_at\": \"2023-09-29T08:05:44Z\",\n            \"active\": true,\n            \"archived\": false,\n            \"number_of_billing_cycles\": 0,\n            \"apply_amount_change_on_existing_subscriptions\": false,\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100\"\n            }\n        },\n        \"request_id\": \"\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","plans","v1","plan_d4869a78-0036-4d66-97bd-6afeb5282bcd",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"8c83dc9b-c8d5-4773-88f9-7eed8acebc17","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:10:32 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2c00cd8ac21e3-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"plan\": {\n            \"token\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\",\n            \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n            \"name\": \"\",\n            \"amount\": \"100\",\n            \"currency\": \"PKR\",\n            \"interval_count\": 1,\n            \"interval\": \"MONTH\",\n            \"product\": \"bananas\",\n            \"type\": \"RECURRING\",\n            \"trial_period_days\": 0,\n            \"description\": \"\",\n            \"created_at\": \"2023-09-29T08:05:44Z\",\n            \"updated_at\": \"2023-09-29T08:05:44Z\",\n            \"active\": true,\n            \"archived\": false,\n            \"number_of_billing_cycles\": 0,\n            \"apply_amount_change_on_existing_subscriptions\": false,\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100\"\n            }\n        },\n        \"request_id\": \"\"\n    }\n}"},{"id":"a94c8d5a-a15a-4875-bc23-046a2e68e36e","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:10:52 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"242"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2c08dcec721e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header, strategies/tbt: missing time based token]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"94b21b44-0b1b-4abd-86b9-e3b2c12f73f8","name":"404","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282b/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:11:12 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"27"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2c10a091121e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"plan not found\"\n}"}],"_postman_id":"2276b2f4-c74f-495c-a9ee-e39d796ed677"},{"name":"Update Plan","id":"75353021-a044-4980-9ede-c39b272bb947","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"product\": \"bananas\",\n    \"name\": \"new plan name\",\n    \"description\": \"\",\n    \"trial_period_days\": 10,\n    \"active\": false\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/","description":"<p>Updates an existing plan to match the specified parameters.</p>\n<p>By setting the <code>active</code> parameter to <code>false</code> no new subscriptions will be allowed to subscribe to this plan but existing subscriptions will continue to be charged until each subscription either runs its course or is explicitly paused or cancelled.</p>\n<p>By changing the value of <code>trial_period_days</code> only new subscriptions will be affected. Existing subscriptions will continue to refer to the previous <code>trial_period_days</code> value.</p>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>product</td>\n<td>string</td>\n<td>optional</td>\n<td>The new product whose pricing this plan determines.</td>\n</tr>\n<tr>\n<td>active</td>\n<td>bool</td>\n<td>optional</td>\n<td>Whether the plan could be used for new purchases.</td>\n</tr>\n<tr>\n<td>trial_period_days</td>\n<td>int32</td>\n<td>optional</td>\n<td>Default number of trial days when subscribing a customer to this plan.</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>optional</td>\n<td>Name, meant to be displayable to the customer.</td>\n</tr>\n<tr>\n<td>description</td>\n<td>string</td>\n<td>optional</td>\n<td>Description, meant to be displayable to the customer.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Response:</p>\n<p>A successful request to this endpoint will update the plan with the provided parameters and return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"request_id\": \"\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","plans","v1","plan_d4869a78-0036-4d66-97bd-6afeb5282bcd",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"e49516bc-9602-40e5-93e4-39c3053695c9","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"product\": \"bananas\",\n    \"name\": \"new plan name\",\n    \"description\": \"\",\n    \"trial_period_days\": 10,\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:20:37 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"27"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2ced58fa421e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\"\n    }\n}"},{"id":"0ebb4c40-e6aa-4f9f-87dd-cf0efbe986a3","name":"404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"product\": \"bananas\",\n    \"name\": \"new plan name\",\n    \"description\": \"\",\n    \"trial_period_days\": 10,\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcv/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:20:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"27"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2cf3feacb21e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"plan not found\"\n}"},{"id":"68576cca-1b89-4412-8230-dd13143a51f3","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"product\": \"bananas\",\n    \"name\": \"new plan name\",\n    \"description\": \"\",\n    \"trial_period_days\": 10,\n    \"active\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:21:12 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2cfb10db421e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"75353021-a044-4980-9ede-c39b272bb947"},{"name":"Search Plans","id":"0ecc0c56-e4ad-4fc7-86e5-d175c852fefa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/search?currencies=PKR&limit=&page=&sort_by=&direction=","description":"<p>Search for plans you’ve previously created using the supported filters.</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"plans\": [\n            {\n                \"token\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\",\n                \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n                \"name\": \"new plan name\",\n                \"amount\": \"100\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MONTH\",\n                \"product\": \"bananas\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 10,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-29T08:05:44Z\",\n                \"updated_at\": \"2023-09-29T08:50:58Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 0,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100\"\n                }\n            },\n            {\n                \"token\": \"plan_43834bc5-8c59-43ec-9931-296ecee37db9\",\n                \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n                \"name\": \"\",\n                \"amount\": \"100\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MONTH\",\n                \"product\": \"bananas\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-29T07:59:16Z\",\n                \"updated_at\": \"2023-09-29T07:59:16Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 0,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100\"\n                }\n            }\n        ],\n        \"count\": 2,\n        \"sort_by\": \"\",\n        \"direction\": \"\"\n    }\n}\n\n</code></pre>\n<p>The <code>data</code> property will contain the list of plans that have been searched for while the <code>count</code> will indicate how many results were returned. The <code>sort_by</code> and <code>direction</code> fields are returned based on what was provided in the request</p>\n","urlObject":{"path":["client","plans","v1","search"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"disabled":true,"description":{"content":"<p>Filter for specific Plan IDs</p>\n","type":"text/plain"},"key":"plan_ids","value":""},{"disabled":true,"description":{"content":"<p>Filter for specific intervals</p>\n","type":"text/plain"},"key":"intervals","value":""},{"disabled":true,"description":{"content":"<p>Filter for specific products</p>\n","type":"text/plain"},"key":"products","value":""},{"description":{"content":"<p>Filter for specific currencies</p>\n","type":"text/plain"},"key":"currencies","value":"PKR"},{"description":{"content":"<p>Limit search results to a value</p>\n","type":"text/plain"},"key":"limit","value":""},{"description":{"content":"<p>Paginate search results</p>\n","type":"text/plain"},"key":"page","value":""},{"description":{"content":"<p>Sort by specifies the field use to sort data e.g. <code>created_at</code></p>\n","type":"text/plain"},"key":"sort_by","value":""},{"description":{"content":"<p>Direction specifies the data sort order either ASC or DESC</p>\n","type":"text/plain"},"key":"direction","value":""},{"disabled":true,"key":"currencies","value":"USD"}],"variable":[]}},"response":[{"id":"68ddbb2c-248d-48bf-8b0e-ef3ae99c90f8","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/client/plans/v1/search","host":["https://sandbox.api.getsafepay.com"],"path":["client","plans","v1","search"],"query":[{"key":"plan_ids","value":null,"description":"Filter for specific Plan IDs","type":"text","disabled":true},{"key":"intervals","value":null,"description":"Filter for specific intervals","type":"text","disabled":true},{"key":"products","value":null,"description":"Filter for specific products","type":"text","disabled":true},{"key":"currencies","value":null,"description":"Filter for specific currencies","type":"text","disabled":true},{"key":"limit","value":null,"description":"Limit search results to a value","type":"text","disabled":true},{"key":"page","value":null,"description":"Paginate search results","type":"text","disabled":true},{"key":"sort_by","value":null,"description":"Sort by specifies the field use to sort data e.g. `created_at`","type":"text","disabled":true},{"key":"direction","value":null,"description":"Direction specifies the data sort order either ASC or DESC","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:37:26 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2e77968ef21e6-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"plans\": [\n            {\n                \"token\": \"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd\",\n                \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n                \"name\": \"new plan name\",\n                \"amount\": \"100\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MONTH\",\n                \"product\": \"bananas\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 10,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-29T08:05:44Z\",\n                \"updated_at\": \"2023-09-29T08:29:22Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 0,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100\"\n                }\n            },\n            {\n                \"token\": \"plan_43834bc5-8c59-43ec-9931-296ecee37db9\",\n                \"merchant_api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n                \"name\": \"\",\n                \"amount\": \"100\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MONTH\",\n                \"product\": \"bananas\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-29T07:59:16Z\",\n                \"updated_at\": \"2023-09-29T07:59:16Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 0,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100\"\n                }\n            }\n        ],\n        \"count\": 2,\n        \"sort_by\": \"\",\n        \"direction\": \"\"\n    }\n}"},{"id":"4ec91501-a34c-4047-a9c7-bde4a9094fb7","name":"401","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/client/plans/v1/search","host":["https://sandbox.api.getsafepay.com"],"path":["client","plans","v1","search"],"query":[{"key":"plan_ids","value":null,"description":"Filter for specific Plan IDs","type":"text","disabled":true},{"key":"intervals","value":null,"description":"Filter for specific intervals","type":"text","disabled":true},{"key":"products","value":null,"description":"Filter for specific products","type":"text","disabled":true},{"key":"currencies","value":null,"description":"Filter for specific currencies","type":"text","disabled":true},{"key":"limit","value":null,"description":"Limit search results to a value","type":"text","disabled":true},{"key":"page","value":null,"description":"Paginate search results","type":"text","disabled":true},{"key":"sort_by","value":null,"description":"Sort by specifies the field use to sort data e.g. `created_at`","type":"text","disabled":true},{"key":"direction","value":null,"description":"Direction specifies the data sort order either ASC or DESC","type":"text","disabled":true}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:38:15 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2e8ab8af621e6-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"f26e282f-6c22-4273-9f04-46544ad6c7ff","name":"400","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/client/plans/v1/search?plan_ids=plan_d4869a78-0036-4d66-97bd-6afeb5282bcd&intervals=qsqweqwe&products=&currencies=&limit=&page=&sort_by=&direction=","host":["https://sandbox.api.getsafepay.com"],"path":["client","plans","v1","search"],"query":[{"key":"plan_ids","value":"plan_d4869a78-0036-4d66-97bd-6afeb5282bcd","description":"Filter for specific Plan IDs","type":"text"},{"key":"intervals","value":"qsqweqwe","description":"Filter for specific intervals","type":"text"},{"key":"products","value":"","description":"Filter for specific products","type":"text"},{"key":"currencies","value":"","description":"Filter for specific currencies","type":"text"},{"key":"limit","value":"","description":"Limit search results to a value","type":"text"},{"key":"page","value":"","description":"Paginate search results","type":"text"},{"key":"sort_by","value":"","description":"Sort by specifies the field use to sort data e.g. `created_at`","type":"text"},{"key":"direction","value":"","description":"Direction specifies the data sort order either ASC or DESC","type":"text"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 08:39:10 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"52"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e2ea011f6e21e6-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"intervals: (0: must be a valid value.).\"\n}"}],"_postman_id":"0ecc0c56-e4ad-4fc7-86e5-d175c852fefa"},{"name":"Archive Plan","id":"723391b3-04f3-43de-a6a9-5f03e4dc3e15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/","description":"<p>Archiving plans means new subscribers can’t be added. Existing subscribers aren’t affected. By passing in the <code>plan_id</code> in the URL, you can archive a plan that you no longer need. Archived plans will not show up in your search results. Archiving a plan is a one-way action, meaning that once a plan is archived, it can not be unarchived.</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"data\": {\n        \"request_id\": \"\"\n    }\n}\n\n</code></pre>","urlObject":{"path":["client","plans","v1","plan_d4869a78-0036-4d66-97bd-6afeb5282bcd",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"651308b5-5a6c-4303-92c4-948a6ee7c844","name":"404","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcb/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:03:39 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"27"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e30dd5c80e21e6-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"plan not found\"\n}"},{"id":"9ff8f5bb-82f6-4200-93e5-412c1a71ef51","name":"401","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:03:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e30e41caf021e6-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"1be0dc21-bf58-4e67-867f-14d0c013279a","name":"200","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/client/plans/v1/plan_d4869a78-0036-4d66-97bd-6afeb5282bcd/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:04:07 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"27"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e30e8e3d9821e6-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\"\n    }\n}"}],"_postman_id":"723391b3-04f3-43de-a6a9-5f03e4dc3e15"}],"id":"81430c7a-2d9d-49bf-a336-f670d58ffccb","description":"<p>A plan is a configuration for recurring payment processing, it contains the amount to debit or credit and the frequency of payment processing. For instance, you are running a software-as-a-service business (saas), you have three service types:</p>\n<ul>\n<li>Bronze plan, $15 USD/ mo</li>\n<li>Silver plan, $30 USD / mo</li>\n<li>Gold plan, $45 USD / mo</li>\n</ul>\n<p>To debit your customer montly, you can create three plan entities on Safepay corresponding to your three service types. Plans can be easily configured using the Merchant Dashboard or through the following APIs</p>\n","_postman_id":"81430c7a-2d9d-49bf-a336-f670d58ffccb"},{"name":"Subscriptions","item":[{"name":"Find Subscription","id":"e8a1967c-06d6-4ae1-b2dc-1de817b84e58","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d541","description":"<p>Retrieves the subscription with the given ID.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>token</code></td>\n<td>string</td>\n<td>Unique identifier for the subscription object.</td>\n</tr>\n<tr>\n<td><code>plan_id</code></td>\n<td>string</td>\n<td>ID of the plan that a subscription has subscribed to.</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>string</td>\n<td>ID of the user that owns the subscription.</td>\n</tr>\n<tr>\n<td><code>user</code></td>\n<td>User</td>\n<td>The user details</td>\n</tr>\n<tr>\n<td><code>merchant</code></td>\n<td>Merchant</td>\n<td>The merchant that offers the subscription</td>\n</tr>\n<tr>\n<td><code>instrument_id</code></td>\n<td>string</td>\n<td>ID of the user's saved card details.</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>SubscriptionStatus</td>\n<td>Represents the status of a subscription.</td>\n</tr>\n<tr>\n<td><code>billing_cycle_anchor</code></td>\n<td>Timestamp</td>\n<td>Represents the first and subsequent billing dates of a subscription.</td>\n</tr>\n<tr>\n<td><code>price_amount</code></td>\n<td>int64</td>\n<td>The base price amount to be charged, should be in currency's lowest denomination.</td>\n</tr>\n<tr>\n<td><code>price_currency</code></td>\n<td>string</td>\n<td>The base price currency. Three-letter ISO currency code, in uppercase.</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>string</td>\n<td>The amount of outstanding charges associated with the subscription. Balance could be of -ve/+ve value depending on the prorated adjustments. Balance is zero for normal subscription flow.</td>\n</tr>\n<tr>\n<td><code>start_date</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp when the subscription was first started.</td>\n</tr>\n<tr>\n<td><code>end_date</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp when the subscription was ended. This field stays nil if subscription has not ended.</td>\n</tr>\n<tr>\n<td><code>trial_start_date</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp when the subscription's trial period was started. API provided trial_start_date will override the subscription's plan details.</td>\n</tr>\n<tr>\n<td><code>trial_end_date</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp when the subscription's trial period will end. API provided trial_end_date will override the subscription's plan details.</td>\n</tr>\n<tr>\n<td><code>cancel_at_period_end</code></td>\n<td>bool</td>\n<td>Whether an active subscription is scheduled to be canceled at the end of the current period.</td>\n</tr>\n<tr>\n<td><code>canceled_at</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp when the subscription was canceled by the system.</td>\n</tr>\n<tr>\n<td><code>created_at</code></td>\n<td>Timestamp</td>\n<td>Timestamp when the subscription object was created.</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>Timestamp</td>\n<td>Timestamp when the subscription object was updated.</td>\n</tr>\n<tr>\n<td><code>plan</code></td>\n<td>Plan</td>\n<td>Represents the plan that the subscription has subscribed.</td>\n</tr>\n<tr>\n<td><code>current_period_start_date</code></td>\n<td>Timestamp</td>\n<td>The start timestamp for the current billing period.</td>\n</tr>\n<tr>\n<td><code>current_period_end_date</code></td>\n<td>Timestamp</td>\n<td>The end timestamp for the current billing period.</td>\n</tr>\n<tr>\n<td><code>last_paid_date</code></td>\n<td>Timestamp</td>\n<td>Represents the timestamp of the last paid billing cycle. This field is nil for trailing (future start) subscriptions.</td>\n</tr>\n<tr>\n<td><code>current_billing_cycle</code></td>\n<td>int32</td>\n<td>The current billing cycle of the subscription. It's incremented each time the subscription passes the current_period_end_date.</td>\n</tr>\n<tr>\n<td><code>paused_at</code></td>\n<td>Timestamp</td>\n<td>Time when the subsciption was paused.</td>\n</tr>\n<tr>\n<td><code>resumed_at</code></td>\n<td>Timestamp</td>\n<td>Time when the subscription was resumed after pause.</td>\n</tr>\n<tr>\n<td><code>never_expires</code></td>\n<td>bool</td>\n<td>Whether the subscription expires after certain billing cycles (specified in the number_of_billing_cycles field) or is it an indefinite period subscription.</td>\n</tr>\n<tr>\n<td><code>number_of_billing_cycles</code></td>\n<td>int32</td>\n<td>Represents the number of billing cycles that a subscription will last. This field is nil when never_expires = true.</td>\n</tr>\n<tr>\n<td><code>merchant_api_key</code></td>\n<td>string</td>\n<td>API key of the merchant that owns the subscription.</td>\n</tr>\n<tr>\n<td><code>price_money</code></td>\n<td>PriceMoney</td>\n<td>It basically holds the amount and currency.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"subscription-statuses\">Subscription Statuses:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>ACTIVE</code></td>\n<td>Once the first invoice is paid, the subscription moves into an active state</td>\n</tr>\n<tr>\n<td><code>PAST_DUE</code></td>\n<td>A subscription becomes past_due when payment is required but cannot be paid (due to failed payment or awaiting additional user actions)</td>\n</tr>\n<tr>\n<td><code>UNPAID</code></td>\n<td>Once Safepay has exhausted all payment retry attempts, the subscription will become unpaid (depending on your subscriptions settings).</td>\n</tr>\n<tr>\n<td><code>CANCELED</code></td>\n<td>Once Stripe has exhausted all payment retry attempts, the subscription will become canceled (depending on your subscriptions settings).</td>\n</tr>\n<tr>\n<td><code>INCOMPLETE</code></td>\n<td>A subscription moves into incomplete if the initial payment attempt fails</td>\n</tr>\n<tr>\n<td><code>INCOMPLETE_EXPIRED</code></td>\n<td>If the first payment is not paid within 23 hours, the subscription transitions to incomplete_expired. This is a terminal state, the open payment will be voided and no further payments will be generated.</td>\n</tr>\n<tr>\n<td><code>TRAILING</code></td>\n<td>A subscription that is currently in a trial period is trialing and moves to active when the trial period is over.</td>\n</tr>\n<tr>\n<td><code>ENDED</code></td>\n<td>Once a subscription has completed all its payments it will transition into the ended state</td>\n</tr>\n<tr>\n<td><code>PAUSED</code></td>\n<td>If the subscription is paused it will be in this state</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id></h5>\n<p>Response:</p>\n<p>A successful request to this endpoint will return a subscription object</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_c841ea40-613c-41a3-8984-7cb11f66d541\",\n            \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"user\": {\n                \"identifier\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"contact\": {\n                    \"id\": 0,\n                    \"token\": \"\",\n                    \"user\": \"\",\n                    \"first_name\": \"wasay\",\n                    \"last_name\": \"Usmani\",\n                    \"email\": \"ausmani@getsafepay.com\",\n                    \"phone\": \"+92 312 3423232\",\n                    \"is_default\": true,\n                    \"created_at\": null,\n                    \"updated_at\": null\n                },\n                \"avatar\": \"\",\n                \"wallet\": [\n                    {\n                        \"id\": 0,\n                        \"token\": \"inst_5546b317-d701-4e4b-9f3d-f448e1a36184\",\n                        \"user\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                        \"kind\": \"CybersourceCard\",\n                        \"contact\": {\n                            \"id\": 0,\n                            \"token\": \"\",\n                            \"user\": \"\",\n                            \"first_name\": \"wasay\",\n                            \"last_name\": \"Usmani\",\n                            \"email\": \"ausmani@getsafepay.com\",\n                            \"phone\": \"+92 312 3423232\",\n                            \"is_default\": false,\n                            \"created_at\": null,\n                            \"updated_at\": null\n                        },\n                        \"created_at\": \"2023-07-28T15:53:35Z\",\n                        \"updated_at\": \"2023-07-28T15:53:35Z\"\n                    }\n                ]\n            },\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"CANCELED\",\n            \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n            \"price_amount\": \"10000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-26T07:14:24Z\",\n            \"trial_start_date\": \"2023-09-26T07:14:24Z\",\n            \"trial_end_date\": \"2023-09-26T07:14:24Z\",\n            \"cancel_at_period_end\": false,\n            \"canceled_at\": \"2023-09-26T07:14:55Z\",\n            \"created_at\": \"2023-09-26T07:14:24Z\",\n            \"updated_at\": \"2023-09-26T07:14:55Z\",\n            \"plan\": {\n                \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Safepay demo\",\n                \"amount\": \"10000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"Slides\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 1,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-26T07:02:46Z\",\n                \"updated_at\": \"2023-09-26T07:17:45Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-26T07:14:24Z\",\n            \"current_period_end_date\": \"2023-09-26T07:15:23Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"10000\"\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","subscriptions","v1","sub_c841ea40-613c-41a3-8984-7cb11f66d541"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"02478232-b12b-48d7-8b8a-30521380cf23","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d541"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:46:12 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e34c344cb321f5-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_c841ea40-613c-41a3-8984-7cb11f66d541\",\n            \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"user\": {\n                \"identifier\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"contact\": {\n                    \"id\": 0,\n                    \"token\": \"\",\n                    \"user\": \"\",\n                    \"first_name\": \"wasay\",\n                    \"last_name\": \"Usmani\",\n                    \"email\": \"ausmani@getsafepay.com\",\n                    \"phone\": \"+92 312 3423232\",\n                    \"is_default\": true,\n                    \"created_at\": null,\n                    \"updated_at\": null\n                },\n                \"avatar\": \"\",\n                \"wallet\": [\n                    {\n                        \"id\": 0,\n                        \"token\": \"inst_5546b317-d701-4e4b-9f3d-f448e1a36184\",\n                        \"user\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                        \"kind\": \"CybersourceCard\",\n                        \"contact\": {\n                            \"id\": 0,\n                            \"token\": \"\",\n                            \"user\": \"\",\n                            \"first_name\": \"wasay\",\n                            \"last_name\": \"Usmani\",\n                            \"email\": \"ausmani@getsafepay.com\",\n                            \"phone\": \"+92 312 3423232\",\n                            \"is_default\": false,\n                            \"created_at\": null,\n                            \"updated_at\": null\n                        },\n                        \"created_at\": \"2023-07-28T15:53:35Z\",\n                        \"updated_at\": \"2023-07-28T15:53:35Z\"\n                    }\n                ]\n            },\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"CANCELED\",\n            \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n            \"price_amount\": \"10000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-26T07:14:24Z\",\n            \"trial_start_date\": \"2023-09-26T07:14:24Z\",\n            \"trial_end_date\": \"2023-09-26T07:14:24Z\",\n            \"cancel_at_period_end\": false,\n            \"canceled_at\": \"2023-09-26T07:14:55Z\",\n            \"created_at\": \"2023-09-26T07:14:24Z\",\n            \"updated_at\": \"2023-09-26T07:14:55Z\",\n            \"plan\": {\n                \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Safepay demo\",\n                \"amount\": \"10000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"Slides\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 1,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-26T07:02:46Z\",\n                \"updated_at\": \"2023-09-26T07:17:45Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-26T07:14:24Z\",\n            \"current_period_end_date\": \"2023-09-26T07:15:23Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"10000\"\n            }\n        }\n    }\n}"},{"id":"64f4d17c-5e0f-420c-823d-e8d11caef28f","name":"404","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d542"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:51:53 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"35"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e35481aa6e21ee-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"subscription not found\"\n}"},{"id":"725ec694-db4d-4f0d-becb-e6d770f9d9f1","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d541"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 09:52:10 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e354e81e4621ee-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"e8a1967c-06d6-4ae1-b2dc-1de817b84e58"},{"name":"Search Subscriptions","id":"5a6abf5a-de3d-4c4a-a744-b53e80dbe75b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/search","description":"<p>Search for subscriptions that have been created across all your plans using the provided filters below</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"subscriptions\": [\n            {\n                \"token\": \"sub_c841ea40-613c-41a3-8984-7cb11f66d541\",\n                \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"CANCELED\",\n                \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n                \"price_amount\": \"10000\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-26T07:14:24Z\",\n                \"trial_start_date\": \"2023-09-26T07:14:24Z\",\n                \"trial_end_date\": \"2023-09-26T07:14:24Z\",\n                \"cancel_at_period_end\": false,\n                \"canceled_at\": \"2023-09-26T07:14:55Z\",\n                \"created_at\": \"2023-09-26T07:14:24Z\",\n                \"updated_at\": \"2023-09-26T07:14:55Z\",\n                \"plan\": {\n                    \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"Safepay demo\",\n                    \"amount\": \"10000\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"Slides\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 1,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-26T07:02:46Z\",\n                    \"updated_at\": \"2023-09-26T07:17:45Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 10,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"10000\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-26T07:14:24Z\",\n                \"current_period_end_date\": \"2023-09-26T07:15:23Z\",\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 10,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            }\n        ],\n        \"count\": \"18\",\n        \"direction\": \"\",\n        \"sort_by\": \"\"\n    }\n}\n\n</code></pre>\n<p>The <code>data</code> property will contain the list of plans that have been searched for while the <code>count</code> will indicate how many total results are found. The <code>sort_by</code> and <code>direction</code> fields are returned based on what was provided in the request</p>\n","urlObject":{"path":["client","subscriptions","v1","search"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"disabled":true,"description":{"content":"<p>Filter by subscription IDs</p>\n","type":"text/plain"},"key":"tokens","value":""},{"disabled":true,"description":{"content":"<p>Filter by plan IDs</p>\n","type":"text/plain"},"key":"plan_ids","value":""},{"disabled":true,"description":{"content":"<p>Filter by User IDs</p>\n","type":"text/plain"},"key":"user_ids","value":""},{"disabled":true,"description":{"content":"<p>Filter by statuses</p>\n","type":"text/plain"},"key":"statuses","value":""},{"disabled":true,"description":{"content":"<p>Limit search results to a value</p>\n","type":"text/plain"},"key":"limit","value":""},{"disabled":true,"description":{"content":"<p>Paginate search results</p>\n","type":"text/plain"},"key":"page","value":""},{"disabled":true,"description":{"content":"<p>Sort by specifies the field use to sort data e.g. <code>created_at</code></p>\n","type":"text/plain"},"key":"sort_by","value":""},{"disabled":true,"description":{"content":"<p>Direction specifies the data sort order either ASC or DESC</p>\n","type":"text/plain"},"key":"direction","value":""}],"variable":[]}},"response":[{"id":"1cc9a841-e8c8-44bb-b8cf-814791133676","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/search"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 10:08:58 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e36d84c84c21f5-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"subscriptions\": [\n            {\n                \"token\": \"sub_c841ea40-613c-41a3-8984-7cb11f66d541\",\n                \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"CANCELED\",\n                \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n                \"price_amount\": \"10000\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-26T07:14:24Z\",\n                \"trial_start_date\": \"2023-09-26T07:14:24Z\",\n                \"trial_end_date\": \"2023-09-26T07:14:24Z\",\n                \"cancel_at_period_end\": false,\n                \"canceled_at\": \"2023-09-26T07:14:55Z\",\n                \"created_at\": \"2023-09-26T07:14:24Z\",\n                \"updated_at\": \"2023-09-26T07:14:55Z\",\n                \"plan\": {\n                    \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"Safepay demo\",\n                    \"amount\": \"10000\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"Slides\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 1,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-26T07:02:46Z\",\n                    \"updated_at\": \"2023-09-26T07:17:45Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 10,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"10000\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-26T07:14:24Z\",\n                \"current_period_end_date\": \"2023-09-26T07:15:23Z\",\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 10,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            {\n                \"token\": \"sub_f2aecc20-deb7-4ca5-89b1-575222f23842\",\n                \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-26T07:12:00Z\",\n                \"price_amount\": \"10000\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-26T07:03:00Z\",\n                \"end_date\": \"2023-09-26T07:12:05Z\",\n                \"trial_start_date\": \"2023-09-26T07:03:00Z\",\n                \"trial_end_date\": \"2023-09-26T07:03:00Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-26T07:03:00Z\",\n                \"updated_at\": \"2023-09-26T07:12:05Z\",\n                \"plan\": {\n                    \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"Safepay demo\",\n                    \"amount\": \"10000\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"Slides\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 1,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-26T07:02:46Z\",\n                    \"updated_at\": \"2023-09-26T07:17:45Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 10,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"10000\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-26T07:12:00Z\",\n                \"current_period_end_date\": \"2023-09-26T07:12:59Z\",\n                \"last_paid_date\": \"2023-09-26T07:12:05Z\",\n                \"current_billing_cycle\": 10,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 10,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            {\n                \"token\": \"sub_cfd5628e-0f1d-4419-b582-a6dc511d7b22\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-26T06:59:34Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-26T06:59:34Z\",\n                \"end_date\": \"2023-09-26T07:00:06Z\",\n                \"trial_start_date\": \"2023-09-26T06:59:34Z\",\n                \"trial_end_date\": \"2023-09-26T06:59:34Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-26T06:59:34Z\",\n                \"updated_at\": \"2023-09-26T07:00:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-26T06:59:34Z\",\n                \"current_period_end_date\": \"2023-09-26T07:00:33Z\",\n                \"last_paid_date\": \"2023-09-26T07:00:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_af6ae7ee-3049-4a6a-aaf2-7d4d8e9b36bc\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-25T10:08:11Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-25T10:08:11Z\",\n                \"end_date\": \"2023-09-25T10:09:06Z\",\n                \"trial_start_date\": \"2023-09-25T10:08:11Z\",\n                \"trial_end_date\": \"2023-09-25T10:08:11Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-25T10:08:11Z\",\n                \"updated_at\": \"2023-09-25T10:09:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-25T10:08:11Z\",\n                \"current_period_end_date\": \"2023-09-25T10:09:10Z\",\n                \"last_paid_date\": \"2023-09-25T10:09:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_fc1c335d-b819-4255-b605-02e4e5af502e\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-25T09:48:59Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-25T09:48:59Z\",\n                \"end_date\": \"2023-09-25T09:49:05Z\",\n                \"trial_start_date\": \"2023-09-25T09:48:59Z\",\n                \"trial_end_date\": \"2023-09-25T09:48:59Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-25T09:48:59Z\",\n                \"updated_at\": \"2023-09-25T09:49:05Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-25T09:48:59Z\",\n                \"current_period_end_date\": \"2023-09-25T09:49:58Z\",\n                \"last_paid_date\": \"2023-09-25T09:49:05Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_91d5cde2-6cd2-46ef-97fc-d7f1bef6f436\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-25T09:45:50Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-25T09:45:50Z\",\n                \"end_date\": \"2023-09-25T09:46:06Z\",\n                \"trial_start_date\": \"2023-09-25T09:45:50Z\",\n                \"trial_end_date\": \"2023-09-25T09:45:50Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-25T09:45:50Z\",\n                \"updated_at\": \"2023-09-25T09:46:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-25T09:45:50Z\",\n                \"current_period_end_date\": \"2023-09-25T09:46:49Z\",\n                \"last_paid_date\": \"2023-09-25T09:46:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_addb5764-2e10-4b71-920a-117e0fcc9ed2\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-25T09:36:20Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-25T09:36:20Z\",\n                \"end_date\": \"2023-09-25T09:37:06Z\",\n                \"trial_start_date\": \"2023-09-25T09:36:20Z\",\n                \"trial_end_date\": \"2023-09-25T09:36:20Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-25T09:36:20Z\",\n                \"updated_at\": \"2023-09-25T09:37:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-25T09:36:20Z\",\n                \"current_period_end_date\": \"2023-09-25T09:37:19Z\",\n                \"last_paid_date\": \"2023-09-25T09:37:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_6f90a5af-c4fe-4ad7-9907-1227d570e171\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-25T07:08:25Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-25T07:08:25Z\",\n                \"end_date\": \"2023-09-25T07:09:06Z\",\n                \"trial_start_date\": \"2023-09-25T07:08:25Z\",\n                \"trial_end_date\": \"2023-09-25T07:08:25Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-25T07:08:25Z\",\n                \"updated_at\": \"2023-09-25T07:09:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-25T07:08:25Z\",\n                \"current_period_end_date\": \"2023-09-25T07:09:24Z\",\n                \"last_paid_date\": \"2023-09-25T07:09:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_a6691521-2fa6-4433-9cff-bbeee70cc32b\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-23T13:54:32Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-23T13:54:32Z\",\n                \"end_date\": \"2023-09-23T13:55:06Z\",\n                \"trial_start_date\": \"2023-09-23T13:54:32Z\",\n                \"trial_end_date\": \"2023-09-23T13:54:32Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-23T13:54:32Z\",\n                \"updated_at\": \"2023-09-23T13:55:06Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-23T13:54:32Z\",\n                \"current_period_end_date\": \"2023-09-23T13:55:31Z\",\n                \"last_paid_date\": \"2023-09-23T13:55:06Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            },\n            {\n                \"token\": \"sub_63b55c27-9797-4a05-961c-6ebd1a6b41cc\",\n                \"plan_id\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n                \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-23T13:52:39Z\",\n                \"price_amount\": \"12300\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-23T13:52:39Z\",\n                \"end_date\": \"2023-09-23T13:53:07Z\",\n                \"trial_start_date\": \"2023-09-23T13:52:39Z\",\n                \"trial_end_date\": \"2023-09-23T13:52:39Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-23T13:52:39Z\",\n                \"updated_at\": \"2023-09-23T13:53:07Z\",\n                \"plan\": {\n                    \"token\": \"plan_a29a46d8-59aa-49b3-bbd3-659798dc7f06\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"sada\",\n                    \"amount\": \"12300\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"12sa\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 0,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-22T11:33:57Z\",\n                    \"updated_at\": \"2023-09-26T07:00:33Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 1,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"12300\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-23T13:52:39Z\",\n                \"current_period_end_date\": \"2023-09-23T13:53:38Z\",\n                \"last_paid_date\": \"2023-09-23T13:53:07Z\",\n                \"current_billing_cycle\": 1,\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 1,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"12300\"\n                }\n            }\n        ],\n        \"count\": \"18\",\n        \"direction\": \"\",\n        \"sort_by\": \"\"\n    }\n}"},{"id":"4b429055-4c9b-4487-95bc-3f9dffbf1ceb","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/search"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 10:09:24 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e36e2e7cc521f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"5a6abf5a-de3d-4c4a-a744-b53e80dbe75b"},{"name":"Update Subscription","id":"4f45fa04-9f9d-4bcb-9696-64677aea7385","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n    \"trial_end\": \"2023-09-26T07:14:24Z\",\n    \"cancel_at_period_end\": true,\n    \"pause_collection\": {\n        \"payment_collection_behavior\": \"KEEP_AS_READY\"\n    },\n    \"never_expires\": true,\n    \"number_of_billing_cycles\": 1,\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3","description":"<p>Updates an existing subscription to match the specified parameters.</p>\n<p>Its important to understand how updates to a subscription work especially when it comes to pausing a subscription, the proration behavior and how they work together.</p>\n<p>Changing the <code>billing_cycle_anchor</code> will change the date the subscription is billed. Setting the value to <code>now</code> resets the subscription’s billing cycle anchor to the current time (in UTC).</p>\n<p>Changing the <code>trial_end</code> will chage the date the <code>trial_period</code> ends. This will always overwrite any trials that might apply via a subscribed plan. If set, <code>trial_end</code> will override the default trial period of the plan the customer is being subscribed to. The special value <code>now</code> can be provided to end the customer’s trial immediately.</p>\n<p>Setting the <code>trial_end</code> to a future date and <code>billing_cycle_anchor</code> to <code>now</code> will result in an error since that is not allowed.</p>\n<p>If the subscription is currently in a trial period, setting the <code>billing_cycle_anchor</code> to <code>now</code> will result in an error</p>\n<p>If <code>pause_collection</code> is specified, payment collection for this subscription will be paused. based on the <code>payment_collection_behavior</code></p>\n<h5 id=\"payment-collection-behavior\">Payment Collection Behavior</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Use case</strong></th>\n<th><strong>Value to use</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Offer services for free</td>\n<td><code>MARK_VOID</code></td>\n</tr>\n<tr>\n<td>Unable to provide services</td>\n<td><code>MARK_VOID</code></td>\n</tr>\n<tr>\n<td>Temporarily offer services for free and collect payment later</td>\n<td><code>KEEP_AS_READY</code></td>\n</tr>\n<tr>\n<td>Cannot collect payment because customer has defaulted</td>\n<td><code>MARK_AS_UNCOLLECTABLE</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>Proration Behavior</p>\n<p>Determines how to handle prorations when the billing cycle changes (e.g., resetting <code>billing_cycle_anchor=now.</code> If you don't want to prorate, set the <code>proration_behavior</code> to <code>NONE_PRORATION_BEHAVIOR</code> .The default value is <code>CREATE_PRORATIONS</code></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Value</strong></th>\n<th><strong>Explanation</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>CREATE_PRORATIONS</code></td>\n<td>Calculate the prorated amount and charge it at the next subscription</td>\n</tr>\n<tr>\n<td><code>ALWAYS_TRANSACTION</code></td>\n<td>Calculate the prorated amount and charge it immediately</td>\n</tr>\n<tr>\n<td><code>NONE_PRORATION_BEHAVIOR</code></td>\n<td>Disable creating prorations in this request.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"request-body-schema\">Request body schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>billing_cycle_anchor</td>\n<td>string</td>\n<td>optional</td>\n<td>Either <code>now</code> or unchanged. Setting the value to <code>now</code> resets the subscription’s billing cycle anchor to the current time (in UTC).</td>\n</tr>\n<tr>\n<td>trial_end</td>\n<td>string</td>\n<td>optional</td>\n<td>When provided, will reset the trial end date if subscription is in trial, otherwise it will turn on the subscription trial along with resetting the billing_cycle_anchor. trial_end=now will immediately end the trial. Possible values (timestamp or \"now\").</td>\n</tr>\n<tr>\n<td>cancel_at_period_end</td>\n<td>bool</td>\n<td>optional</td>\n<td>When true, will cancel the subsctiption at the end of current billing period.</td>\n</tr>\n<tr>\n<td>pause_collection</td>\n<td>PauseCollection</td>\n<td></td>\n<td>If specified, payment collection for this subscription will be paused.</td>\n</tr>\n<tr>\n<td>never_expires</td>\n<td>bool</td>\n<td></td>\n<td>When true, will also reset number_of_billing_cycles to nil.</td>\n</tr>\n<tr>\n<td>number_of_billing_cycles</td>\n<td>int32</td>\n<td>optional</td>\n<td>When provided, will be considered only if never_expires = false.</td>\n</tr>\n<tr>\n<td>proration_behavior</td>\n<td>ProrationBehavior</td>\n<td></td>\n<td>Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial). The default value is CREATE_PRORATIONS.</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3\",\n            \"plan_id\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"PAUSED\",\n            \"billing_cycle_anchor\": \"2023-09-22T10:52:34Z\",\n            \"price_amount\": \"100000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_end_date\": \"2023-09-22T10:52:34Z\",\n            \"cancel_at_period_end\": false,\n            \"created_at\": \"2023-09-22T10:52:34Z\",\n            \"updated_at\": \"2023-09-29T10:46:05Z\",\n            \"plan\": {\n                \"token\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Shapatar plan\",\n                \"amount\": \"100000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"pk_102\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-22T10:51:48Z\",\n                \"updated_at\": \"2023-09-22T10:51:48Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-22T10:52:34Z\",\n            \"current_period_end_date\": \"2023-09-22T10:53:33Z\",\n            \"paused_at\": \"2023-09-29T10:46:05Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100000\"\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","subscriptions","v1","sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"34d13642-e193-4fdd-94bd-a92f07a71770","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n    \"trial_end\": \"2023-09-26T07:14:24Z\",\n    \"cancel_at_period_end\": true,\n    \"pause_collection\": {\n        \"payment_collection_behavior\": \"KEEP_AS_READY\"\n    },\n    \"never_expires\": true,\n    \"number_of_billing_cycles\": 1,\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 10:46:05 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3a3e469b421e3-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3\",\n            \"plan_id\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"PAUSED\",\n            \"billing_cycle_anchor\": \"2023-09-22T10:52:34Z\",\n            \"price_amount\": \"100000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_end_date\": \"2023-09-22T10:52:34Z\",\n            \"cancel_at_period_end\": false,\n            \"created_at\": \"2023-09-22T10:52:34Z\",\n            \"updated_at\": \"2023-09-29T10:46:05Z\",\n            \"plan\": {\n                \"token\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Shapatar plan\",\n                \"amount\": \"100000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"pk_102\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-22T10:51:48Z\",\n                \"updated_at\": \"2023-09-22T10:51:48Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-22T10:52:34Z\",\n            \"current_period_end_date\": \"2023-09-22T10:53:33Z\",\n            \"paused_at\": \"2023-09-29T10:46:05Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100000\"\n            }\n        }\n    }\n}"},{"id":"22e4b62b-2e1f-41d2-b761-5eb84975c604","name":"404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n    \"trial_end\": \"2023-09-26T07:14:24Z\",\n    \"cancel_at_period_end\": true,\n    \"pause_collection\": {\n        \"payment_collection_behavior\": \"KEEP_AS_READY\"\n    },\n    \"never_expires\": true,\n    \"number_of_billing_cycles\": 1,\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 10:46:34 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"35"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3a4a0f8b321e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"subscription not found\"\n}"},{"id":"27237e99-afb9-4994-8c48-05faeb98d344","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"2023-09-26T07:14:24Z\",\n    \"trial_end\": \"2023-09-26T07:14:24Z\",\n    \"cancel_at_period_end\": true,\n    \"pause_collection\": {\n        \"payment_collection_behavior\": \"KEEP_AS_READY\"\n    },\n    \"never_expires\": true,\n    \"number_of_billing_cycles\": 1,\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 10:46:49 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3a4fbfa6221e3-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"4f45fa04-9f9d-4bcb-9696-64677aea7385"},{"name":"Resume Subscription","id":"7d172202-fed1-4d29-8bfa-59fcece95229","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"now\",\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce/resumption","description":"<p>Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption transaction is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become <code>active</code>, and if payment fails the subscription will be <code>past_due</code>. The resumption invoice will void automatically if not paid by the expiration date.</p>\n<p>If the subscription is in a trial phase and you set the <code>billing_cycle_anchor</code> to <code>now</code> the subscription status remains Paused till the new payment transaction is authorized.</p>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>billing_cycle_anchor</td>\n<td>string</td>\n<td>optional</td>\n<td>Either 'now' or unchanged. Setting the value to now resets the subscription’s billing cycle anchor to the current time (in UTC). Setting no value (aka nil) advances the subscription’s billing cycle anchor to the period that surrounds the current time.</td>\n</tr>\n<tr>\n<td>proration_behavior</td>\n<td>ProrationBehavior</td>\n<td>optional (default is <code>CREATE_PRORATIONS</code>)</td>\n<td>Determines how to handle prorations when the billing cycle changes (e.g. when resetting billing_cycle_anchor=now)</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["client","subscriptions","v1","sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce","resumption"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"9d49356a-bc7f-4886-8f6d-98aa2401b326","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"now\",\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b2/resumption"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:31:42 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3e6b95d4d21ea-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"a21ae824-0401-4d0b-8b55-eb71bb73d76f","name":"404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"now\",\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d541/resumption"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:31:58 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"35"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3e7238c9021ea-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"subscription not found\"\n}"},{"id":"03270929-ec6b-49f0-850d-6303e181fee0","name":"500","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"billing_cycle_anchor\": \"now\",\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_c841ea40-613c-41a3-8984-7cb11f66d541/resumption"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:32:32 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"33"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3e7f3f9c721ea-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"something went wrong\"\n}"},{"id":"b2fa6a0b-8c20-429e-882d-68bf3249c01d","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"proration_behavior\": \"CREATE_PRORATIONS\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce/resumption"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:36:28 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3edb51c9421ea-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"subscription\": {\n            \"token\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n            \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n            \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n            \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n            \"status\": \"ACTIVE\",\n            \"billing_cycle_anchor\": \"2023-09-29T11:36:29Z\",\n            \"price_amount\": \"10000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-30T11:33:49Z\",\n            \"trial_start_date\": \"2023-09-29T11:33:49Z\",\n            \"trial_end_date\": \"2023-09-30T11:33:49Z\",\n            \"cancel_at_period_end\": false,\n            \"created_at\": \"2023-09-29T11:33:49Z\",\n            \"updated_at\": \"2023-09-29T11:36:29Z\",\n            \"plan\": {\n                \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Safepay demo\",\n                \"amount\": \"10000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"Slides\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 1,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-26T07:02:46Z\",\n                \"updated_at\": \"2023-09-26T07:17:45Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-29T11:36:29Z\",\n            \"current_period_end_date\": \"2023-09-29T11:37:28Z\",\n            \"paused_at\": \"2023-09-29T11:34:16Z\",\n            \"resumed_at\": \"2023-09-29T11:36:29Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"10000\"\n            }\n        }\n    }\n}"}],"_postman_id":"7d172202-fed1-4d29-8bfa-59fcece95229"},{"name":"Cancel Subscription","id":"004ded24-fa86-4df0-8168-8fcef915ead5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b2/cancel","description":"<p>Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.</p>\n<p>Note, however, that any pending transaction items that have been created will still be charged for at the end of the period,</p>\n<p>By default, upon subscription cancellation, Safepay will stop automatic collection of all finalized payments for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription.</p>\n<p>Once cancelled, subscriptions cannot be resumed and a new subscription will have to be created. If you would like to temporarily pause payment collection for a subscription, you should Update Subscription and pass in the appropriate <code>pause_collection_behavior</code> parameter. Paused subscriptions can be resumed at any time but cancelled subscriptions are terminal.</p>\n<p>Additionally, only subscriptions that are in the following states can be cancelled</p>\n<ul>\n<li><p><code>TRAILING</code></p>\n</li>\n<li><p><code>INCOMPLETE</code></p>\n</li>\n<li><p><code>ACTIVE</code></p>\n</li>\n</ul>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3\",\n            \"plan_id\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"CANCELED\",\n            \"billing_cycle_anchor\": \"2023-09-26T11:21:27Z\",\n            \"price_amount\": \"100000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_end_date\": \"2023-08-26T07:14:24Z\",\n            \"cancel_at_period_end\": true,\n            \"canceled_at\": \"2023-09-29T11:21:36Z\",\n            \"created_at\": \"2023-09-22T10:52:34Z\",\n            \"updated_at\": \"2023-09-29T11:21:36Z\",\n            \"plan\": {\n                \"token\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Shapatar plan\",\n                \"amount\": \"100000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"pk_102\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-22T10:51:48Z\",\n                \"updated_at\": \"2023-09-22T10:51:48Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-26T11:21:27Z\",\n            \"current_period_end_date\": \"2023-09-29T11:22:26Z\",\n            \"paused_at\": \"2023-09-29T10:46:05Z\",\n            \"resumed_at\": \"2023-09-29T11:21:27Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100000\"\n            }\n        }\n    }\n}\n\n</code></pre>\n<p>As you can see the <code>status</code> of the subscription is now <code>CANCELED</code></p>\n","urlObject":{"path":["client","subscriptions","v1","sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b2","cancel"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"7db4b902-9ef3-4e0e-9a65-75bc9d9339a6","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3/cancel"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:21:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3d7eb096421f2-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"request_id\": \"\",\n        \"subscription\": {\n            \"token\": \"sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3\",\n            \"plan_id\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n            \"user_id\": \"user_9ac8cc06-1fae-4f12-9636-a877eb8170a4\",\n            \"instrument_id\": \"tms_39f40aec-ee62-411c-a759-2af2ffd3be44\",\n            \"status\": \"CANCELED\",\n            \"billing_cycle_anchor\": \"2023-09-26T11:21:27Z\",\n            \"price_amount\": \"100000\",\n            \"price_currency\": \"PKR\",\n            \"balance\": \"0\",\n            \"start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_start_date\": \"2023-09-22T10:52:34Z\",\n            \"trial_end_date\": \"2023-08-26T07:14:24Z\",\n            \"cancel_at_period_end\": true,\n            \"canceled_at\": \"2023-09-29T11:21:36Z\",\n            \"created_at\": \"2023-09-22T10:52:34Z\",\n            \"updated_at\": \"2023-09-29T11:21:36Z\",\n            \"plan\": {\n                \"token\": \"plan_51591242-0f31-4d77-a712-dd27e3dddb38\",\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"name\": \"Shapatar plan\",\n                \"amount\": \"100000\",\n                \"currency\": \"PKR\",\n                \"interval_count\": 1,\n                \"interval\": \"MINUTE_TEST_INTERVAL\",\n                \"product\": \"pk_102\",\n                \"type\": \"RECURRING\",\n                \"trial_period_days\": 0,\n                \"description\": \"\",\n                \"created_at\": \"2023-09-22T10:51:48Z\",\n                \"updated_at\": \"2023-09-22T10:51:48Z\",\n                \"active\": true,\n                \"archived\": false,\n                \"number_of_billing_cycles\": 10,\n                \"apply_amount_change_on_existing_subscriptions\": false,\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"100000\"\n                }\n            },\n            \"current_period_start_date\": \"2023-09-26T11:21:27Z\",\n            \"current_period_end_date\": \"2023-09-29T11:22:26Z\",\n            \"paused_at\": \"2023-09-29T10:46:05Z\",\n            \"resumed_at\": \"2023-09-29T11:21:27Z\",\n            \"never_expires\": false,\n            \"number_of_billing_cycles\": 10,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"100000\"\n            }\n        }\n    }\n}"},{"id":"9b850267-d525-4990-9744-2c3500dc4b74","name":"406","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b3/cancel"},"status":"Not Acceptable","code":406,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:20:35 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3d66be83621f2-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"cannot cancel subscription\"\n}"},{"id":"6bda5b72-4d31-4b47-8800-a5f4cf28b1f8","name":"500","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/client/subscriptions/v1/sub_ee09b0f9-974f-4dee-b1b3-4ad8dad2e7b2/cancel"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:21:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e3d860888621f2-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"sql: no rows in result set\"\n}"}],"_postman_id":"004ded24-fa86-4df0-8168-8fcef915ead5"}],"id":"7a7fd456-9b8c-408b-8a10-fcab6d3280e3","description":"<p>Now that we've learnt about Plans, lets move on to Subscriptions. While plans hold information about how you wish to charge your customer (frequency, intervals etc) along with what they are purchasing, subscriptions to that plan are created by customers when they interact with Safepay Checkout. Subscriptions are what allow Safepay to charge your customer on a recurring basis based on the parameters configured in the plan.  </p>\n<p>Subscriptions cannot be created using APIs since a customer has to subscribe to a plan. Subscriptions are created by a customer interacting with Safepay Checkout. You can however, use our SDKs to generate a Checkout URL that a customer can be redirected to so that they are able to subscribe to one of your plans. Refer to our Integration Guides to learn more.</p>\n","_postman_id":"7a7fd456-9b8c-408b-8a10-fcab6d3280e3"},{"name":"Transactions","item":[{"name":"Search Transactions","id":"10db781f-4038-493c-b091-23f9dd83d56d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/search?tokens&states&currencies&instrument_ids&subscription_ids&user_ids&limit=&page=&sort_by&direction","description":"<p>Search for transactions that have been created across all subscription using the provided filters below</p>\n<p>Transaction States</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>NO_TRANSACTION_STATUS</td>\n</tr>\n<tr>\n<td>READY</td>\n</tr>\n<tr>\n<td>QUEUED</td>\n</tr>\n<tr>\n<td>COMPLETE</td>\n</tr>\n<tr>\n<td>RETRY</td>\n</tr>\n<tr>\n<td>FAILED</td>\n</tr>\n<tr>\n<td>UNCOLLECTIBLE</td>\n</tr>\n<tr>\n<td>VOID</td>\n</tr>\n<tr>\n<td>DISPUTED</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"transactions\": [\n            {\n                \"token\": \"txn_17553398-b91d-41e9-ae47-165e194d06a1\",\n                \"charge_at\": \"2023-09-29T11:45:29Z\",\n                \"charged\": \"2023-09-29T11:46:05Z\",\n                \"status\": \"COMPLETE\",\n                \"amount\": \"10000\",\n                \"currency\": \"PKR\",\n                \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n                \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n                \"created_at\": \"2023-09-29T11:45:06Z\",\n                \"updated_at\": \"2023-09-29T11:46:05Z\",\n                \"failures\": [],\n                \"subscription\": null,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n                \"transaction_type\": \"PAYMENT\",\n                \"proration\": false,\n                \"tracker\": \"\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            }\n        ],\n        \"count\": 58,\n        \"direction\": \"\",\n        \"sort_by\": \"\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","transactions","v1","search"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"description":{"content":"<p>Filter by transaction IDs</p>\n","type":"text/plain"},"key":"tokens","value":null},{"description":{"content":"<p>Filter by transaction states </p>\n","type":"text/plain"},"key":"states","value":null},{"description":{"content":"<p>Filter by currencies</p>\n","type":"text/plain"},"key":"currencies","value":null},{"description":{"content":"<p>Filter by instrument IDs</p>\n","type":"text/plain"},"key":"instrument_ids","value":null},{"description":{"content":"<p>Filter by subscription IDs</p>\n","type":"text/plain"},"key":"subscription_ids","value":null},{"description":{"content":"<p>Filter by User IDs</p>\n","type":"text/plain"},"key":"user_ids","value":null},{"description":{"content":"<p>Limit search results</p>\n","type":"text/plain"},"key":"limit","value":""},{"description":{"content":"<p>Paginate search results</p>\n","type":"text/plain"},"key":"page","value":""},{"description":{"content":"<p>Sort by specifies the field use to sort data e.g. <code>created_at</code></p>\n","type":"text/plain"},"key":"sort_by","value":null},{"description":{"content":"<p>Direction specifies the data sort order either ASC or DESC</p>\n","type":"text/plain"},"key":"direction","value":null}],"variable":[]}},"response":[{"id":"df262c90-b750-4766-b92d-dd3a79db05db","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/client/transactions/v1/search?tokens&states&currencies&instrument_ids&subscription_ids&user_ids&limit=1&page=1&sort_by&direction","host":["https://sandbox.api.getsafepay.com"],"path":["client","transactions","v1","search"],"query":[{"key":"tokens","value":null,"type":"text"},{"key":"states","value":null,"type":"text"},{"key":"currencies","value":null,"type":"text"},{"key":"instrument_ids","value":null,"type":"text"},{"key":"subscription_ids","value":null,"type":"text"},{"key":"user_ids","value":null,"type":"text"},{"key":"limit","value":"1","type":"text"},{"key":"page","value":"1","type":"text"},{"key":"sort_by","value":null,"type":"text"},{"key":"direction","value":null,"type":"text"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:56:18 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e40ac83df921f5-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"transactions\": [\n            {\n                \"token\": \"txn_17553398-b91d-41e9-ae47-165e194d06a1\",\n                \"charge_at\": \"2023-09-29T11:45:29Z\",\n                \"charged\": \"2023-09-29T11:46:05Z\",\n                \"status\": \"COMPLETE\",\n                \"amount\": \"10000\",\n                \"currency\": \"PKR\",\n                \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n                \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n                \"created_at\": \"2023-09-29T11:45:06Z\",\n                \"updated_at\": \"2023-09-29T11:46:05Z\",\n                \"failures\": [],\n                \"subscription\": null,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n                \"transaction_type\": \"PAYMENT\",\n                \"proration\": false,\n                \"tracker\": \"\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            }\n        ],\n        \"count\": 58,\n        \"direction\": \"\",\n        \"sort_by\": \"\"\n    }\n}"},{"id":"f5cc8634-fe48-48e6-8e59-334ab3359fd9","name":"401","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/client/transactions/v1/search?tokens&states&currencies&instrument_ids&subscription_ids&user_ids&limit=1&page=1&sort_by&direction","host":["https://sandbox.api.getsafepay.com"],"path":["client","transactions","v1","search"],"query":[{"key":"tokens","value":null,"type":"text"},{"key":"states","value":null,"type":"text"},{"key":"currencies","value":null,"type":"text"},{"key":"instrument_ids","value":null,"type":"text"},{"key":"subscription_ids","value":null,"type":"text"},{"key":"user_ids","value":null,"type":"text"},{"key":"limit","value":"1","type":"text"},{"key":"page","value":"1","type":"text"},{"key":"sort_by","value":null,"type":"text"},{"key":"direction","value":null,"type":"text"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:57:09 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e40c049fea21f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"10db781f-4038-493c-b091-23f9dd83d56d"},{"name":"Find Transaction","id":"86c70033-d048-4224-915a-add9daee084e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1","description":"<p>Retrieves tranasction details based on the transaction ID</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"transaction\": {\n            \"token\": \"txn_17553398-b91d-41e9-ae47-165e194d06a1\",\n            \"charge_at\": \"2023-09-29T11:45:29Z\",\n            \"charged\": \"2023-09-29T11:46:05Z\",\n            \"status\": \"COMPLETE\",\n            \"amount\": \"10000\",\n            \"currency\": \"PKR\",\n            \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n            \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n            \"created_at\": \"2023-09-29T11:45:06Z\",\n            \"updated_at\": \"2023-09-29T11:46:05Z\",\n            \"failures\": [],\n            \"subscription\": {\n                \"token\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n                \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n                \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-29T11:45:29Z\",\n                \"price_amount\": \"10000\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-30T11:33:49Z\",\n                \"end_date\": \"2023-09-29T11:46:05Z\",\n                \"trial_start_date\": \"2023-09-29T11:33:49Z\",\n                \"trial_end_date\": \"2023-09-30T11:33:49Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-29T11:33:49Z\",\n                \"updated_at\": \"2023-09-29T11:46:05Z\",\n                \"plan\": {\n                    \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"Safepay demo\",\n                    \"amount\": \"10000\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"Slides\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 1,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-26T07:02:46Z\",\n                    \"updated_at\": \"2023-09-26T07:17:45Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 10,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"10000\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-29T11:45:29Z\",\n                \"current_period_end_date\": \"2023-09-29T11:46:28Z\",\n                \"last_paid_date\": \"2023-09-29T11:46:05Z\",\n                \"current_billing_cycle\": 10,\n                \"paused_at\": \"2023-09-29T11:34:16Z\",\n                \"resumed_at\": \"2023-09-29T11:36:29Z\",\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 10,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n            \"transaction_type\": \"PAYMENT\",\n            \"proration\": false,\n            \"tracker\": \"track_0805eb64-32bd-485f-b597-96a54e2898eb\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"10000\"\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","transactions","v1","txn_17553398-b91d-41e9-ae47-165e194d06a1"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"96926abd-37b4-4583-915c-3813402de923","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:59:23 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e40f4b6d8a21f5-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"transaction\": {\n            \"token\": \"txn_17553398-b91d-41e9-ae47-165e194d06a1\",\n            \"charge_at\": \"2023-09-29T11:45:29Z\",\n            \"charged\": \"2023-09-29T11:46:05Z\",\n            \"status\": \"COMPLETE\",\n            \"amount\": \"10000\",\n            \"currency\": \"PKR\",\n            \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n            \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n            \"created_at\": \"2023-09-29T11:45:06Z\",\n            \"updated_at\": \"2023-09-29T11:46:05Z\",\n            \"failures\": [],\n            \"subscription\": {\n                \"token\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n                \"plan_id\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n                \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n                \"status\": \"ENDED\",\n                \"billing_cycle_anchor\": \"2023-09-29T11:45:29Z\",\n                \"price_amount\": \"10000\",\n                \"price_currency\": \"PKR\",\n                \"balance\": \"0\",\n                \"start_date\": \"2023-09-30T11:33:49Z\",\n                \"end_date\": \"2023-09-29T11:46:05Z\",\n                \"trial_start_date\": \"2023-09-29T11:33:49Z\",\n                \"trial_end_date\": \"2023-09-30T11:33:49Z\",\n                \"cancel_at_period_end\": false,\n                \"created_at\": \"2023-09-29T11:33:49Z\",\n                \"updated_at\": \"2023-09-29T11:46:05Z\",\n                \"plan\": {\n                    \"token\": \"plan_48c249c4-b947-4617-9472-b28acffd3b64\",\n                    \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                    \"name\": \"Safepay demo\",\n                    \"amount\": \"10000\",\n                    \"currency\": \"PKR\",\n                    \"interval_count\": 1,\n                    \"interval\": \"MINUTE_TEST_INTERVAL\",\n                    \"product\": \"Slides\",\n                    \"type\": \"RECURRING\",\n                    \"trial_period_days\": 1,\n                    \"description\": \"\",\n                    \"created_at\": \"2023-09-26T07:02:46Z\",\n                    \"updated_at\": \"2023-09-26T07:17:45Z\",\n                    \"active\": true,\n                    \"archived\": false,\n                    \"number_of_billing_cycles\": 10,\n                    \"apply_amount_change_on_existing_subscriptions\": false,\n                    \"price_money\": {\n                        \"currency\": \"PKR\",\n                        \"amount\": \"10000\"\n                    }\n                },\n                \"current_period_start_date\": \"2023-09-29T11:45:29Z\",\n                \"current_period_end_date\": \"2023-09-29T11:46:28Z\",\n                \"last_paid_date\": \"2023-09-29T11:46:05Z\",\n                \"current_billing_cycle\": 10,\n                \"paused_at\": \"2023-09-29T11:34:16Z\",\n                \"resumed_at\": \"2023-09-29T11:36:29Z\",\n                \"never_expires\": false,\n                \"number_of_billing_cycles\": 10,\n                \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n                \"price_money\": {\n                    \"currency\": \"PKR\",\n                    \"amount\": \"10000\"\n                }\n            },\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n            \"transaction_type\": \"PAYMENT\",\n            \"proration\": false,\n            \"tracker\": \"track_0805eb64-32bd-485f-b597-96a54e2898eb\",\n            \"price_money\": {\n                \"currency\": \"PKR\",\n                \"amount\": \"10000\"\n            }\n        }\n    }\n}"},{"id":"b5114e9d-ed49-410e-a8b2-8cc5985120f7","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:59:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e40f9bf95121f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"4c1db60d-56f7-454b-be9e-c917a86b8eeb","name":"404","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 11:59:45 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"34"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e40fd69b6e21f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"transaction not found\"\n}"}],"_postman_id":"86c70033-d048-4224-915a-add9daee084e"},{"name":"Refund Transaction","id":"a4be7b32-1728-41a0-b35e-792f7afb27e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-SFPY-MERCHANT-SECRET"},{"key":"value","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc"}]},"isInherited":false},"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1/refund","description":"<p>Create a new refund transcation based on the original transaction ID.</p>\n<p>If a tranasction already has a refund transaction associated with it, this endpoint will return an error</p>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the new transcation object with <code>transaction_type</code> set to <code>REFUND</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"transaction\": {\n            \"token\": \"txn_0d30cb5b-33c3-4ae2-b295-93c8669e523f\",\n            \"charge_at\": \"2023-09-29T12:00:53.888546561Z\",\n            \"status\": \"READY\",\n            \"amount\": \"10000\",\n            \"currency\": \"PKR\",\n            \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n            \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n            \"created_at\": \"2023-09-29T12:00:53.888582029Z\",\n            \"updated_at\": \"2023-09-29T12:00:53.888582741Z\",\n            \"failures\": [],\n            \"subscription\": null,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n            \"transaction_type\": \"REFUND\",\n            \"proration\": false,\n            \"tracker\": \"\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["client","transactions","v1","txn_17553398-b91d-41e9-ae47-165e194d06a1","refund"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"b013726e-99c7-4167-b51e-527f1c42795a","name":"200","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1/refund"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 12:00:54 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e4117ff89421f5-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"transaction\": {\n            \"token\": \"txn_0d30cb5b-33c3-4ae2-b295-93c8669e523f\",\n            \"charge_at\": \"2023-09-29T12:00:53.888546561Z\",\n            \"status\": \"READY\",\n            \"amount\": \"10000\",\n            \"currency\": \"PKR\",\n            \"instrument_id\": \"tms_8637b5dd-c25f-463d-8cd0-216a54d98c6e\",\n            \"subscription_id\": \"sub_130aa5b2-9056-4c8e-b9c9-9149e68f17ce\",\n            \"created_at\": \"2023-09-29T12:00:53.888582029Z\",\n            \"updated_at\": \"2023-09-29T12:00:53.888582741Z\",\n            \"failures\": [],\n            \"subscription\": null,\n            \"merchant_api_key\": \"sec_faed47eb-0044-4968-b7e9-2fb7d7853eb7\",\n            \"user_id\": \"user_ebd81ebe-f302-47f4-83f1-62dc35cd8c63\",\n            \"transaction_type\": \"REFUND\",\n            \"proration\": false,\n            \"tracker\": \"\"\n        }\n    }\n}"},{"id":"b5e448a4-3380-4450-8c58-df2171b040f4","name":"401","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1/refund"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 12:00:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"200"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e411314d9221f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt: missing jwt token, strategies/secret: merchant webhook secret not found in the request header]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"b370ef71-4ddd-436f-8be9-6ffe724614be","name":"404","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a2/refund"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 12:01:06 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"34"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e411cbfdf221f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"transaction not found\"\n}"},{"id":"9cffaed7-f6ad-410e-8147-587e889047fc","name":"409","originalRequest":{"method":"POST","header":[],"url":"https://sandbox.api.getsafepay.com/client/transactions/v1/txn_17553398-b91d-41e9-ae47-165e194d06a1/refund"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 29 Sep 2023 12:01:15 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"48"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE, PATCH"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80e41205a91e21f5-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"a refund transaction already exists\"\n}"}],"_postman_id":"a4be7b32-1728-41a0-b35e-792f7afb27e2"}],"id":"ef197e0a-7c07-45c2-868e-6999c78c1d57","description":"<p>The Transaction APIs allow developers to search, find and refund transactions related to subscriptions. A Transaction is an object that is created as soon as a previous transaction has been processed.</p>\n<p>Transactions can either be of type <code>PAYMENT</code> meaning that an attempt will be made to charge a customer, or of type <code>REFUND</code> meaning an attempt will be made to refund a customer.</p>\n","_postman_id":"ef197e0a-7c07-45c2-868e-6999c78c1d57"}],"id":"1758a97c-b6a4-42f2-822c-234533b8a5da","description":"<p>Create and manage plans, subscriptions, recurring payments, and recurring revenue with the Safepay Billing APIs.</p>\n<p>With Subscriptions, customers make recurring payments for access to a plan. Subscriptions require you to retain more information about your customers than one-time purchases because you need to charge them in the future.</p>\n<h5 id=\"authentication\">Authentication:</h5>\n<p>Billing APIs support both API Key and JWT based authorization strategies. Refer to the API Authentication section to understand how to use each authentication strategy</p>\n","_postman_id":"1758a97c-b6a4-42f2-822c-234533b8a5da"},{"name":"Quick Links","item":[{"name":"V2","item":[{"name":"Create","event":[{"listen":"prerequest","script":{"id":"fd21abcc-22c2-4b4a-ab2e-d209197dd996","exec":["var moment = require('moment');","","pm.environment.set('tomorrowDate', moment().add(1, 'days').utc().format());"],"type":"text/javascript","packages":{}}}],"id":"ec720b27-3f22-4a84-a457-c2c35b705556","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/","urlObject":{"path":["invoice","quick-links","v2",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"a182b20b-258e-4398-9c13-f1150c29cd50","name":"200 - Manual Workflow","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"ba88ed11-f1cc-46fd-881d-855a3bdad469","name":"200 - Email Workflow","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"EMAIL\",\n    \"recipients\": [\"mahmed@gmail.com\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"2ec90823-e8d9-4395-ac45-a0ff008449ca","name":"200 - With Expiry","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"EMAIL\",\n    \"recipients\": [\"mahmed@gmail.com\"],\n    \"expiry\": \"{{tomorrowDate}}\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"7c21f1d5-85a8-4435-95cc-9412c3c4e56b","name":"404 - Invalid Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"ec720b27-3f22-4a84-a457-c2c35b705556"},{"name":"Find","event":[{"listen":"test","script":{"id":"fae59bf0-66f0-4713-9ab9-b51378826400","exec":["var jsonData = JSON.parse(responseBody);","pm.environment.set(\"quicklinkTBT\",  jsonData.data.tbt);"],"type":"text/javascript","packages":{}}}],"id":"4b337150-e13a-48a7-a2f9-58609068b569","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/link_291208af-ef95-4b7d-b171-aaaa16998d31","urlObject":{"path":["invoice","quick-links","v2","link_291208af-ef95-4b7d-b171-aaaa16998d31"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"fd7cfe2f-ddeb-4dd6-979f-b11bd0569e68","name":"200 - Success","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/link_291208af-ef95-4b7d-b171-aaaa16998d31"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"634be3be-64de-4eca-93bb-4078654942f0","name":"404 - Not Found","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v2/link_291208af-ef95-4b7d-b171-aaaa16998d31"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"4b337150-e13a-48a7-a2f9-58609068b569"}],"id":"39822195-8da2-4645-a6e2-ccc3cabd53a2","_postman_id":"39822195-8da2-4645-a6e2-ccc3cabd53a2","description":""},{"name":"Create Quick Link","id":"ca0d7283-b873-494e-845c-56cc2f663a05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/","description":"<p>Create a Quick Link by sending the following request body. All <code>amount</code>s are in the normal denomination of their respective currency. This means that passing in an amount as <code>150000</code> and currency as <code>PKR</code> will create a Quick Link requesting Rs 15,000 from the recipient.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<p>Valid currencies that can be provided are</p>\n<ul>\n<li><code>PKR</code></li>\n<li><code>USD</code></li>\n<li><code>GBP</code></li>\n<li><code>AED</code></li>\n<li><code>SAR</code></li>\n<li><code>EUR</code></li>\n<li><code>CAD</code></li>\n</ul>\n<p>To manually send the Quick Link through your own mediums (either through WhatsApp or present the link on your own platform) set the <code>workflow</code> value to be <code>MANUAL</code>.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Property</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>amount</code></td>\n<td>integer</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>workflow</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div><p>Response:</p>\n<p>A successfull request to this endpoint will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n        \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"number\": \"92243675\",\n        \"status\": \"CREATED\",\n        \"note\": \"For Zara handbag purchased through Import Fox\",\n        \"metadata\": [\n            {\n                \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"created_at\": \"0001-01-01T00:00:00Z\",\n                \"updated_at\": \"0001-01-01T00:00:00Z\"\n            }\n        ],\n        \"payment\": null,\n        \"recipients\": null,\n        \"total\": 15000,\n        \"currency\": \"PKR\",\n        \"workflow\": \"MANUAL\",\n        \"created_at\": \"2023-09-28T11:26:27.453829284Z\",\n        \"updated_at\": \"2023-09-28T11:26:27.453829385Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>The unique URL that can be sent to your customer or client can be retrieved by indexing the <code>data</code> object at the <code>matadata</code> level like so <code>data.metadata[0].recipient_view_url</code></p>\n","urlObject":{"path":["invoice","quick-links","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"14bbab15-045e-4d86-afb4-9e56f2271385","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:26:27 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dba1a89b57c904-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n        \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"number\": \"92243675\",\n        \"status\": \"CREATED\",\n        \"note\": \"For Zara handbag purchased through Import Fox\",\n        \"metadata\": [\n            {\n                \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"created_at\": \"0001-01-01T00:00:00Z\",\n                \"updated_at\": \"0001-01-01T00:00:00Z\"\n            }\n        ],\n        \"payment\": null,\n        \"recipients\": null,\n        \"total\": 15000,\n        \"currency\": \"PKR\",\n        \"workflow\": \"MANUAL\",\n        \"created_at\": \"2023-09-28T11:26:27.453829284Z\",\n        \"updated_at\": \"2023-09-28T11:26:27.453829385Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"942fd0fe-ee76-4f1c-afe5-579553231c57","name":"417","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"Expectation Failed","code":417,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:29:07 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"78"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dba5968b77c904-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"note: cannot be blank.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"462d5b91-7f52-43af-a420-f7af63dd367e","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n\t\"workflow\": \"MANUAL\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:29:26 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dba60c8b5dc904-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"ca0d7283-b873-494e-845c-56cc2f663a05"},{"name":"Email Quick Links","id":"06bd189b-934a-48c4-bb33-b0dd7596ef13","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n    \"workflow\": \"EMAIL\",\n\t\"recipients\": []\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/","description":"<p>Email a Quick Link by sending the following request body. All <code>amount</code>s are in the normal denomination of their respective currency. This means that passing in an amount as <code>150000</code> and currency as <code>PKR</code> will create a Quick Link requesting Rs 15,000 from the recipient.</p>\n<p>This endpoint is the same as the one above, however, by changing the value of the <code>workflow</code> and specifying a list of email addresses, Safepay will generate a unique Quick Link for each of your recipients specified in the <code>recipients</code> array and automatically send them an email with the Quick Link embedded inside of it.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<p>Valid currencies that can be provided are</p>\n<ul>\n<li><p><code>PKR</code></p>\n</li>\n<li><p><code>USD</code></p>\n</li>\n<li><p><code>GBP</code></p>\n</li>\n<li><p><code>AED</code></p>\n</li>\n<li><p><code>SAR</code></p>\n</li>\n<li><p><code>EUR</code></p>\n</li>\n<li><p><code>CAD</code></p>\n</li>\n</ul>\n<p>To have Safepay send the Quick Links through email to your recipients, set the <code>workflow</code> value as <code>EMAIL</code> and specifiy at least 1 recipient and a max of 10 recipients</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th></th>\n<th><strong>Type</strong></th>\n<th><strong>Required</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>amount</code></td>\n<td>integer</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>workflow</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>recipients</code></td>\n<td>[]string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will email each recipient a unique Quick Link and will return a response as follows  </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": [\n        {\n            \"id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"51688111\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_930af5ec-f4e9-4a0f-a31a-56a263ca1a82\",\n                    \"quick_link_id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"payment\": null,\n            \"recipients\": [\n                {\n                    \"id\": \"recp_70a4322f-af21-4a65-946d-275842672772\",\n                    \"quick_link_id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"email\": \"ziyadparekh@gmail.com\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"EMAIL\",\n            \"created_at\": \"2023-09-28T11:44:00.278477946Z\",\n            \"updated_at\": \"2023-09-28T11:44:00.278478045Z\"\n        },\n        {\n            \"id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"65014765\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_6bb54aa4-d45f-4eb7-96dc-1d6344a4056e\",\n                    \"quick_link_id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"payment\": null,\n            \"recipients\": [\n                {\n                    \"id\": \"recp_d1cebefe-987f-4c2a-82bb-2d02c49f9ef3\",\n                    \"quick_link_id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"email\": \"hzaidi@gmail.com\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"EMAIL\",\n            \"created_at\": \"2023-09-28T11:44:00.278488738Z\",\n            \"updated_at\": \"2023-09-28T11:44:00.27848882Z\"\n        }\n    ],\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n<p>As you can see in the example above, for each recipient (in this case 2) Safepay has generated two Quick Links and has added each recipient in the <code>recipients</code> property of the Quick Link. If you customer does not receive the Quick Link on his email, you can always fetch the Quick Link, retrieve the URL and send it to them manually.</p>\n","urlObject":{"path":["invoice","quick-links","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"239ccc24-2031-48c9-b527-b525e335a109","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n    \"workflow\": \"EMAIL\",\n\t\"recipients\": [\"ziyadparekh@gmail.com\", \"hzaidi@gmail.com\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:44:00 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dbbb60de4fd059-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"51688111\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_930af5ec-f4e9-4a0f-a31a-56a263ca1a82\",\n                    \"quick_link_id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"payment\": null,\n            \"recipients\": [\n                {\n                    \"id\": \"recp_70a4322f-af21-4a65-946d-275842672772\",\n                    \"quick_link_id\": \"link_7b6a30a6-2665-4ae6-af2f-67f9597e2bbe\",\n                    \"email\": \"ziyadparekh@gmail.com\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"EMAIL\",\n            \"created_at\": \"2023-09-28T11:44:00.278477946Z\",\n            \"updated_at\": \"2023-09-28T11:44:00.278478045Z\"\n        },\n        {\n            \"id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"65014765\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_6bb54aa4-d45f-4eb7-96dc-1d6344a4056e\",\n                    \"quick_link_id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"payment\": null,\n            \"recipients\": [\n                {\n                    \"id\": \"recp_d1cebefe-987f-4c2a-82bb-2d02c49f9ef3\",\n                    \"quick_link_id\": \"link_b8540e06-109e-4937-af99-c2a0a5b575cd\",\n                    \"email\": \"hzaidi@gmail.com\",\n                    \"created_at\": \"0001-01-01T00:00:00Z\",\n                    \"updated_at\": \"0001-01-01T00:00:00Z\"\n                }\n            ],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"EMAIL\",\n            \"created_at\": \"2023-09-28T11:44:00.278488738Z\",\n            \"updated_at\": \"2023-09-28T11:44:00.27848882Z\"\n        }\n    ],\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"2f1acb6c-855b-43d7-8a4a-5024289f32e7","name":"401","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n    \"workflow\": \"EMAIL\",\n\t\"recipients\": [\"ziyadparekh@gmail.com\", \"hzaidi@gmail.com\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:43:40 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dbbade1816d059-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"JWT is expired\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"95daba7b-54e2-4085-9e37-ce1dfb01081b","name":"417","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 15000,\n\t\"currency\": \"PKR\",\n\t\"note\": \"For Zara handbag purchased through Import Fox\",\n    \"workflow\": \"EMAIL\",\n\t\"recipients\": []\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/"},"status":"Expectation Failed","code":417,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:44:39 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"96"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dbbc55697fd059-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"recipients: need at least one recipient.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"06bd189b-934a-48c4-bb33-b0dd7596ef13"},{"name":"Find Quick Link","id":"70f51996-9158-4e97-a293-5186b7d8dd62","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c","description":"<p>Retrieves details about the Quick Link</p>\n<p>By passing in the unique Quick Link ID in the URL params, this endpoint will fetch details about the Quick Link.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"link\": {\n            \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"92243675\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                    \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                    \"created_at\": \"2023-09-28T11:26:27Z\",\n                    \"updated_at\": \"2023-09-28T11:26:27Z\"\n                }\n            ],\n            \"payment\": [],\n            \"recipients\": [],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"MANUAL\",\n            \"created_at\": \"2023-09-28T11:26:27Z\",\n            \"updated_at\": \"2023-09-28T11:26:27Z\"\n        },\n        \"client\": {\n            \"token\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"name\": \"Baked in Pakistan\",\n            \"description\": \"High end pâtisserie\",\n            \"email\": \"zparekh@getsafepay.com\",\n            \"phone\": \"03008277879\",\n            \"api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n            \"avatar\": \"https://storage.googleapis.com/safepay-assets/b2a545f6-b636-44ae-9023-abcfc113651a-favicon.png\",\n            \"website\": \"https://www.getsafepay.com\",\n            \"payout_terms\": \"\",\n            \"active\": 0,\n            \"suspended\": 0,\n            \"suspend_reason\": \"\",\n            \"email_settings\": null,\n            \"api_settings\": null,\n            \"organization\": null,\n            \"verification\": null,\n            \"verified\": 1,\n            \"created_at\": \"2019-04-28T01:04:00Z\",\n            \"updated_at\": \"2019-06-05T16:25:26Z\"\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["invoice","quick-links","v1","link_297bfa4b-f61c-4c72-80a4-368d731e890c"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"040596dd-3c42-44c6-8b61-d1ad455dd576","name":"404","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_b016f84c-3418-4ab2-901e-f6e4be10f1a7"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:47:40 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dbc0bc9bdad059-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"Resource with this identifier not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"378601eb-beef-4dfc-86b8-ea2824c52a25","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 11:49:43 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dbc3bc4e7bd059-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"link\": {\n            \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n            \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"number\": \"92243675\",\n            \"status\": \"CREATED\",\n            \"note\": \"For Zara handbag purchased through Import Fox\",\n            \"metadata\": [\n                {\n                    \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                    \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                    \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                    \"created_at\": \"2023-09-28T11:26:27Z\",\n                    \"updated_at\": \"2023-09-28T11:26:27Z\"\n                }\n            ],\n            \"payment\": [],\n            \"recipients\": [],\n            \"total\": 15000,\n            \"currency\": \"PKR\",\n            \"workflow\": \"MANUAL\",\n            \"created_at\": \"2023-09-28T11:26:27Z\",\n            \"updated_at\": \"2023-09-28T11:26:27Z\"\n        },\n        \"client\": {\n            \"token\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n            \"name\": \"Baked in Pakistan\",\n            \"description\": \"High end pâtisserie\",\n            \"email\": \"zparekh@getsafepay.com\",\n            \"phone\": \"03008277879\",\n            \"api_key\": \"sec_8dcac601-4b70-442d-b198-03aadd28f12b\",\n            \"avatar\": \"https://storage.googleapis.com/safepay-assets/b2a545f6-b636-44ae-9023-abcfc113651a-favicon.png\",\n            \"website\": \"https://www.getsafepay.com\",\n            \"payout_terms\": \"\",\n            \"active\": 0,\n            \"suspended\": 0,\n            \"suspend_reason\": \"\",\n            \"email_settings\": null,\n            \"api_settings\": null,\n            \"organization\": null,\n            \"verification\": null,\n            \"verified\": 1,\n            \"created_at\": \"2019-04-28T01:04:00Z\",\n            \"updated_at\": \"2019-06-05T16:25:26Z\"\n        }\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"}],"_postman_id":"70f51996-9158-4e97-a293-5186b7d8dd62"},{"name":"Update Quick Link","id":"a85e7d94-da3a-412d-a58a-ea0e0ebb229e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 10000,\n\t\"currency\": \"USD\",\n\t\"note\": \"Test Notes\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c","description":"<p>A Quick Link can be updated as long as its status is not <code>PAID</code>. Once a Quick Link has been paid, it can no longer be updated and a new Quick Link will have to be generated.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"request-body-schema\">Request body schema:</h5>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>amount</code></td>\n<td>integer</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>currency</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div><h5 id=\"response\">Response:</h5>\n<p>A successful request to this endpoint will return the updated Quick Link</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n        \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"number\": \"92243675\",\n        \"status\": \"CREATED\",\n        \"note\": \"Test Notes\",\n        \"metadata\": [\n            {\n                \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"created_at\": \"2023-09-28T11:26:27Z\",\n                \"updated_at\": \"2023-09-28T11:26:27Z\"\n            }\n        ],\n        \"payment\": [],\n        \"recipients\": [],\n        \"total\": 10000,\n        \"currency\": \"USD\",\n        \"workflow\": \"MANUAL\",\n        \"created_at\": \"2023-09-28T11:26:27Z\",\n        \"updated_at\": \"2023-09-28T11:26:27Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["invoice","quick-links","v1","link_297bfa4b-f61c-4c72-80a4-368d731e890c"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"f8d22664-7f13-41c5-88cc-3637b02a5367","name":"200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 10000,\n\t\"currency\": \"USD\",\n\t\"note\": \"Test Notes\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:33:08 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc03588cd0c904-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n        \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n        \"number\": \"92243675\",\n        \"status\": \"CREATED\",\n        \"note\": \"Test Notes\",\n        \"metadata\": [\n            {\n                \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"created_at\": \"2023-09-28T11:26:27Z\",\n                \"updated_at\": \"2023-09-28T11:26:27Z\"\n            }\n        ],\n        \"payment\": [],\n        \"recipients\": [],\n        \"total\": 10000,\n        \"currency\": \"USD\",\n        \"workflow\": \"MANUAL\",\n        \"created_at\": \"2023-09-28T11:26:27Z\",\n        \"updated_at\": \"2023-09-28T11:26:27Z\"\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"c37f2740-d90e-428a-8166-1878a8568b8b","name":"401","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 10000,\n\t\"currency\": \"USD\",\n\t\"note\": \"Test Notes\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:34:56 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc05ff1abec904-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"9935551f-7f3f-4642-b09e-4463f0af16ea","name":"500","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"amount\": 10000,\n\t\"currency\": \"USD\",\n\t\"note\": \"Test Notes\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d73"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:34:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"82"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc057aaca0c904-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"sql: no rows in result set\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"a85e7d94-da3a-412d-a58a-ea0e0ebb229e"},{"name":"Search Quick Links","id":"53525c4c-175c-4e33-93bd-121a23a35c6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/?page=1&limit=10&workflow=MANUAL","description":"<p>List or search for Quick Links</p>\n<p>Pagination is supported via the <code>limit</code> and <code>page</code> query parameters.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h6 id=\"query-params\">Query Params</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Property</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>workflow</code></td>\n<td>string</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>limit</code></td>\n<td>integer</td>\n<td>Y</td>\n</tr>\n<tr>\n<td><code>page</code></td>\n<td>integer</td>\n<td>Y</td>\n</tr>\n</tbody>\n</table>\n</div><p>Response:</p>\n<p>A successul request to this endpoint will return a paginated list of Quick Links as follows. The <code>count</code> field indicates the total number of Quick Links that have been created against your account.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"count\": 25,\n        \"list\": [\n            {\n                \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"92243675\",\n                \"status\": \"CREATED\",\n                \"note\": \"Test Notes\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                        \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                        \"created_at\": \"2023-09-28T11:26:27Z\",\n                        \"updated_at\": \"2023-09-28T12:33:08Z\"\n                    }\n                ],\n                \"payment\": [],\n                \"recipients\": [],\n                \"total\": 10000,\n                \"currency\": \"USD\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2023-09-28T11:26:27Z\",\n                \"updated_at\": \"2023-09-28T12:33:08Z\"\n            },\n            {\n                \"id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"61568134\",\n                \"status\": \"PAID\",\n                \"note\": \"Cake \",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_b7618611-447d-4218-be8c-a0fef9104cd6\",\n                        \"quick_link_id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"created_at\": \"2020-08-09T16:20:36Z\",\n                        \"updated_at\": \"2020-08-09T16:23:51Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_dd318e83-c133-4cba-9cc0-1a18f00b06f5\",\n                        \"quick_link_id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"sp_tracker\": \"track_de4d345f-7697-4e0a-9e9b-826cd14a225f\",\n                        \"sp_transaction\": \"trans_bbfbf069-26ba-47bf-a690-794cef873ce1\",\n                        \"sp_reference\": \"682887\",\n                        \"created_at\": \"2020-08-09T16:23:51Z\",\n                        \"updated_at\": \"2020-08-09T16:23:51Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 2000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-08-09T16:20:36Z\",\n                \"updated_at\": \"2020-08-09T16:23:51Z\"\n            }\n        ]\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n\n</code></pre>\n","urlObject":{"path":["invoice","quick-links","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[{"description":{"content":"<p>The page to search for. Page serves as an offset counter starting with 1</p>\n","type":"text/plain"},"key":"page","value":"1"},{"description":{"content":"<p>How many results to return per page. A limit of 10 will return 10 Quick Links per page</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>One of EMAIL or MANUAL</p>\n","type":"text/plain"},"key":"workflow","value":"MANUAL"}],"variable":[]}},"response":[{"id":"f9256224-8933-4e38-8d92-188f17ac34c4","name":"200","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/?page=1&limit=10&workflow=MANUAL","host":["https://sandbox.api.getsafepay.com"],"path":["invoice","quick-links","v1",""],"query":[{"key":"page","value":"1","description":"The page to search for. Page serves as an offset counter starting with 1"},{"key":"limit","value":"10","description":"How many results to return per page. A limit of 10 will return 10 Quick Links per page"},{"key":"workflow","value":"MANUAL","description":"One of EMAIL or MANUAL"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:53:48 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc219fdf5a0048-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"count\": 25,\n        \"list\": [\n            {\n                \"id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"92243675\",\n                \"status\": \"CREATED\",\n                \"note\": \"Test Notes\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_e7b25fdc-a4ca-4ed1-9249-85c881d4e4f7\",\n                        \"quick_link_id\": \"link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_297bfa4b-f61c-4c72-80a4-368d731e890c\",\n                        \"created_at\": \"2023-09-28T11:26:27Z\",\n                        \"updated_at\": \"2023-09-28T12:33:08Z\"\n                    }\n                ],\n                \"payment\": [],\n                \"recipients\": [],\n                \"total\": 10000,\n                \"currency\": \"USD\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2023-09-28T11:26:27Z\",\n                \"updated_at\": \"2023-09-28T12:33:08Z\"\n            },\n            {\n                \"id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"61568134\",\n                \"status\": \"PAID\",\n                \"note\": \"Cake \",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_b7618611-447d-4218-be8c-a0fef9104cd6\",\n                        \"quick_link_id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"created_at\": \"2020-08-09T16:20:36Z\",\n                        \"updated_at\": \"2020-08-09T16:23:51Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_dd318e83-c133-4cba-9cc0-1a18f00b06f5\",\n                        \"quick_link_id\": \"link_198f2fc2-71f2-44d0-8270-7daa7337a11c\",\n                        \"sp_tracker\": \"track_de4d345f-7697-4e0a-9e9b-826cd14a225f\",\n                        \"sp_transaction\": \"trans_bbfbf069-26ba-47bf-a690-794cef873ce1\",\n                        \"sp_reference\": \"682887\",\n                        \"created_at\": \"2020-08-09T16:23:51Z\",\n                        \"updated_at\": \"2020-08-09T16:23:51Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 2000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-08-09T16:20:36Z\",\n                \"updated_at\": \"2020-08-09T16:23:51Z\"\n            },\n            {\n                \"id\": \"link_3ad067dc-5494-44bd-82b1-eff60d23596a\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"55272702\",\n                \"status\": \"PAID\",\n                \"note\": \"Customised xyz\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_8e3e3760-4789-4a78-b1bb-e68a881f93e5\",\n                        \"quick_link_id\": \"link_3ad067dc-5494-44bd-82b1-eff60d23596a\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_3ad067dc-5494-44bd-82b1-eff60d23596a\",\n                        \"created_at\": \"2020-07-07T09:30:20Z\",\n                        \"updated_at\": \"2023-06-05T14:32:18Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_56449d40-495f-44fc-88fa-e0f2ca9ca2f4\",\n                        \"quick_link_id\": \"link_3ad067dc-5494-44bd-82b1-eff60d23596a\",\n                        \"sp_tracker\": \"track_18472652-1167-499c-a0f4-c18974f9a1a0\",\n                        \"sp_transaction\": \"trans_ca612e25-ce16-45c7-ad89-dfab0081d758\",\n                        \"sp_reference\": \"296235\",\n                        \"created_at\": \"2023-06-05T14:32:18Z\",\n                        \"updated_at\": \"2023-06-05T14:32:18Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 30000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-07-07T09:30:20Z\",\n                \"updated_at\": \"2023-06-05T14:32:18Z\"\n            },\n            {\n                \"id\": \"link_a758a1b7-7dea-4bd2-9a21-883e1d74966a\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"39300799\",\n                \"status\": \"PAID\",\n                \"note\": \"Raza Naqvi, lunch order, protein menu, Week of 6th July\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_e2b3e5e2-4428-4d9d-9405-02ea2e39080c\",\n                        \"quick_link_id\": \"link_a758a1b7-7dea-4bd2-9a21-883e1d74966a\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_a758a1b7-7dea-4bd2-9a21-883e1d74966a\",\n                        \"created_at\": \"2020-07-06T07:14:20Z\",\n                        \"updated_at\": \"2023-06-05T14:35:48Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_9e79adc5-8d17-4b0f-9c1b-4a4ca7b29c9c\",\n                        \"quick_link_id\": \"link_a758a1b7-7dea-4bd2-9a21-883e1d74966a\",\n                        \"sp_tracker\": \"track_017346e3-18de-4b5d-9bd3-825527b304dc\",\n                        \"sp_transaction\": \"trans_c3865e66-8c21-415d-baf9-25e552979ffe\",\n                        \"sp_reference\": \"452104\",\n                        \"created_at\": \"2023-06-05T14:35:48Z\",\n                        \"updated_at\": \"2023-06-05T14:35:48Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 3500,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-07-06T07:14:20Z\",\n                \"updated_at\": \"2023-06-05T14:35:48Z\"\n            },\n            {\n                \"id\": \"link_0a004b19-f065-4d2b-900f-c6c4a1ed01e7\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"95050186\",\n                \"status\": \"PAID\",\n                \"note\": \"Test for searches\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_6dcb0b5e-1325-4c3b-aec6-d02e9a504dc0\",\n                        \"quick_link_id\": \"link_0a004b19-f065-4d2b-900f-c6c4a1ed01e7\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_0a004b19-f065-4d2b-900f-c6c4a1ed01e7\",\n                        \"created_at\": \"2020-05-05T10:23:51Z\",\n                        \"updated_at\": \"2020-05-05T10:32:31Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_87ea6054-7fd0-41ee-9897-b2e3c4b8bc44\",\n                        \"quick_link_id\": \"link_0a004b19-f065-4d2b-900f-c6c4a1ed01e7\",\n                        \"sp_tracker\": \"track_555b4f02-83a2-4b53-8649-29cd8af23db0\",\n                        \"sp_transaction\": \"trans_993c40b2-50c4-4f2a-b221-393929f0af21\",\n                        \"sp_reference\": \"142763\",\n                        \"created_at\": \"2020-05-05T10:32:31Z\",\n                        \"updated_at\": \"2020-05-05T10:32:31Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 5000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-05-05T10:23:51Z\",\n                \"updated_at\": \"2020-05-05T10:32:31Z\"\n            },\n            {\n                \"id\": \"link_15b891a9-cb17-4d54-95cb-e37766967c00\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"74632647\",\n                \"status\": \"CREATED\",\n                \"note\": \"Graphic Design Project for Henry Nettles - 30 April - Delivery Date\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_98e25cd5-ec96-4fc1-b0c5-4b466a5ed1ba\",\n                        \"quick_link_id\": \"link_15b891a9-cb17-4d54-95cb-e37766967c00\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_15b891a9-cb17-4d54-95cb-e37766967c00\",\n                        \"created_at\": \"2020-04-30T10:48:58Z\",\n                        \"updated_at\": \"2023-06-12T13:42:36Z\"\n                    }\n                ],\n                \"payment\": [],\n                \"recipients\": [],\n                \"total\": 200,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-04-30T10:48:58Z\",\n                \"updated_at\": \"2023-06-12T13:42:36Z\"\n            },\n            {\n                \"id\": \"link_dabc673b-d6f8-4740-abe7-95a9a698d93f\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"28948828\",\n                \"status\": \"PAID\",\n                \"note\": \"Wed 22/04/2020 - acupuncture session and equipment used \",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_f5ea416a-8087-4b11-b9dd-322d5d7d4ea5\",\n                        \"quick_link_id\": \"link_dabc673b-d6f8-4740-abe7-95a9a698d93f\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_dabc673b-d6f8-4740-abe7-95a9a698d93f\",\n                        \"created_at\": \"2020-04-22T05:31:58Z\",\n                        \"updated_at\": \"2020-06-26T12:39:03Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_fc0bebd3-eb39-4289-80cf-dbcab7182bce\",\n                        \"quick_link_id\": \"link_dabc673b-d6f8-4740-abe7-95a9a698d93f\",\n                        \"sp_tracker\": \"track_76631b20-2418-472d-86ea-ac9b2d2a9c9d\",\n                        \"sp_transaction\": \"trans_0e6f0e8e-ff7d-4d99-9d99-617a1ecd7d0d\",\n                        \"sp_reference\": \"770244\",\n                        \"created_at\": \"2020-06-26T12:39:03Z\",\n                        \"updated_at\": \"2020-06-26T12:39:03Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 2000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-04-22T05:31:58Z\",\n                \"updated_at\": \"2020-06-26T12:39:03Z\"\n            },\n            {\n                \"id\": \"link_41f0ad3c-4387-48c4-906a-182a52bc2cab\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"41957249\",\n                \"status\": \"PAID\",\n                \"note\": \"2 x paint @ Rs 1500 each\\n3 x hammer @ Rs 400 each\\n5 x washer @ Rs 30 each\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_c2ea2e4e-44cb-4b07-9191-1f2da0f3e51e\",\n                        \"quick_link_id\": \"link_41f0ad3c-4387-48c4-906a-182a52bc2cab\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_41f0ad3c-4387-48c4-906a-182a52bc2cab\",\n                        \"created_at\": \"2020-04-21T11:27:33Z\",\n                        \"updated_at\": \"2023-06-05T14:36:44Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_31598e13-8633-4f65-9a79-94ad0933b971\",\n                        \"quick_link_id\": \"link_41f0ad3c-4387-48c4-906a-182a52bc2cab\",\n                        \"sp_tracker\": \"track_c671e727-c31e-45c3-af5d-3a60acbdcce1\",\n                        \"sp_transaction\": \"trans_cd235d7f-90d7-4fc6-892f-bfde3158d959\",\n                        \"sp_reference\": \"896741\",\n                        \"created_at\": \"2023-06-05T14:36:44Z\",\n                        \"updated_at\": \"2023-06-05T14:36:44Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 4350,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-04-21T11:27:33Z\",\n                \"updated_at\": \"2023-06-05T14:36:44Z\"\n            },\n            {\n                \"id\": \"link_0db3458e-0d64-48ff-9c2e-5ff639fbb428\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"32385047\",\n                \"status\": \"CREATED\",\n                \"note\": \"10 Office scanners\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_0efefb36-c849-46af-9159-61c8f34acc69\",\n                        \"quick_link_id\": \"link_0db3458e-0d64-48ff-9c2e-5ff639fbb428\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_0db3458e-0d64-48ff-9c2e-5ff639fbb428\",\n                        \"created_at\": \"2020-04-20T06:12:44Z\",\n                        \"updated_at\": \"2020-04-20T06:12:44Z\"\n                    }\n                ],\n                \"payment\": [],\n                \"recipients\": [],\n                \"total\": 500000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-04-20T06:12:44Z\",\n                \"updated_at\": \"2020-04-20T06:12:44Z\"\n            },\n            {\n                \"id\": \"link_d915f049-10b4-4c17-9095-21983fe95ba5\",\n                \"merchant_id\": \"client_071f9c25-c291-4dcf-a21e-79b576ddd0fd\",\n                \"number\": \"54599764\",\n                \"status\": \"PAID\",\n                \"note\": \"Hussain - Maths - 16 hrs a month - April\",\n                \"metadata\": [\n                    {\n                        \"id\": \"meta_7fc8e59c-4506-40b5-becd-41ee5ede6e4b\",\n                        \"quick_link_id\": \"link_d915f049-10b4-4c17-9095-21983fe95ba5\",\n                        \"recipient_view_url\": \"https://sandbox.api.getsafepay.com/io/quick-link?ql=link_d915f049-10b4-4c17-9095-21983fe95ba5\",\n                        \"created_at\": \"2020-04-10T12:25:57Z\",\n                        \"updated_at\": \"2023-06-05T14:38:31Z\"\n                    }\n                ],\n                \"payment\": [\n                    {\n                        \"id\": \"pay_72eb753b-43f5-4c00-9930-ed25b416038a\",\n                        \"quick_link_id\": \"link_d915f049-10b4-4c17-9095-21983fe95ba5\",\n                        \"sp_tracker\": \"track_9da25ad4-7f5d-4622-bbb7-87e4bbbaee6a\",\n                        \"sp_transaction\": \"trans_d2fbd336-2e4b-4961-8c62-4ed3885c03f1\",\n                        \"sp_reference\": \"551894\",\n                        \"created_at\": \"2023-06-05T14:38:31Z\",\n                        \"updated_at\": \"2023-06-05T14:38:31Z\"\n                    }\n                ],\n                \"recipients\": [],\n                \"total\": 20000,\n                \"currency\": \"PKR\",\n                \"workflow\": \"MANUAL\",\n                \"created_at\": \"2020-04-10T12:25:57Z\",\n                \"updated_at\": \"2023-06-05T14:38:31Z\"\n            }\n        ]\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"265f411c-3a31-4ad6-99ec-c46966b1681c","name":"200 (no results)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/?page=1&limit=10&workflow=MANUAL","host":["https://sandbox.api.getsafepay.com"],"path":["invoice","quick-links","v1",""],"query":[{"key":"page","value":"1","description":"The page to search for. Page serves as an offset counter starting with 1"},{"key":"limit","value":"10","description":"How many results to return per page. A limit of 10 will return 10 Quick Links per page"},{"key":"workflow","value":"MANUAL","description":"One of EMAIL or MANUAL"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:38:42 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc0b7ec9fcc904-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"count\": 0,\n        \"list\": []\n    },\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"d30b6f9f-d369-4196-bbac-ab3d7a1e4c60","name":"401","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/?page=1&limit=10&workflow=MANUAL","host":["https://sandbox.api.getsafepay.com"],"path":["invoice","quick-links","v1",""],"query":[{"key":"page","value":"1","description":"The page to search for. Page serves as an offset counter starting with 1"},{"key":"limit","value":"10","description":"How many results to return per page. A limit of 10 will return 10 Quick Links per page"},{"key":"workflow","value":"MANUAL","description":"One of EMAIL or MANUAL"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:53:28 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"70"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc21216fef0048-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"JWT is expired\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"2ff667ed-9ef6-47f7-bd38-1ccebb6148dd","name":"417","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/?page=1&limit=10000&workflow=MANUAL","host":["https://sandbox.api.getsafepay.com"],"path":["invoice","quick-links","v1",""],"query":[{"key":"page","value":"1","description":"The page to search for. Page serves as an offset counter starting with 1"},{"key":"limit","value":"10000","description":"How many results to return per page. A limit of 10 will return 10 Quick Links per page"},{"key":"workflow","value":"MANUAL","description":"One of EMAIL or MANUAL"}]}},"status":"Expectation Failed","code":417,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 12:54:11 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"87"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc22327af30048-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"-: must be no greater than 100.\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"53525c4c-175c-4e33-93bd-121a23a35c6c"},{"name":"Delete Quick Link","id":"086eb2e0-4302-45a0-a250-3c26c215045a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c","description":"<p>Delete a Quick Link corresponding to the ID passed in the URL. This endpoint will delete a Quick Link if one is found against this ID.</p>\n<blockquote>\n<p>This endpoint only supports JWT based authentication </p>\n</blockquote>\n<h5 id=\"response\">Response:</h5>\n<p>A successful request will generate the following response</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": \"success\",\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["invoice","quick-links","v1","link_297bfa4b-f61c-4c72-80a4-368d731e890c"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"edf30f7f-7cd4-45f0-847a-44d9b378cbdb","name":"200","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 13:03:44 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc302aee2fc8f4-KHI"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": \"success\",\n    \"status\": {\n        \"errors\": [],\n        \"message\": \"success\"\n    }\n}"},{"id":"52a1df01-68ca-4cc9-accd-c137d6e1f552","name":"500","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 13:03:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"82"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc30743acdc8f4-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"sql: no rows in result set\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"b20675e5-1cf1-4e89-b37c-9c428167aa10","name":"401","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/invoice/quick-links/v1/link_297bfa4b-f61c-4c72-80a4-368d731e890c"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 28 Sep 2023 13:04:08 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, DELETE, OPTIONS, PUT"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"80dc30c4da6ec8f4-KHI"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"token up for parsing was not passed through the context\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"086eb2e0-4302-45a0-a250-3c26c215045a"}],"id":"dc893b84-0ec3-425e-a969-a6446eb5a6b2","description":"<p>Quick Links are unique payment links that can be generated and managed using these APIs. Quick Links provide a very easy, no-code way of requesting payment from customers or clients when you either need to request payment for a custom order, you dont have an ecommerce store or you're either a freelancer or service provider.  </p>\n<p>Each Quick Link comes with a unique URL that can be shared with your recipient through any medium. They can get open the URL and make the payment using their preferred payment method.  </p>\n<p>A Quick Link is valid for one-time payments meaning if a Quick Link has been marked as paid, a new one will have to be generated for new payment requests.</p>\n","_postman_id":"dc893b84-0ec3-425e-a969-a6446eb5a6b2"},{"name":"Safepay Shoppers","item":[{"name":"CRUD","item":[{"name":"Create Safepay Shopper","id":"30aef3a5-4067-419a-b223-90bfe803af41","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n\t\"email\": \"hzaidi2@getsafepay.com\",\n\t\"phone\": \"+923331111111\",\n\t\"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v2/","description":"<p>Register a new Safepay shopper.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong><code>Property</code></strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Mandatory</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>first_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>last_name</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>phone</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>string</td>\n<td>Y</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user","v2",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"e12d2101-c371-49a3-b797-a17fc4defeca","name":"200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n\t\"email\": \"hzaidi2@getsafepay.com\",\n\t\"phone\": \"+923331111111\",\n\t\"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v2/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 08:32:37 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab3ffc23b19d1d8-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n        \"contacts\": [\n            {\n                \"token\": \"con_fff0d983-8d8a-47a0-8481-741576145891\",\n                \"user\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"email\": \"hzaidi2@getsafepay.com\",\n                \"phone\": \"+923331111111\",\n                \"is_default\": true,\n                \"created_at\": {\n                    \"seconds\": 1722328356,\n                    \"nanos\": 295749212\n                },\n                \"updated_at\": {\n                    \"seconds\": 1722328356,\n                    \"nanos\": 295749932\n                }\n            }\n        ],\n        \"first_name\": \"Hassan\",\n        \"last_name\": \"Zaidi\",\n        \"email\": \"hzaidi2@getsafepay.com\",\n        \"phone\": \"+92 333 1111111\",\n        \"avatar\": \"\",\n        \"suspended\": 0,\n        \"suspend_reason\": \"\",\n        \"verified\": 0,\n        \"verification\": {\n            \"user_id\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n            \"code\": \"660167\",\n            \"verification_type\": 0,\n            \"expires_at\": \"2024-07-31T08:32:36.972032026Z\",\n            \"created_at\": \"2024-07-30T08:32:36.97203248Z\",\n            \"updated_at\": \"2024-07-30T08:32:36.972032401Z\"\n        },\n        \"created_at\": \"2024-07-30T08:32:36.295747356Z\",\n        \"updated_at\": \"2024-07-30T08:32:36.295747248Z\"\n    }\n}"},{"id":"15b46d1e-7fbc-47eb-9aac-42fd19a7ac7d","name":"409","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Hassan\",\n  \"last_name\": \"Zaidi\",\n\t\"email\": \"hzaidi@getsafepay.com\",\n\t\"phone\": \"+923001234567\",\n\t\"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"https://sandbox.api.getsafepay.com/user/v2/"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 08:31:59 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"131"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab3fed5ef34d1d8-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.resource_conflict\",\n    \"message\": \"User with this email already exists. Please log in or use another email to sign up.\"\n}"}],"_postman_id":"30aef3a5-4067-419a-b223-90bfe803af41"},{"name":"Find Safepay Shopper","id":"37bdd5c9-8098-4577-b81b-995bcca90cd9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/v2/","description":"<p>Fetch a Safepay shopper's details.</p>\n","urlObject":{"path":["user","v2",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"8985d966-aeb1-4dd7-8244-bc1f3211f123","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/v2/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:22:45 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4493afc67d1f4-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"token\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n        \"contacts\": [\n            {\n                \"token\": \"con_fff0d983-8d8a-47a0-8481-741576145891\",\n                \"user\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"email\": \"hzaidi2@getsafepay.com\",\n                \"phone\": \"+923331111111\",\n                \"is_default\": true,\n                \"created_at\": {\n                    \"seconds\": 1722328356\n                },\n                \"updated_at\": {\n                    \"seconds\": 1722328356\n                }\n            }\n        ],\n        \"first_name\": \"Hassan\",\n        \"last_name\": \"Zaidi\",\n        \"email\": \"hzaidi2@getsafepay.com\",\n        \"phone\": \"+92 333 1111111\",\n        \"avatar\": \"\",\n        \"suspended\": 0,\n        \"suspend_reason\": \"\",\n        \"verified\": 0,\n        \"verification\": {\n            \"user_id\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n            \"code\": \"660167\",\n            \"verification_type\": 0,\n            \"expires_at\": \"2024-07-31T08:32:37Z\",\n            \"created_at\": \"2024-07-30T08:32:37Z\",\n            \"updated_at\": \"2024-07-30T08:32:37Z\"\n        },\n        \"created_at\": \"2024-07-30T08:32:36Z\",\n        \"updated_at\": \"2024-07-30T08:32:36Z\"\n    }\n}"},{"id":"2d7a6080-e3b5-4b3c-921d-571a2cc42168","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/v2/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:17:09 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"70"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab44106ae4dd1f4-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.unauthorized_access\",\n    \"message\": \"signature is invalid\"\n}"}],"_postman_id":"37bdd5c9-8098-4577-b81b-995bcca90cd9"},{"name":"Safepay Shopper Exists","id":"f52bc43e-fea8-4286-8863-1a39a39dd7bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/v2/exists?email=hzaidi@getsafepay.com","description":"<p>Check if a Safepay shopper exists using their email.</p>\n","urlObject":{"path":["user","v2","exists"],"host":["https://sandbox.api.getsafepay.com"],"query":[{"key":"email","value":"hzaidi@getsafepay.com"}],"variable":[]}},"response":[{"id":"5d87496a-46b6-4ffc-9833-4602c457fe9b","name":"200 - Exists","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/user/v2/exists?email=hzaidi@getsafepay.com","host":["https://sandbox.api.getsafepay.com"],"path":["user","v2","exists"],"query":[{"key":"email","value":"hzaidi@getsafepay.com"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Aug 2024 07:33:43 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8b60b2631942b744-BRU"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"exists\": true,\n        \"is_local\": true,\n        \"has_password\": true,\n        \"phone\": \"+92**********31\",\n        \"email\": \"hzaidi@getsafepay.com\"\n    }\n}"},{"id":"20062f88-6db3-4893-b13b-4d652d604599","name":"200 - Does not exist","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/user/v2/exists?email=hzaidi@getsafepay.co","host":["https://sandbox.api.getsafepay.com"],"path":["user","v2","exists"],"query":[{"key":"email","value":"hzaidi@getsafepay.co"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Aug 2024 07:34:33 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8b60b39d7ffeb744-BRU"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"exists\": false,\n        \"is_local\": false,\n        \"has_password\": false,\n        \"phone\": \"\",\n        \"email\": \"\"\n    }\n}"},{"id":"4b453516-e05b-4093-854c-6383bb7e74f0","name":"400","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://sandbox.api.getsafepay.com/user/v2/exists","host":["https://sandbox.api.getsafepay.com"],"path":["user","v2","exists"],"query":[{"key":"email","value":"hzaidi@getsafepay.co","disabled":true}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Aug 2024 07:35:01 GMT"},{"key":"Content-Type","value":"application/json; charset=UTF-8"},{"key":"Content-Length","value":"65"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Vary","value":"Origin"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8b60b44bcb05b744-BRU"}],"cookie":[],"responseTime":null,"body":"{\n    \"code\": \"error.bad_request\",\n    \"message\": \"Email: cannot be blank.\"\n}"}],"_postman_id":"f52bc43e-fea8-4286-8863-1a39a39dd7bc"}],"id":"d2d2927b-a398-4c4d-8b30-2013efb8fcd5","description":"<p>Manage Safepay shoppers.</p>\n","_postman_id":"d2d2927b-a398-4c4d-8b30-2013efb8fcd5"},{"name":"Payment methods","item":[{"name":"List Payment Methods","id":"cc14b7e6-5b6e-4a2d-be39-1a1aab322fa3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/","description":"<p>List all payment methods belonging to a Safepay shopper.</p>\n","urlObject":{"path":["user","wallets","v1",""],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"abe65e8b-6d1b-46bc-afad-905e50e62179","name":"200","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:41:53 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4653e286dde53-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"token\": \"inst_8ed5e401-ab7b-442c-8473-dee137827448\",\n            \"user\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n            \"payment_method_token\": \"tms_80e9bb17-e1ec-4886-b234-509c6673d141\",\n            \"deduplication_key\": \"$2a$10$wqRoSlQVB8IRs.H3mDYNiOPdM8aGAWvtOVSvFsl.WP0C1aNhCdet.\",\n            \"intent\": \"cybersource\",\n            \"last_4\": \"1111\",\n            \"instrument_type\": \"Visa\",\n            \"expiry_month\": \"12\",\n            \"expiry_year\": \"2025\",\n            \"contact\": {\n                \"token\": \"con_e2b4affe-ea6c-4cc7-a8ca-10750e8b89ee\",\n                \"user\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n                \"first_name\": \"Hassan\",\n                \"last_name\": \"Zaidi\",\n                \"email\": \"hzaidi2@getsafepay.com\",\n                \"phone\": \"+92 333 1111111\",\n                \"is_default\": false,\n                \"created_at\": {\n                    \"seconds\": 1722332448\n                },\n                \"updated_at\": {\n                    \"seconds\": 1722332448\n                }\n            },\n            \"address\": {\n                \"token\": \"address_99a2fa32-71ca-4820-a69e-f7f6e396eb0d\",\n                \"owner\": \"user_d75110e4-f52e-464d-96bd-490f75e7fc71\",\n                \"street1\": \"St 1, Housing Society\",\n                \"city\": \"Islamabad\",\n                \"country\": \"PK\",\n                \"is_default\": false,\n                \"created_at\": {\n                    \"seconds\": 1722332448\n                },\n                \"updated_at\": {\n                    \"seconds\": 1722332448\n                }\n            },\n            \"cybersource\": {\n                \"token\": \"tms_80e9bb17-e1ec-4886-b234-509c6673d141\",\n                \"payment_method\": \"inst_8ed5e401-ab7b-442c-8473-dee137827448\",\n                \"scheme\": 1,\n                \"bin\": \"411111\",\n                \"last_four\": \"1111\",\n                \"expiry_month\": \"12\",\n                \"expiry_year\": \"2025\",\n                \"created_at\": {\n                    \"seconds\": 1722332448\n                },\n                \"updated_at\": {\n                    \"seconds\": 1722332448\n                }\n            },\n            \"created_at\": \"2024-07-30T09:40:48Z\",\n            \"updated_at\": \"2024-07-30T09:40:48Z\"\n        }\n    ]\n}"},{"id":"9577e9d3-750b-4993-9bfe-d3f2518c119b","name":"401","originalRequest":{"method":"GET","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 09:42:10 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"174"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab465a9e90bde53-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt_user: token is malformed, strategies/jwt_user_v2: token is malformed]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"cc14b7e6-5b6e-4a2d-be39-1a1aab322fa3"},{"name":"Delete Payment Method","id":"c9d62fa5-23ce-41aa-9e42-59ed4ae9c19a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/inst_8ed5e401-ab7b-442c-8473-dee137827448","description":"<p>Delete a saved payment method.</p>\n","urlObject":{"path":["user","wallets","v1","inst_8ed5e401-ab7b-442c-8473-dee137827448"],"host":["https://sandbox.api.getsafepay.com"],"query":[],"variable":[]}},"response":[{"id":"c5df4383-21b0-4f2d-9fb2-b8f3eae6fb56","name":"200","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/inst_8ed5e401-ab7b-442c-8473-dee137827448"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 10:29:16 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"19"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4aaa6dd74d1dc-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": \"success\"\n}"},{"id":"6e19500a-65a4-4eab-bbc7-4709f6ae5571","name":"401","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/inst_8ed5e401-ab7b-442c-8473-dee13782744"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 10:28:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"174"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4aa22fe40d1dc-MCT"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"unauthorized\",\n            \"strategies/union: [strategies/jwt_user: token is malformed, strategies/jwt_user_v2: token is malformed]\"\n        ],\n        \"message\": \"fail\"\n    }\n}"},{"id":"dd0ffc5e-78c0-404a-877e-374d55d17494","name":"404","originalRequest":{"method":"DELETE","header":[],"url":"https://sandbox.api.getsafepay.com/user/wallets/v1/inst_8ed5e401-ab7b-442c-8473-dee137827447"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 Jul 2024 10:28:40 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Origin, Content-Type, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, OPTIONS, PUT, DELETE"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"8ab4a9ca1d20d1dc-MCT"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": null,\n    \"status\": {\n        \"errors\": [\n            \"Resource with this identifier not found\"\n        ],\n        \"message\": \"fail\"\n    }\n}"}],"_postman_id":"c9d62fa5-23ce-41aa-9e42-59ed4ae9c19a"}],"id":"d2e32307-e389-4497-a635-6c3c9b514653","description":"<p>Manage payment methods belonging to Safepay shoppers. To create payment methods, a Safepay shopper must go through a checkout session and consent to saving their payment method details for future use.</p>\n","_postman_id":"d2e32307-e389-4497-a635-6c3c9b514653"}],"id":"f5e64e2f-f4f4-4e33-8e05-78eae4292eef","description":"<p>Create and manage users linked to the Safepay network. The <code>user</code> object encapsulates the contact details of a Safepay shopper. Like <strong>Customers</strong>, users also have saved payment methods associated with them which employ tokenization to allow performing payments in a convenient way.</p>\n<p>All customer related endpoints (other than registration) must be authenticated with user authentication.</p>\n<blockquote>\n<p>Note that these APIs are currently reserved for internal use until a secure mechanism is introduced for facilitating the creation of user passwords. If you wish to make use of these APIs, reach out to us on <a href=\"https://mailto:integrations@getsafepay.com\">integrations@getsafepay.com</a>.</p>\n</blockquote>\n","_postman_id":"f5e64e2f-f4f4-4e33-8e05-78eae4292eef"}],"event":[{"listen":"prerequest","script":{"id":"8601c4bb-9e10-4dea-9116-a9748aca38d6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e0e4d9f0-fff5-4ef5-9518-fedf11a38f50","type":"text/javascript","exec":[""]}}],"variable":[{"key":"jwtToken","value":"","type":"string"},{"key":"apiKey","value":"15670709dbd82556e286cc6640ebc31716b1a53b1463361d626e63ca741c16dc","type":"string"},{"key":"development-base-url","value":"","type":"default"}]}