{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b9c347a0-29e7-4d0b-b794-17bbafefe9ea","name":"Payment APIs","description":"Live payment APIs for creating, tracking, and cancelling payments\n\n- `x-id`: The merchant’s private `Secret key` issued via the management panel\n    \n- `x-signature`: HMAC signature for request verification. Generated using your merchant secret key and request payload.\n    \n\n---\n\n# Payment Env\n\n###### The payment environment is determined automatically by your credentials.\n\n- If you use `v1/payment/rest/live` → requests are processed in **live** mode (Provide your live and secret)\n    \n- If you use `v1/payment/rest/test` → requests are processed in **Test** mode (Provide your test private and secret)\n    \n\n# Env variables (For postman)\n\nCreate a Postman **environment** (e.g., Rasedi Env) with the following **minimal variables**:\n\n| **Variable Name** | **Description** |\n| --- | --- |\n| x_id | Your merchant secret key from the Rasedi management panel |\n| private_key | Your private key in PEM format |\n| x_signature | Auto-generated by pre-request scripts |\n| reference_code | Auto-generated after creating a payment; used in status/cancel requests |\n\n> _**Note:**_ _Users only need to set x_id and private_key. The scripts handle the rest automatically._ \n  \n\n# ‌**If you don’t want to generate the x-signature manually**\n\nYou can use a **Postman pre-request script** to handle it for you automatically.\n\n1. **Set environment variables**:\n    \n    - x_id → your merchant secret key from the management panel\n        \n    - private_key → your private key (PEM format)\n        \n2. **Pre-request script** will:\n    \n    - Generate the x-signature for each request\n        \n    - Use the current request method and relative URL\n        \n    - Base64-encode the signature\n        \n3. **Add headers to your request**:\n    \n    - x-id: Your secret key\n        \n    - x-signature: {{x_signature}} (generated automatically by the pre-request script)\n        \n\nThis way, every request is signed correctly without manual computation.\n\n# 🔐 x-signature Generation (If you want to do it yourself)\n\nTo authenticate requests, each API call **must include a valid x-signature header**.  \n**How x-signature is created**  \nThe signature is generated by **signing a raw string with your private key**, then encoding the result in Base64.  \n\\*_Raw string format__\\*_\n\n```\n<METHOD> || <SECRET> || <RELATIVE_URL>\n\n ```\n\nExample\n\n```\nPOST || sk_live_xxx || /v1/payment/rest/live/init\n\n ```\n\n- METHOD → HTTP method (GET, POST, …)\n    \n- SECRET → your merchant secret key\n    \n- RELATIVE_URL → path only (no domain, no query params)\n    \n\n# **Signing algorithm**\n\n- Algorithm: **RSA (PKCS#1)**\n    \n- Encoding: **Base64**\n    \n- **Key:** Your `Secret key` that you got from the panel\n    \n- Passphrase: **Your secret key**\n    \n\n#### **Reference (Node.js)**\n\n``` javascript\nimport { sign } from \"crypto\";\nfunction generateXSignature({\n  method,\n  secret,\n  relativeUrl,\n  privateKeyPem,\n}) {\n  if (!privateKeyPem) {\n    throw new Error(\"privateKeyPem is undefined\");\n  }\n  const rawSign = `${method} || ${secret} || ${relativeUrl}`;\n  const bufSign = Buffer.from(rawSign, \"utf-8\");\n  const signature = sign(null, bufSign, {\n    key: privateKeyPem,\n    passphrase: secret,\n  });\n  return signature.toString(\"base64\");\n}\n// 🔴 HARDCODE TEMPORARILY (for debugging)\nconst PRIVATE_KEY = `\n-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQI...\n-----END ENCRYPTED PRIVATE KEY-----\n`;\nconst sig = generateXSignature({\n  method: \"POST\",\n  secret: \"sk_live_xxx\", // * Secret that you got from your panel \n  relativeUrl: \"/v1/payment/rest/live/create\",\n  privateKeyPem: PRIVATE_KEY,\n});\nconsole.log(sig);\n\n ```\n\n### **Using the Signature in API Requests**\n\nUse the generated signature as the value of the **x-signature** header when calling the APIs.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"52657755","team":13239553,"collectionId":"b9c347a0-29e7-4d0b-b794-17bbafefe9ea","publishedId":"2sBXcGDKeT","public":true,"publicUrl":"https://postman.rasedi.com","privateUrl":"https://go.postman.co/documentation/52657755-b9c347a0-29e7-4d0b-b794-17bbafefe9ea","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0118d9"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Rasedi Payment Postman Collection"},{"name":"title","value":"Rasedi Payment Postman Collection"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/6dd92ce2-4af2-43ad-94f5-452dd1f7db88/Mi5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"5767ea"}},{"name":"light","logo":"https://content.pstmn.io/6dd92ce2-4af2-43ad-94f5-452dd1f7db88/Mi5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0118d9"}}]}},"version":"8.11.4","publishDate":"2026-02-25T07:15:12.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Rasedi Payment Postman Collection","description":"Rasedi Payment Postman Collection"},"logos":{"logoLight":"https://content.pstmn.io/6dd92ce2-4af2-43ad-94f5-452dd1f7db88/Mi5wbmc=","logoDark":"https://content.pstmn.io/6dd92ce2-4af2-43ad-94f5-452dd1f7db88/Mi5wbmc="}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/2566198fab2bc39c9da0cb093b5d5452d73980e2fbefec2eb02cdfaf7c1ecee8","favicon":"https://res.cloudinary.com/postman/image/upload/v1772001688/team/36b554a886acd1854b44bc27839d0410.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://postman.rasedi.com/view/metadata/2sBXcGDKeT"}