{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"74d1b0c1-dfab-4330-bc45-1888d8bc5bad","name":"Multiverse External API","description":"## **Introduction**\n\nMultiverse's HTTPs API Implementation with JSON based with eSIM capability\n\n- Required OAuth2 Implementation\n    \n- Interconnection with Multiverse's RSM Platform\n    \n\n## **Version**\n\n- 2025.04.08 v1.0.5\n    \n- 2024.06.04 v1.0.4\n    \n- 2024.03.16 v1.0.3\n    \n- 2023.06.30 v1.0.2\n    \n- 2023.06.26 v1.0.1\n    \n- 2023.05.15 v1.0.0\n    \n\n## **What we need to do before the integration?**\n\n- Customer need to provide the IP Address for the **IP** **Whitelist**\n    \n- Customer need to provide the **Callback URL** for the callback provisioning\n    \n- API Service Platform will provide customer below information\n    \n    - **API Domain URL**\n        \n    - **User ID**\n        \n    - **Security Token**\n        \n    - **OAuth2 Client ID**\n        \n    - **OAuth2 Client Secret**\n        \n\n## **eSIM Purchase API Workflow**\n\n```\n+=-=-=-=-=-=-=-=-=-=-=+    (1) [ /esims/packages/:package_id/purchase ]        +=-=-=-=-=-=-=+ \n|  Customer Platform  |    ===============================================>    |        API  |\n|                     |                                                        |   Platform  | \n|  (Web / MobileApp)  |    (2) [ Customer Purchased Callback URL]              |             |\n+=-=-=-=-=-=-=-=-=-=-=+    <===============================================    +=-=-=-=-=-=-=+\n\n ```\n\n- **(1)** Customer can call purchase HTTP API to place eSIM order with the desired package\n    \n\n- **(2)** We will provision the eSIM data once the order is ready (within 1 minute)\n    \n\n## **API Domain**\n\n- Production: [https://multiverse-api.sim-check.info](https://multiverse-api.sim-check.info)\n    \n- Develop: [https://multiverse-api.sim-check.info](https://multiverse-api.sim-check.info)\n    \n\n## **Security**\n\n#### Multiverse Access Token\n\n- All requests **MUST** have the **Multiverse Access Token** in **X-Multiverse-Access-Token** header\n    \n- **X-Multiverse-Access-Token** = Bearer BASE64(**user_id/timestamp/SHA256**(**timestamp**+**security_token**))\n    \n    - security_token (provided by the Multiverse system owner)\n        \n    - timestamp (10 digits)\n        \n- Lifetime: **1 hour**\n    \n- Example:\n    \n\n``` javascript\nconst sha256 = require('crypto-js/sha256')\nconst userId = 'your_user_id'\nconst securityToken = 'your_security_token'\nconst timestamp = Math.floor(new Date().getTime() / 1000)\nconst encodedToken = sha256(`${timestamp}${securityToken}`)\nconst mergedToken = `${userId}/${timestamp}/${encodedToken}`\nconst accessToken = Buffer.from(mergedToken).toString('base64')\nconst xMultiverseAccessToken = `Bearer ${accessToken}`\nconsole.log(xMultiverseAccessToken)\n\n ```\n\n``` php\n$userId = 'your_user_id';\n$securityToken = 'your_security_token';\n$timestamp = time();\n$encodedToken = hash('sha256', $timestamp . $securityToken);\n$mergedToken = \"$userId/$timestamp/$encodedToken\";\n$accessToken = base64_encode($mergedToken);\n$xMultiverseAccessToken = \"Bearer $accessToken\";\n\n ```\n\n- SHA256 Online Reference Tool: [https://emn178.github.io/online-tools/sha256.html](https://emn178.github.io/online-tools/sha256.htmlOAuth)\n    \n\n#### OAuth 2.0 Access Token\n\n- **POST** [/auth/token](https://tel25team.postman.co/workspace/Team-Workspace~3951b65a-4107-4cde-8d26-e9b70f32b521/request/27350631-8d88b771-2693-4e0b-8b49-ad884328d35f) API to obtain the OAuth access token (OAuth 2.0 Client Credentials Grant)\n    \n    - Use **Basic** **Authorization** to **POST /auth/token**\n        \n    - Authorization = **Basic** Base64(client_id:client_secret)\n        \n        - Basic Token Example:\n            \n\n``` javascript\nconst clientId = 'your_client_id'\nconst clientSecret = 'your_client_secret'\nconst base64Token = Buffer.from(`${clientId}:${clientSecret}`).toString('base64')\nconst basicToken = `Basic ${base64Token}`\nconsole.log(basicToken)\n\n ```\n\n``` php\n$clientId = 'your_client_id';\n$clientSecret = 'your_client_secret';\ncurl_setopt_array($curl, array(\n    CURLOPT_URL => \"{{provHost}}/api/v1/auth/token\",\n    CURLOPT_USERPWD => \"$clientId:$clientSecret\",\n    CURLOPT_POST => true,\n    CURLOPT_RETURNTRANSFER => true,\n    CURLOPT_POSTFIELDS => json_encode(['grant_type' => 'client_credentials']),\n    CURLOPT_HTTPAUTH => CURLAUTH_BASIC,\n    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n    CURLOPT_HTTPHEADER => [\n        \"X-Multiverse-Access-Token: $xMultiverseAccessToken\",\n        \"Content-Type: application/json\",\n    ]\n));\n\n ```\n\n- All requests (except for /auth/token) **MUST** have the **OAuth Access Token** in **Authorization** header\n    \n\n## **Error Code**\n\n- code (string)\n    \n- message (string)\n    \n\n##### Example\n\n``` json\n{ \n  \"code\": \"400001\", \n  \"message\": \"Invalid parameter\"\n}\n\n ```\n\n##### 400\n\n| **code** | **message** |\n| --- | --- |\n| 400001 | Invalid parameter |\n\n##### 401\n\n| **code** | **message** |\n| --- | --- |\n| 401001 | Unauthorized |\n\n##### 404\n\n| **code** | **message** |\n| --- | --- |\n| 404001 | API not found |\n| 404002 | Resource not found |\n\n##### 500\n\n| **code** | **message** |\n| --- | --- |\n| 500001 | Internal server error |\n| 500002 | No available sim iccid |\n| 500003 | OTA API server error |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"1742397","team":124591,"collectionId":"74d1b0c1-dfab-4330-bc45-1888d8bc5bad","publishedId":"2s93z6ejqx","public":true,"publicUrl":"https://documenter-api.postman.tech/view/1742397/2s93z6ejqx","privateUrl":"https://go.postman.co/documentation/1742397-74d1b0c1-dfab-4330-bc45-1888d8bc5bad","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2023-06-26T00:49:30.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"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/012e9c1d93131aeba7e7a62798f8a9bbc75d9854b8aeec21b606685a10b9a124","favicon":""},"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://documenter.gw.postman.com/view/metadata/2s93z6ejqx"}