{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/legacy-api/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"1. Fork Banxa Sandbox Collection","description":"Official Banxa API documentation – on-ramp and off-ramp transfers with identity verification and compliance.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-fork-banxa-sandbox-collection","__idx":0},"children":["1. Fork Banxa Sandbox Collection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use Banxa API collection in Postman by accessing the read-only Banxa Workspace and forking the Collection to your personal or company Workspace."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Link to Banxa Workspace: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.postman.com/crimson-comet-2961/workspace/banxa-api-sandbox-public/collection/19155430-c6f45571-964c-4ac9-8b01-8b08b1bc3806"},"children":["https://www.postman.com/crimson-comet-2961/workspace/banxa-api-sandbox-public/collection/19155430-c6f45571-964c-4ac9-8b01-8b08b1bc3806"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postman-fork-collection.b88db578e9eb0e1abe3d5e4b92a119473af5e41cc1ca24536c1b06868615303c.2f40b509.png","alt":"Postman Fork Collection"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-configure-credentials","__idx":1},"children":["2. Configure credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure your authorization credentials and domain. Click Save."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure that \"https://\" is included in front of the domain that you have been provided. e.g. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://binance.banxa.com"},"children":["https://binance.banxa.com"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/configure-credentials.b97e8e142e44c8888cf3ad27147526cc5b3465d463ac5853154c22dd4b0bcc76.2f40b509.png","alt":"Configure credentials and domain"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-start-invoking-the-apis-using-your-credentials","__idx":2},"children":["3. Start invoking the APIs using your credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ensure that the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Banxa API Sandbox"]}," environment is selected so that environment variables are applied to each request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/environment-selection.efe45e1f5303895891c168ee4dc7b9881d73f947dff034bbeb2ee886571ac364.2f40b509.png","alt":"Environment Selection"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"troubleshooting","__idx":3},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you are getting an unauthorized error message when running an API call, double the following things:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The domain configured in your Environments variables include a \"https://\" in front of the URL e.g. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://binance.banxa.com"},"children":["https://binance.banxa.com"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure that the Header variables of your API call includes Authorization and a Value is generated"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postman-authorization.f29e23ad2fa7d30498be51a307a81ba22cdca100896f06a4c78f320b1f26e398.2f40b509.png","alt":"Postman Authorization"},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Collection level Authorization Type is Bearer Token, and the Token is HMAC. The Folders and API calls should inherit Authorization settings from the parent."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postman-authorization-2.f29e23ad2fa7d30498be51a307a81ba22cdca100896f06a4c78f320b1f26e398.2f40b509.png","alt":"Postman Authorization 2"},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Double check that the Pre-request Script at the Collection level is as per below"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/postman-pre-request-script.73779ac97a35b6da814d9317181fc7af1960afacfc3870ffda58143ae0a06245.2f40b509.png","alt":"Postman Pre-request Script"},"children":[]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"var CLIENT_KEY = pm.environment.get(\"key\");\nvar SECRET_KEY = pm.environment.get(\"secret\");\nvar AUTH_TYPE = 'HMAC-SHA512';\nvar AUTH_VERSION = '5.1.2';\n\nfunction epochTime() {\n    var d = new Date();\n    var t = d.getTime();\n    var o = t + \"\";\n    return o.substring(0, 10);\n}\n\nvar timestamp = epochTime();\nfunction getAuthHeader(httpMethod, requestUrl, requestBody) {\n    var requestPath = pm.request.url.getPath();\n    var requestData;\n    if (httpMethod==\"GET\"){\n        requestPath = pm.request.url.getPathWithQuery();\n        requestPath = replaceVariablesWithValues(requestPath);\n        requestData = [httpMethod, requestPath, timestamp].join(\"\\n\");\n    } else {\n        requestPath = replaceVariablesWithValues(requestPath);\n        requestBody = replaceVariablesWithValues(requestBody);\n        body = JSON.stringify(JSON.parse(requestBody));\n        requestData = [httpMethod, requestPath, timestamp, body].join(\"\\n\");\n    }\n    \n    console.log(requestData);\n    \n    return CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(requestData, SECRET_KEY));\n}\n\nfunction replaceVariablesWithValues(str) {\n    var env = pm.environment.toObject();\n    for (var p in env) {\n        if( env.hasOwnProperty(p) ) {\n            str = str.replace('{{' + p + '}}', env[p])\n        } \n    }   \n    return str;\n}\nconsole.log(request['headers']);\nsignature = getAuthHeader(request['method'], request['url'], request['data']);\npostman.setEnvironmentVariable('hmac', CLIENT_KEY + \":\" + signature + \":\" + timestamp );\n","lang":"javascript"},"children":[]}]},"headings":[{"value":"1. Fork Banxa Sandbox Collection","id":"1-fork-banxa-sandbox-collection","depth":3},{"value":"2. Configure credentials","id":"2-configure-credentials","depth":3},{"value":"3. Start invoking the APIs using your credentials","id":"3-start-invoking-the-apis-using-your-credentials","depth":3},{"value":"Troubleshooting","id":"troubleshooting","depth":3}],"frontmatter":{"title":"Step 2: Postman","seo":{"title":"1. Fork Banxa Sandbox Collection"}},"lastModified":"2026-05-19T23:30:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/legacy-api/docs/on-ramp-off-ramp/on-ramp-api-tutorial/step-2-postman","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}