{"info":{"_postman_id":"060ef4cb-7b9a-40ea-8491-11d39264ee3c","name":"Bluegreen API","description":"<html><head></head><body><h2 id=\"👋-introduction\">👋 Introduction</h2>\n<p>Welcome to Bluegreen's API documentation!</p>\n<p>Here you'll be able to find all of the APIs you need, including deposits, withdrawals and account management APIs. Happy development 🚀</p>\n<hr>\n<h2 id=\"🧑💻-integrating-with-bluegreen\">🧑‍💻 Integrating with Bluegreen</h2>\n<p>This API documentation contains all the requests and documentation needed to get a comprehensive overview of our APIs and how to use them, helping you complete the Integration process as quickly as possible.</p>\n<p>To gain access to Bluegreen's APIs, please refer to the Authentication module.</p>\n<ul>\n<li>For the production environment, please use the API URL - <a href=\"https://api.bluegreen.im/\">https://api.bluegreen.im/</a></li>\n<li>For the staging environment, please use the API URL - <a href=\"https://staging-api.bluegreen.im/\">https://staging-api.bluegreen.im/</a></li>\n</ul>\n<hr>\n<h2 id=\"🛟-help-and-support\">🛟 Help and support</h2>\n<p>If you have any questions or suggestions, please don't hesitate to reach out to your account manager at Bluegreen. We'll be happy to assist you 😊</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34293856","collectionId":"060ef4cb-7b9a-40ea-8491-11d39264ee3c","publishedId":"2sA3Bj9aBj","public":true,"customColor":{"top-bar":"FAFAFA","right-sidebar":"6bbc8d","highlight":"6bbc8d"},"publishDate":"2024-08-22T18:48:44.000Z"},"item":[{"name":"🔐 Authentication","item":[],"id":"fa3e1111-df66-4423-a364-1597196922e6","description":"<h4 id=\"api-keys\">API Keys</h4>\n<p>After contacting Bluegreen, you should receive your API Keys through email. If you didn't receive it, please contact your account manager at Bluegreen.</p>\n<p>When receiving the email, you will have an API key and an API Secret. Then, please follow the steps listed below:</p>\n<ol>\n<li><p>Using the API Secret, you'll be required to generate a signature to send in the headers.</p>\n</li>\n<li><p>The headers should contain the following mandatory fields:</p>\n<ol>\n<li><p><strong>authkey</strong> - API key received via email</p>\n</li>\n<li><p><strong>signature</strong> - Needs to be calculated for each request</p>\n</li>\n</ol>\n</li>\n</ol>\n<h4 id=\"signature-calculation\">Signature Calculation</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">from Cryptodome.Cipher import AES\nfrom Cryptodome.Util.Padding import pad\nimport requests\nimport time\nAPI_KEY = \"YOUR API KEY\"\nSECRET_KEY = \"YOUR SECRET KEY\"\nAPI_URL = \"API URL\"\ndef get_signature(key:str, timestamp: str, secret: str):\n    plain_signature = f\"{key}:{epoch}\".encode(\"utf-8\")\n    passphrase = secret.encode(\"utf-8\")\n    iv = passphrase[0:16]\n    cipher = AES.new(passphrase, AES.MODE_CBC, iv)\n    signature = cipher.encrypt(pad(plain_message, AES.block_size)).hex()\n    return signature\ndef get_response():\n    timestamp = str(int(time.time() * 1000))\n    headers = {\n        'authkey': API_KEY,\n        'timestamp': timestamp,\n        'signature': get_hash(timestamp, SECRET_KEY)\n    }\n    return requests.get(API_URL, headers=headers).json()\nif __name__ == \"__main__\":\n    print(get_response())\n\n</code></pre>\n<h4 id=\"fields-that-should-be-included-in-headers\"><strong>Fields that should be included in headers</strong></h4>\n<p>The requests must be sent containing the following headers:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">import http.client\nconn = http.client.HTTPSConnection(\"staging-api.bluegreen.im\")\npayload = ''\nheaders = {\n  'authkey': '$2a$10$3anMtNa5KuEBxTC/y97YKu7d8JJNVBHxntRakLF79O2yxP4QBINa.',\n  'signature': 'b196a629ebbeb7bb1bed30852904891dce0d0016aaeefdcb259087ac7f107cef'\n}\nconn.request(\"POST\", \"/\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))\n\n</code></pre>\n<h4 id=\"possible-errors\">Possible Errors</h4>\n<ul>\n<li><p>❗ If you receive the following error, please check whether you have added all required parameters in the header section correctly.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">            {\n                \"error\": {\n                    \"statusCode\": 401,\n                    \"name\": \"UnauthorizedError\",\n                    \"message\": \"Authorization header does not contain valid parameters\"\n                }\n            }    \n\n</code></pre>\n</li>\n<li><p>❗ If you receive this following error, please check whether you have calculated the signature correctly as mentioned above. Tip: Timestamp must always be in milliseconds.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">            {\n                \"error\": {\n                    \"statusCode\": 401,\n                    \"name\": \"UnauthorizedError\",\n                    \"message\": \"Error verifying api credentials : Invalid Authorization header\"\n                }\n            }\n\n</code></pre>\n</li>\n<li><p>🚧 IP error - Only in production. Please provide your Production IP's to whitelist it in our Production environment. For sandbox environment, the whitelisting is disabled.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">            {\n                \"error\": {\n                    \"statusCode\": 401,\n                    \"name\": \"UnauthorizedError\",\n                    \"message\": \"IP not whitelisted\"\n                }\n            }    \n\n</code></pre>\n</li>\n<li><p>👍 You have passed the Authentication. However, there are validation errors in the endpoint request. Please, see the endpoint reference for more details</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">            {\n                \"error\": {\n                    \"statusCode\": 400,\n                    \"name\": \"BadRequestError\",\n                    \"message\": \"Request body is required\",\n                    \"code\": \"MISSING_REQUIRED_PARAMETER\"\n                }\n            }        \n\n</code></pre>\n</li>\n</ul>\n","_postman_id":"fa3e1111-df66-4423-a364-1597196922e6"},{"name":"🗃️ Account Management","item":[{"name":"Get account balance","id":"2e918071-836a-4693-833c-b673792edb7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/merchant/balance","description":"<p>To view your accounts' balances, please refer to this endpoint. The balance displayed will always be for the account associated with the authkey used in the request.</p>\n<p>Please note that this endpoint returns the real-time balance. This means that amounts from payout orders in 'processing' status are already deducted, and deposit orders in 'pending' status are not yet included.</p>\n","urlObject":{"path":["merchant","balance"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"3104a1c3-1df3-4697-8b62-558158a550cd","name":"Success","originalRequest":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/merchant/balance"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:21:57 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"41"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=KR5brq%2BQBVN0UakWWuhhyrt3OYQdn%2BPTuqJJIkf36eXT8OGD052JVS6UllJF%2FdoOVM7zvOY8CypvcYvQQH%2FjSDq%2FyGpH%2B%2F9gPr4BvQtZQaIjEn698Df0F4VcutCiZzjh9qcM02MXvT1Zmb8%3D\"}],\"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":"874efcfb18597a21-GIG"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"balance\": 0.5\n    },\n    \"status\": true\n}"}],"_postman_id":"2e918071-836a-4693-833c-b673792edb7b"},{"name":"List transactions","id":"da63f0aa-f3c3-4854-8ffd-b8e31bee34cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    //\"order_id\" : \"BOUG00193\",\n    //\"currency\" : \"BRL\",\"ARS\", // [Optional]\n    //\"status\" : \"\", // [Optional] [Values - SUCCESS, FAILED, PENDING, PROCESSING, TIMEDOUT,RETURN_INITIATED, RETURNED, BLOCKED]\n    \"type\" : \"DEPOSIT\", //[Values - DEPOSIT, WITHDRAW, SETTLEMENT]\n    // \"created_at_from\" : \"\", // [Optional]\n    // \"created_at_to\" : \"\", // [Optional]\n    \"page\" : 1,\n    \"limit\" : 10,\n    \"sort_order\":  \"ASC\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/merchant/get-transactions-list","description":"<p>To retrieve a list of a merchant's processed transactions, please refer to this endpoint.</p>\n<p>The request body contains optional parameters to filter the transaction list according to your needs.</p>\n","urlObject":{"path":["merchant","get-transactions-list"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"cf18be32-6999-4cc9-b65f-f4c54fec23ad","name":"Deposit Response","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    //\"order_id\" : \"BOUG00193\",\n    //\"currency\" : \"BRL\",\"ARS\" // [Optional]\n    //\"status\" : \"\", // [Optional] [Values - SUCCESS, FAILED, PENDING, PROCESSING, TIMEDOUT, RETURN_INITIATED, RETURNED, BLOCKED]\n    \"type\" : \"DEPOSIT\",\n    // \"created_at_from\" : \"\", // [Optional]\n    // \"created_at_to\" : \"\", // [Optional]\n    \"page\" : 1,\n    \"limit\" : 10,\n    \"sort_order\":  \"ASC\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/merchant/get-transactions-list"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:31:51 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=vJMtmrR6H1hNabzZLOOt65bjcgmJiLyZyF7UI2YkI7WeZ6NXHVOJW3Lt8apjdobKvOGeSiTxWIG9W4WTt5HgQR%2BM%2BxUCEi6cn4lb6PRI%2B3Gi2ptUzW78nNnpQR76EZTmxCRjWJ9EmuQCzjM%3D\"}],\"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":"874f0b7e9c187a7e-GIG"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"isLastPage\": false,\n        \"length\": 16086,\n        \"transactions\": [\n            {\n                \"amount\": 0.5,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:11:51.929235+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST330\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 10000,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:12:16.962108+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST638\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 1,\n                \"amount_net\": 1,\n                \"created_at\": \"2024-03-22T17:14:01.706187+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST739\",\n                \"status\": \"SUCCESS\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 0.5,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.659724+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-5\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 0.7,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.666964+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-7\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 0.3,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.667698+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-3\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 0.6,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.668659+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-6\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 0.1,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.743889+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-1\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 1.6,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.901417+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-16\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            },\n            {\n                \"amount\": 1.2,\n                \"amount_net\": 0,\n                \"created_at\": \"2024-03-22T17:33:08.902826+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BG-LoadTest-2024-3-22T05:33:08-12\",\n                \"status\": \"TIMEDOUT\",\n                \"type\": \"DEPOSIT\"\n            }\n        ]\n    },\n    \"status\": true\n}"},{"id":"3a2316a1-b6b2-42fa-93f3-797a4898685f","name":"Withdraw Response","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    //\"order_id\" : \"BOUG00193\",\n    //\"currency\" : \"BRL\",\"ARS\" // [Optional]\n    //\"status\" : \"\", // [Optional] [Values - SUCCESS, FAILED, PENDING, PROCESSING, TIMEDOUT, RETURN_INITIATED, RETURNED, BLOCKED]\n    \"type\" : \"WITHDRAW\", //[Values - DEPOSIT, WITHDRAW, SETTLEMENT]\n    // \"created_at_from\" : \"\", // [Optional]\n    // \"created_at_to\" : \"\", // [Optional]\n    \"page\" : 1,\n    \"limit\" : 10,\n    \"sort_order\":  \"ASC\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/merchant/get-transactions-list"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:35:01 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=2qrv2pt3onouxzfpRrKyszpV2jL2H2YEaYN8K2SKFLDyL7YIeYqp6ogfvQYASP2m9127i8LQqA3HYk5cv7zXCXPpBfEHzJ%2FZLJPdzH0CBV8x%2FxosiBRoY7u7npPUxU5PRPKLEhY1uk%2FYdG4%3D\"}],\"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":"874f101e5ed37a7e-GIG"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"isLastPage\": true,\n        \"length\": 4,\n        \"transactions\": [\n            {\n                \"amount\": 0.1,\n                \"amount_net\": 0.1,\n                \"created_at\": \"2024-03-22T17:20:24.728427+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST764\",\n                \"status\": \"RETURNED\",\n                \"type\": \"WITHDRAW\"\n            },\n            {\n                \"amount\": 0.5,\n                \"amount_net\": 0.5,\n                \"created_at\": \"2024-03-22T17:22:02.230597+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST519\",\n                \"status\": \"RETURNED\",\n                \"type\": \"WITHDRAW\"\n            },\n            {\n                \"amount\": 0.5,\n                \"amount_net\": 0.5,\n                \"created_at\": \"2024-03-22T19:20:44.529233+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST791\",\n                \"status\": \"RETURNED\",\n                \"type\": \"WITHDRAW\"\n            },\n            {\n                \"amount\": 0.5,\n                \"amount_net\": 0.5,\n                \"created_at\": \"2024-03-22T19:20:57.752186+00:00\",\n                \"currency\": \"BRL\",\n                \"order_id\": \"BGTEST409\",\n                \"status\": \"SUCCESS\",\n                \"type\": \"WITHDRAW\"\n            }\n        ]\n    },\n    \"status\": true\n}"}],"_postman_id":"da63f0aa-f3c3-4854-8ffd-b8e31bee34cb"},{"name":"Get transaction details","id":"d623574e-6920-44f9-9194-1ed82c153fc2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/merchant/transaction-status/:order_id","description":"<p>To retrieve all information related to a transaction made by a merchant, please refer to this endpoint.</p>\n","urlObject":{"path":["merchant","transaction-status",":order_id"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[{"id":"e2f559b6-b011-42f6-b255-bef5fc791633","type":"any","value":"","key":"order_id"}]}},"response":[{"id":"b05baa74-6aa4-42e9-a56e-71b597fea738","name":"Success","originalRequest":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":{"raw":"https://staging-api.bluegreen.im/merchant/transaction-status/:order_id","host":["https://staging-api.bluegreen.im"],"path":["merchant","transaction-status",":order_id"],"variable":[{"key":"order_id","value":"BGTEST330"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:36:30 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=61ViTGB2PIBX6lj%2BHerQUeb%2B0BJnu%2BepKK66cYNRbD0bt8Bgiv7xw5ue4zB53HnDdFo4bbUyplUPLXpVwDJPuBj0MJfyh3wKCtVZHOzEhZnXwEyJPwPUF7DnZCuAUMVu57NLkKWWUAP5v2Q%3D\"}],\"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":"874f124cbcdc7a7e-GIG"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Transaction is TIMEDOUT\",\n    \"result\": {\n        \"amount\": 0.5,\n        \"amount_net\": 0,\n        \"currency\": \"BRL\",\n        \"event\": {\n            \"code\": \"TD1012\",\n            \"message\": \"Transaction has been timedout!\"\n        },\n        \"order_id\": \"BGTEST330\",\n        \"status\": \"TIMEDOUT\",\n        \"transaction_specific\": {\n            \"e2e_id\": \"NA\",\n            \"name\": \"NA\",\n            \"tax_id\": \"NA\"\n        }\n    },\n    \"status\": true\n}"}],"_postman_id":"d623574e-6920-44f9-9194-1ed82c153fc2"},{"name":"Resend Callback","id":"c6fdd6f4-29d4-48a5-967c-604664380486","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/merchant/resend-callback/:order_id","description":"<p>Did you lose your transaction callback? No worries! Simply use this endpoint to resend it.</p>\n","urlObject":{"path":["merchant","resend-callback",":order_id"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[{"id":"3b4569f1-c7b7-4a66-a7b7-25718cf11df6","type":"any","value":"","key":"order_id"}]}},"response":[],"_postman_id":"c6fdd6f4-29d4-48a5-967c-604664380486"}],"id":"30c088b7-c505-43f2-8b26-0e016fc6ba19","description":"<p>Each Bluegreen merchant can have one or more Bluegreen accounts, which are identified by their unique accountId.</p>\n<p>An account is created for every merchant-currency pairing. For example, if a Bluegreen merchant intends to operate with both BRL and ARS currencies, they will be provided with two distinct accounts: one for BRL transactions and another for ARS transactions.</p>\n<p>Each of the merchant's account IDs is issued by Bluegreen and associated with the merchant's specific merchantId. Also, Bluegreen will generate and send different API Keys for each one of the merchant's accounts. If you didn't receive your API Keys properly, please get in contact with your account manager at Bluegreen.</p>\n","_postman_id":"30c088b7-c505-43f2-8b26-0e016fc6ba19"},{"name":"📥 Deposit Flow","item":[{"name":"ARS (Argentine Peso)","item":[{"name":"Receive via CVU","id":"b334b96c-7213-4d10-bcf6-f93e225bbc57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST255\",\n    \"amount\": 9887.25,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    \"payer_tax_id\": \"27195113136\",\n    \"payer_firstname\": \"Lionel\",\n    \"payer_lastname\": \"Gonzalez\",\n    \"expiration\": 900 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/ars/cvu","description":"<p>This API endpoint allows you to generate a CVU deposit order with a unique <code>order_id</code> and an <code>expiration</code> time, set by you.</p>\n<p>Please note that the returned CVU can only be paid for the specified amount from an account under the same user's tax ID. <strong>We strongly advise you to notify your user of this requirement.</strong></p>\n<p>Once BlueGreen identifies the deposit, the order status changes to \"Success,\" and you will receive a callback at the specified URL.</p>\n","urlObject":{"path":["v1","deposit","ars","cvu"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"4df7425c-4faf-4c5c-af33-deaa2e5f8eac","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST792\",\n    \"amount\": 9887.25,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    \"payer_tax_id\": \"27195113136\",\n    \"payer_firstname\": \"Lionel\",\n    \"payer_lastname\": \"Gonzalez\",\n    \"expiration\": 900 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/ars/cvu"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": null,\n    \"message\": \"Deposit Initiated Successfully\",\n    \"result\": {\n        \"amount\": 9887.25,\n        \"currency\": \"ARS\",\n        \"deposit_info\": {\n            \"cvu\": \"0001787300000000000116\",\n            \"receiver_name\": \"BLUEGREEN S.A.\",\n            \"receiver_tax_id\": \"30718508750\",\n            \"receiver_tax_id_type\": \"CUIT\" \n        },\n        \"expire_at\": \"2024-07-10T05:11:45.476144\",\n        \"method\": \"CVU\",       \n        \"order_id\": \"BGTEST630\",\n        \"reference_id\": \"BIND00020\"        \n    },\n    \"status\": true\n}"},{"id":"d1333974-5c25-432d-a4ad-be92d089b3b9","name":"Bank Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST267\",\n    \"amount\": 9887.25,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    \"payer_tax_id\": \"27195113136\",\n    \"payer_firstname\": \"Lionel\",\n    \"payer_lastname\": \"Gonzalez\",\n    \"expiration\": 900 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/ars/cvu"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EB1004\",\n        \"message\": \"Error processing transaction on bank!\"\n    },\n    \"message\": \"Deposit Initiation Failed, Bank Error\",\n    \"status\": false\n}"}],"_postman_id":"b334b96c-7213-4d10-bcf6-f93e225bbc57"}],"id":"f3957485-24ac-4572-b42b-b00f459f0ea3","description":"<p>For pay-ins in Argentina, Bluegreen supports payment via CVU and will soon support payment via QR Code.</p>\n<ul>\n<li><p><strong>CVU Flow</strong>: Generate a unique CVU deposit order with a configurable ID and expiration time. The CVU is a 22-digit code representing a virtual account, where the user transfers the specified amount from their preferred bank or PSP (Payment Service Provider). Every bank and PSP in Argentina supports CVU transfers.</p>\n</li>\n<li><p><strong>QR Code Flow (coming soon)</strong>: Generate a unique QR Code deposit order with a configurable ID and expiration time. The user pays using their preferred PSP (e.g., Mercado Pago, Uala, Cuenta DNI). It's important to note that not all banks/PSPs support QR Code payments. As a result, some users may not be able to use this payment method.</p>\n</li>\n</ul>\n","_postman_id":"f3957485-24ac-4572-b42b-b00f459f0ea3"},{"name":"BRL (Brazilian Real)","item":[{"name":"Receive via Pix","id":"5cb41d5e-7e0d-49d8-ad27-39ce9c801bc8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST680\",\n    \"amount\": 1,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    //\"payer_tax_id\": \"\", //optional\n    //\"payer_firstname\":\"\", //optional\n    //\"payer_lastname\":\"\" //optional\n    //\"indirect_merchant_code\": \"\" //[Optional] \n    \"expiration\": 300 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/brl/pix","description":"<p>This API endpoint allows you to generate a Pix deposit QR Code with a unique <code>order_id</code> and an <code>expiration</code> time, set by you.</p>\n<p>Please note that dynamic QR codes can be paid only once and within the set <code>expiration</code> time.</p>\n<p>Once Bluegreen identifies the deposit, it changes its status to \"Success,\" and you will receive a callback at the specified URL.</p>\n<p>⚠️ Although the \"taxId\" parameter is optional, providing it can help improve compliance checks and prevent deposit refunds.</p>\n","urlObject":{"path":["v1","deposit","brl","pix"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"b6ef2ead-2c97-463c-875f-11f9fac30a38","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST521\",\n    \"amount\": 1,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    //\"payer_tax_id\": \"\", //optional\n    //\"payer_firstname\":\"\", //optional\n    //\"payer_lastname\":\"\" //optional\n    //\"indirect_merchant_code\": \"\" //[Optional] \n    \"expiration\": 300 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/brl/pix"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": null,\n    \"message\": \"Deposit Initiated Successfully\",\n    \"result\": {\n        \"amount\": 1.00,\n        \"currency\": \"BRL\",      \n        \"deposit_info\": {\n            \"pix_copy_paste\": \"00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01AwMZqDBaTXofilrND77iB29zrmykK4b7JBRGp9qsD5uHNG55204000053039865406250.005802BR5925BLUEGREEN PAGAMENTOS LTDA6009Sao Paulo62070503***6304F25F\"\n        },\n        \"expire_at\": \"2024-05-04T18:19:25.476158\",\n        \"method\": \"PIX\",\n        \"order_id\": \"BGTESTDOC0001\",\n        \"reference_id\": \"BRL140573\"        \n    },\n    \"status\": true\n}"},{"id":"9fff6cfa-2a62-465f-9303-e1c0e86551d2","name":"Bank Error","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST132\",\n    \"amount\": 1,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    //\"payer_tax_id\": \"\", //optional\n    //\"payer_firstname\":\"\", //optional\n    //\"payer_lastname\":\"\" //optional\n    \"expiration\": 300 // Expiration in seconds\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/deposit/brl/pix"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EB1004\",\n        \"message\": \"Error processing transaction on bank!\"\n    },\n    \"message\": \"Deposit Initiation Failed, Bank Error\",\n    \"status\": false\n}"}],"_postman_id":"5cb41d5e-7e0d-49d8-ad27-39ce9c801bc8"},{"name":"[DEPRECATED] Receive via Pix","id":"baf2de22-44f3-44e3-b133-11871d16adcd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST638\",\n    \"amount\": 1,\n    \"expiration\": 300, // Expiration in seconds\n    //\"first_name\": \"\", // [Optional] \n    //\"last_name\": \"\", // [Optional] \n    //\"tax_id\": \"12345678910\", // [Optional] \n    //\"indirect_merchant_code\": \"MER9001PPR\" //[Optional] \n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/generate-dynamic-qr","description":"<p>This endpoint is still operational but has been deprecated in favour of a more updated version. It is recommended to use <a href=\"https://docs.bluegreenpay.com/#eac38d53-9a7b-46ad-9e92-142cd0a61ec6\">the new Receive via Pix endpoint</a> for all new implementations.</p>\n","urlObject":{"path":["brl","generate-dynamic-qr"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"67a06397-8814-49ab-b77c-fb4e423564be","name":"Success","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST122\",\n    \"amount\": 1,\n    \"expiration\": 300, // Expiration in milli seconds\n    //\"first_name\": \"\", // [Optional] \n    //\"last_name\": \"\", // [Optional] \n    //\"tax_id\": \"12345678910\", // [Optional] \n    //\"indirect_merchant_code\": \"MER9001PPR\" //[Optional] \n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/generate-dynamic-qr"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"status\": true,\r\n    \"message\": \"Deposit Initiated Successfully\",\r\n    \"result\": {\r\n        \"qrData\": \"00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01AwMZqDBaTXofilrND77iB29zrmykK4b7JBRGp9qsD5uHNG55204000053039865406250.005802BR5925BLUEGREEN PAGAMENTOS LTDA6009Sao Paulo62070503***6304F25F\"\r\n    }\r\n}"},{"id":"266120a7-0e0c-4435-b5a3-feb4b6a68a18","name":"Bank Error","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST625\",\n    \"amount\": 1,\n    \"expiration\": 300, // Expiration in milli seconds\n    //\"first_name\": \"\", // [Optional] \n    //\"last_name\": \"\", // [Optional] \n    //\"tax_id\": \"12345678910\", // [Optional] \n    //\"indirect_merchant_code\": \"MER9001PPR\" //[Optional] \n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/generate-dynamic-qr"},"status":"Service Unavailable","code":503,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:44:36 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"143"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=yRf0JaW1SQ871zwBbYwfh1h47CTzvb1Fbm9czIz%2FayZwUEcCSZG%2FxAqagrzScvVj%2B0KB%2FeT9%2B5Niz0lhnBfL%2F6AbZlFjlTGUt6laMDMG%2Fq5%2BSNWnAU060SH1Uvrr7w1jDV2qpo125oT6tDM%3D\"}],\"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":"874f1e2949727a7e-GIG"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EB1004\",\n        \"message\": \"Error processing transaction on bank!\"\n    },\n    \"message\": \"Deposit Initiation Failed, Bank Error\",\n    \"status\": false\n}"}],"_postman_id":"baf2de22-44f3-44e3-b133-11871d16adcd"},{"name":"Refund Pix","id":"6ef989fa-a449-4f78-b75d-636dec9026b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/merchant/refund-pix/:order_id","description":"<p>In Brazil, if you need to return the money back to the user's account, you can initiate a PIX refund flow by reversing a previous PIX deposit that has been made.</p>\n<p>The refunded amount will always be equal to the original payment amount. Refunds are quick and typically reflected in the payer's account immediately after processing.</p>\n<p>It's important to note that refunds can only be requested within 80 days after the original payment. Once a refund is initiated, the status of the original deposit will change to <code>RETURN_INITIATED</code>. After the refund is processed, the status will then change to <code>RETURNED</code>.</p>\n<p>⚠️ In case of any blocked deposits, the system will automatically initiate a refund, and the status of the original deposit will change to <code>BLOCKED</code>.</p>\n","urlObject":{"path":["merchant","refund-pix",":order_id"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[{"id":"084df7cf-2213-4477-aa8f-0b09636b3be8","type":"any","value":"","key":"order_id"}]}},"response":[{"id":"26b2c72e-c4dd-42d2-92d0-e92ce48775ee","name":"Success","originalRequest":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"https://staging-api.bluegreen.im/merchant/refund-pix/:order_id","host":["https://staging-api.bluegreen.im"],"path":["merchant","refund-pix",":order_id"],"variable":[{"id":"084df7cf-2213-4477-aa8f-0b09636b3be8","key":"order_id","value":""}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Refund initiation successful!\"    \n}"}],"_postman_id":"6ef989fa-a449-4f78-b75d-636dec9026b0"}],"id":"eac38d53-9a7b-46ad-9e92-142cd0a61ec6","description":"<p>For pay-ins in Brazil, Bluegreen supports payment via Pix.</p>\n<ul>\n<li><strong>Pix Flow</strong>: Generate a unique Pix dynamic QR code deposit order with a configurable ID and expiration time. Users can pay using their preferred bank account, as every bank and payment institution in Brazil supports Pix transfers.</li>\n</ul>\n","_postman_id":"eac38d53-9a7b-46ad-9e92-142cd0a61ec6"}],"id":"26df3218-4a73-46cd-945a-b0ca66ad16b3","description":"<p>Every deposit request is assigned a unique <code>order_id</code> provided by the Merchant. The order starts with a <code>PENDING</code> status, which remains until the deposit is made or the order expires. Here are the possible statuses a deposit order might have:</p>\n<ul>\n<li><p><strong>PENDING</strong>: The order is created with a pending status, meaning it hasn't expired yet and is waiting for payment.</p>\n</li>\n<li><p><strong>SUCCESS</strong>: The order is paid, indicating the deposit was made successfully.</p>\n</li>\n<li><p><strong>FAILED</strong>: There was a failure in creating the order.</p>\n</li>\n<li><p><strong>TIMEDOUT</strong>: The order expired without being paid.</p>\n</li>\n<li><p><strong>RETURN_INITIATED</strong>: The merchant initiated a refund for a successful deposit.</p>\n</li>\n<li><p><strong>RETURNED</strong>: The deposit was successfully refunded to the user.</p>\n</li>\n<li><p><strong>BLOCKED</strong>: The order was blocked by Bluegreen for a specific reason (e.g., the payer is a minor, the payer is blocked, the amount is different from expected, etc.). In this case, the deposit will be instantly and automatically refunded by Bluegreen, so your user should not be credited. The order will remain in a blocked status.</p>\n</li>\n</ul>\n","_postman_id":"26df3218-4a73-46cd-945a-b0ca66ad16b3"},{"name":"📤 Withdrawal Flow","item":[{"name":"ARS (Argentine Peso)","item":[{"name":"Send ARS transfer","id":"90634631-38a0-456b-9529-7d73bfdd4ca3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST67\",\n    \"amount\": 1000,\n    \"receiver_account_key\" : \"30113857967896123403450\",\n    \"receiver_tax_id\": \"27195113136\",\n    \"receiver_firstname\": \"Lionel\",\n    \"receiver_lastname\": \"Gonzalez\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/ars/transfer","description":"<p>This API endpoint allows you to send an ARS transfer by generating a withdrawal order with a unique order_id and a <code>receiver_account_key</code>.</p>\n<p>When a withdrawal order is placed, it starts with a <code>PENDING</code> status. The status changes to <code>PROCESSING</code> once it is sent to the bank.</p>\n<p>If the account key provided belongs to the user who requested the withdrawal and the payment is successfully processed, the order status will be updated to <code>SUCCESS</code>. If the account key does not belong to the user who requested the withdrawal or if the bank rejects the withdrawal for any reason, the order status will be updated to <code>FAILED</code>. The reason for rejection will be communicated in the callback.</p>\n","urlObject":{"path":["v1","withdraw","ars","transfer"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"559aa291-9733-44d1-b66f-1ccbd4d58de4","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST688\",\n    \"amount\": 1000,\n    \"receiver_account_key\" : \"30113857967896123403450\",\n    \"receiver_tax_id\": \"27195113136\",\n    \"receiver_firstname\": \"Lionel\",\n    \"receiver_lastname\": \"Gonzalez\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/ars/transfer"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw initiated successfully!\",\n    \"status\": true\n}"},{"id":"91e643cb-3699-48f9-9bc6-2b7091b0179b","name":"Insufficient funds","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST280\",\n    \"amount\": 1000,\n    \"receiver_account_key\" : \"30113857967896123403450\",\n    \"receiver_tax_id\": \"27195113136\",\n    \"receiver_firstname\": \"Lionel\",\n    \"receiver_lastname\": \"Gonzalez\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/ars/transfer"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EW1005\",\n        \"message\": \"Insufficient account wallet balance!\"\n    },\n    \"message\": \"Insufficent funds!\",\n    \"status\": false\n}"}],"_postman_id":"90634631-38a0-456b-9529-7d73bfdd4ca3"}],"id":"0259e265-9f86-4328-a5cd-3ab85b2f6ace","description":"<p>For pay-outs in Argentina, Bluegreen supports withdrawals via bank transfers to the user's CVU (uniform virtual key) or CBU (uniform banking key), which are unique 22-character account identifiers.</p>\n<ul>\n<li><strong>Withdrawal Flow</strong>: Generate a unique withdrawal order with a configurable ID. The withdrawal is processed using the user's CVU or CBU (<code>receiver_account_key</code>). This transaction will typically arrive within a few minutes and is supported by all banks and PSPs in Argentina.</li>\n</ul>\n","_postman_id":"0259e265-9f86-4328-a5cd-3ab85b2f6ace"},{"name":"BRL (Brazilian Real)","item":[{"name":"Send BRL via Pix","id":"4816a47d-8c34-420b-8153-4e4f7d751028","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST770\",\n    \"amount\": 10,\n    \"receiver_account_key\" : \"16747465174\",\n    \"receiver_tax_id\": \"16747465174\",\n    \"receiver_firstname\": \"Jorge\",\n    \"receiver_lastname\": \"Amado\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/brl/pix","description":"<p>This API endpoint allows you to send a BRL transfer via Pix by generating a withdrawal order with a unique order_id and a <code>receiver_account_key</code>.</p>\n<p>When a withdrawal order is placed, it starts with a <code>PENDING</code> status. The status changes to <code>PROCESSING</code> once it is sent to the bank.</p>\n<p>If the Pix key provided belongs to the user who requested the withdrawal and the payment is successfully processed, the order status will be updated to <code>SUCCESS</code>. If the Pix key does not belong to the user who requested the withdrawal or if the bank rejects the withdrawal for any reason, the order status will be updated to <code>FAILED</code>. The reason for rejection will be communicated in the callback.</p>\n","urlObject":{"path":["v1","withdraw","brl","pix"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"68af961c-b859-40d5-a648-89eb5ef67c46","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST846\",\n    \"amount\": 10,\n    \"receiver_account_key\" : \"16747465174\",\n    \"receiver_tax_id\": \"16747465174\",\n    \"receiver_firstname\": \"Jorge\",\n    \"receiver_lastname\": \"Amado\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/brl/pix"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw initiated successfully!\",\n    \"status\": true\n}"},{"id":"c1ee5748-5082-41cb-805d-ee1dee46a49c","name":"Insufficient funds","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST757\",\n    \"amount\": 10,\n    \"receiver_account_key\" : \"16747465174\",\n    \"receiver_tax_id\": \"16747465174\",\n    \"receiver_firstname\": \"Jorge\",\n    \"receiver_lastname\": \"Amado\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/v1/withdraw/brl/pix"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EW1005\",\n        \"message\": \"Insufficient account wallet balance!\"\n    },\n    \"message\": \"Insufficent funds!\",\n    \"status\": false\n}"}],"_postman_id":"4816a47d-8c34-420b-8153-4e4f7d751028"},{"name":"[DEPRECATED] Send BRL via Pix","id":"f39311e4-06b2-4f81-9735-3ecf4d26fd41","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST868\",\n    \"amount\": 10.1,\n    \"account_holder_firstname\": \"Test\",\n    \"account_holder_lastname\": \"Payments\",\n    \"pix_key\" : \"15649487731\",\n    \"tax_id\": \"15649487731\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/pix-withdraw","description":"<p>This endpoint is still operational but has been deprecated in favour of a more updated version. It is recommended to use <a href=\"https://docs.bluegreenpay.com/#f5972c83-a786-4ed2-843a-ca1111b903cb\">the new Send BRL via Pix endpoint</a> for all new implementations.</p>\n","urlObject":{"path":["brl","pix-withdraw"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"d4f331ed-2c11-4b13-ac38-379591661bc2","name":"Success","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST92\",\n    \"amount\": 0.1,\n    \"account_holder_firstname\": \"Alan\",\n    \"account_holder_lastname\": \"Payments\",\n    \"pix_key\" : \"15649487731\",\n    \"tax_id\": \"15649487731\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/pix-withdraw"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:42:26 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=WXYSBtexDG2iAc2hPhwu4YjJhoPPHWY6hp2t%2BXTzzXB48eKu3dSykiTqr11IL9e2K6tb5cT8QWYM3w1xUNOFNJ2lgy5Rp8lmuTQcnv6JB4NKT3v3VVZa7KKrSAdSgspM0vpl4HedGGXg41g%3D\"}],\"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":"874f1afb8c337a7e-GIG"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw initiated successfully!\",\n    \"status\": true\n}"},{"id":"356e139a-55fa-49e4-a5f1-78114a1c9910","name":"Insufficent funds","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"order_id\": \"BGTEST356\",\n    \"amount\": 10.1,\n    \"account_holder_firstname\": \"Alan\",\n    \"account_holder_lastname\": \"Payments\",\n    \"pix_key\" : \"15649487731\",\n    \"tax_id\": \"15649487731\",\n    \"notification_url\": \"https://webhook.site/6cbe3da9-8f7b-4535-a415-b46d85e2dae0\"\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/brl/pix-withdraw"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Apr 2024 21:43:03 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=y49Iwro0zstEAtpTKEtlG6wglas50WiupgP83WHkDjJyhU4oXTP1yvXDZhkjmEtbVUiQBJuFr9dwubq2ZVD%2FJwkzmA0VMMof4BbUvdJHJ%2FmfeNcP6yLPZrhOAsEucZR3KGsrQtLlY4ZI1qI%3D\"}],\"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":"874f1be78afd7a7e-GIG"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"EW1005\",\n        \"message\": \"Insufficient account wallet balance!\"\n    },\n    \"message\": \"Insufficent funds!\",\n    \"status\": false\n}"}],"_postman_id":"f39311e4-06b2-4f81-9735-3ecf4d26fd41"}],"id":"f5972c83-a786-4ed2-843a-ca1111b903cb","description":"<p>For pay-outs in Brazil, Bluegreen supports withdrawals using Pix transfers to the user's Pix key, which is a unique identifier in Brazil's Pix payment system.</p>\n<ul>\n<li><strong>Withdrawal Flow</strong>: Generate a unique withdrawal order with a configurable ID. The withdrawal is processed using the user's Pix key (<code>receiver_account_key</code>). This transaction simplifies payments and transfers between bank accounts and typically arrives instantly. Every bank and payment institution in Brazil supports Pix transfers.</li>\n</ul>\n","_postman_id":"f5972c83-a786-4ed2-843a-ca1111b903cb"}],"id":"d4076802-b13d-419f-8cc5-b74d9e441ca5","description":"<p>Every withdrawal request is assigned a unique order_id provided by the Merchant. The withdrawal is always processed from the account linked to the authkey used in the request. It is important to note that withdrawals can only be made from the same currency account as the destination account. Here are the possible statuses a withdrawal order might have:</p>\n<ul>\n<li><p><strong>PENDING</strong>: The order is created with a pending status, meaning it is waiting to be processed.</p>\n</li>\n<li><p><strong>PROCESSING</strong>: The order has been sent to the bank and is currently being processed by the bank.</p>\n</li>\n<li><p><strong>SUCCESS</strong>: The order was successfully processed, and the withdrawal was completed.</p>\n</li>\n<li><p><strong>FAILED</strong>: There was a failure in processing the order.</p>\n</li>\n<li><p><strong>RETURNED</strong>: The user returned the transaction.</p>\n</li>\n<li><p><strong>BLOCKED</strong>: The order was blocked for a specific reason (e.g., compliance issues, blocked user, etc.). In this case, the withdrawal will not be processed, and the order will remain in a blocked status.</p>\n</li>\n</ul>\n","_postman_id":"d4076802-b13d-419f-8cc5-b74d9e441ca5"},{"name":"📈 Trades","item":[{"name":"Configurations","item":[{"name":"Get pairs","id":"27e7d567-55eb-417b-8b32-e1a062bb8ca2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/trade/config","urlObject":{"path":["trade","config"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"f94cf5f8-6e68-43a1-a770-0ec4de79d761","name":"Success","originalRequest":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/trade/config"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": null,\n    \"event\": null,\n    \"result\": {\n        \"pairs\": [\n            {\n                \"pair_definition\": \"BRL > USDs\",\n                \"min_value\": 0,\n                \"max_value\": 1000000,\n                \"min_time\": null,\n                \"max_time\": null,\n                \"origin_currency\": \"BRL\",\n                \"destination_currency\": \"USDs\",\n                \"origin_account_id\": 9,\n                \"destination_account_id\": 10,\n                \"active_time_windows\": [\n                    \"00:00 -> 23:59\"\n                ]\n            },\n            {\n                \"pair_definition\": \"EUR > BRL\",\n                \"min_value\": 9999999999,\n                \"max_value\": 0,\n                \"min_time\": null,\n                \"max_time\": null,\n                \"origin_currency\": \"EUR\",\n                \"destination_currency\": \"BRL\",\n                \"origin_account_id\": 12,\n                \"destination_account_id\": 9,\n                \"active_time_windows\": [\n                    \"00:00 -> 23:59\"\n                ]\n            },\n            {\n                \"pair_definition\": \"USDs > ARS\",\n                \"min_value\": 0,\n                \"max_value\": 1000000,\n                \"min_time\": null,\n                \"max_time\": null,\n                \"origin_currency\": \"USDs\",\n                \"destination_currency\": \"ARS\",\n                \"origin_account_id\": 10,\n                \"destination_account_id\": 11,\n                \"active_time_windows\": [\n                    \"00:00 -> 23:59\"\n                ]\n            },\n            {\n                \"pair_definition\": \"BRL > ARS\",\n                \"min_value\": 0,\n                \"max_value\": 1000000,\n                \"min_time\": null,\n                \"max_time\": null,\n                \"origin_currency\": \"BRL\",\n                \"destination_currency\": \"ARS\",\n                \"origin_account_id\": 9,\n                \"destination_account_id\": 11,\n                \"active_time_windows\": [\n                    \"00:00 -> 23:59\"\n                ]\n            },\n            {\n                \"pair_definition\": \"BRL > EUR\",\n                \"min_value\": 0,\n                \"max_value\": 200100,\n                \"min_time\": \"09:00:00-03:00\",\n                \"max_time\": \"20:00:00-03:00\",\n                \"origin_currency\": \"BRL\",\n                \"destination_currency\": \"EUR\",\n                \"origin_account_id\": 9,\n                \"destination_account_id\": 12,\n                \"active_time_windows\": [\n                    \"09:00:00-03 -> 18:00:00-03\",\n                    \"19:00:00-03 -> 20:00:00-03\"\n                ]\n            }\n        ],\n        \"configs\": [],\n        \"total\": 5\n    }\n}"}],"_postman_id":"27e7d567-55eb-417b-8b32-e1a062bb8ca2"}],"id":"8ed395b0-d29a-4a11-b41d-545bf397658a","description":"<p>Here are the provided endpoints for the Merchant to check the enabled pairs and the current possible restrictions on each pair;</p>\n","_postman_id":"8ed395b0-d29a-4a11-b41d-545bf397658a"},{"name":"Transactions","item":[{"name":"Get Trades","id":"ce858dd9-4e01-4fff-90a5-118ad5ff849d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/trade?page=1&page_size=10","urlObject":{"path":["trade"],"host":["https://staging-api.bluegreen.im"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"10"},{"disabled":true,"key":"id","value":""},{"disabled":true,"key":"origin_currency_code","value":"[\"BRL\",\"ARS\",\"EUR\",\"USDs\"]"},{"disabled":true,"key":"destination_currency_code","value":"[\"BRL\",\"ARS\",\"EUR\",\"USDs\"]"},{"disabled":true,"key":"origin_account_id","value":""},{"disabled":true,"key":"destination_account_id","value":""},{"disabled":true,"key":"is_expired","value":""},{"disabled":true,"key":"start","value":""},{"disabled":true,"key":"end","value":""},{"disabled":true,"key":"order_id","value":""},{"disabled":true,"key":"operation_code","value":"[\"BUY\", \"SELL\"]"},{"disabled":true,"key":"trade_status_code","value":"[\"QUOTED\",\"PROCESSING\",\"SUCCESS\",\"FAILED\"]"}],"variable":[]}},"response":[{"id":"0cd03b2b-9301-4cc2-b975-0893dd287ac2","name":"Success","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://staging-api.bluegreen.im/trade?page=1&page_size=10","host":["https://staging-api.bluegreen.im"],"path":["trade"],"query":[{"key":"page","value":"1"},{"key":"page_size","value":"10"},{"key":"id","value":"","disabled":true},{"key":"origin_currency_code","value":"[\"BRL\",\"ARS\",\"EUR\",\"USDs\"]","disabled":true},{"key":"destination_currency_code","value":"[\"BRL\",\"ARS\",\"EUR\",\"USDs\"]","disabled":true},{"key":"origin_account_id","value":"","disabled":true},{"key":"destination_account_id","value":"","disabled":true},{"key":"is_expired","value":"","disabled":true},{"key":"start","value":"","disabled":true},{"key":"end","value":"","disabled":true},{"key":"order_id","value":"","disabled":true},{"key":"operation_code","value":"[\"BUY\", \"SELL\"]","disabled":true},{"key":"trade_status_code","value":"[\"QUOTED\",\"PROCESSING\",\"SUCCESS\",\"FAILED\"]","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": null,\n    \"message\": \"Trades fetched successfully!\",\n    \"result\": {\n        \"total\": 150,\n        \"trades\": [\n            {\n                \"created_at\": \"2024-11-17T15:24:27.453170+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T15:29:27.440694+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"e72c5625-9daa-4809-a549-88f53b9656d5\",\n                \"lastupdated_at\": \"2024-11-17T15:24:27.453170+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_854\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12559800.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:13:57.508091+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:18:57.495122+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"63e8e13d-f1be-4cda-b83b-98b0975cd780\",\n                \"lastupdated_at\": \"2024-11-17T02:13:57.508091+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_535\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:13:55.025933+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:18:55.008283+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"e06517dd-9d7c-4325-9a15-9a3913714412\",\n                \"lastupdated_at\": \"2024-11-17T02:13:55.025933+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_489\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:13:48.589244+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:18:48.577009+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"4f77380a-62fc-4d66-a1b7-ac8638c2b2b0\",\n                \"lastupdated_at\": \"2024-11-17T02:13:48.589244+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_588\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:13:41.856104+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:18:41.843664+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"c45d6a93-7d9d-4358-9db0-29b8fdc13f87\",\n                \"lastupdated_at\": \"2024-11-17T02:13:41.856104+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_788\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:13:38.118324+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:18:38.104734+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"3039565e-075f-4cdd-9faa-eee79685f6d2\",\n                \"lastupdated_at\": \"2024-11-17T02:13:38.118324+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_126\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T02:04:08.966653+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T02:09:08.862262+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"02faeb11-1786-4f05-9cf5-fe0df1eebb13\",\n                \"lastupdated_at\": \"2024-11-17T02:04:08.966653+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_252\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12545500.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T01:35:17.758149+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 24,\n                \"destination_currency\": \"USDs\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T01:40:17.674410+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"68f6b133-7128-4c96-a4b7-c42a3a4887b1\",\n                \"lastupdated_at\": \"2024-11-17T01:35:17.758149+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_793\",\n                \"origin_account_id\": 12,\n                \"origin_currency\": \"ARS\",\n                \"origin_currency_value\": 12547700.000000002,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T01:15:11.414272+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 2,\n                \"destination_currency\": \"BRL\",\n                \"destination_currency_value\": 10000.0,\n                \"expired_at\": \"2024-11-17T01:20:11.332513+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"8ed4dc77-9987-4022-8367-53053cd79fdc\",\n                \"lastupdated_at\": \"2024-11-17T01:15:11.414272+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_257\",\n                \"origin_account_id\": 26,\n                \"origin_currency\": \"BTC\",\n                \"origin_currency_value\": 0.020720040234550857,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            },\n            {\n                \"created_at\": \"2024-11-17T01:13:44.002687+00:00\",\n                \"description\": \"\",\n                \"destination_account_id\": 2,\n                \"destination_currency\": \"BRL\",\n                \"destination_currency_value\": 238879.35,\n                \"expired_at\": \"2024-11-17T01:18:43.920798+00:00\",\n                \"failure_reason\": null,\n                \"id\": \"88c48b56-1680-4160-ba5c-c0f2b2d4a255\",\n                \"lastupdated_at\": \"2024-11-17T01:13:44.002687+00:00\",\n                \"operation\": \"SELL\",\n                \"order_id\": \"postman_test_920\",\n                \"origin_account_id\": 26,\n                \"origin_currency\": \"BTC\",\n                \"origin_currency_value\": 0.5,\n                \"total\": 150,\n                \"trade_status\": \"Quoted\"\n            }\n        ]\n    },\n    \"status\": true\n}"}],"_postman_id":"ce858dd9-4e01-4fff-90a5-118ad5ff849d"},{"name":"Create Trade","id":"62daa1b1-3d0f-43c5-bab9-c2597d8ea940","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"origin_account_id\": \"#\",   // Account that will be debit after the trade\r\n    \"destination_account_id\": \"#\",  // Account that will be credited after the trade\r\n    \"order_id\": \"<order_id>\", // External order id for this trade\r\n    //\"origin_amount\": 10,  // [CONDITIONAL*] If filled, indicates the amount to be debited origin account\r\n    //\"destination_amount\": 4000, // [CONDITIONAL*] If filled, indicates the amount to be credited on destination account\r\n    \"description\": \"<description>\"  // [Optional] A description for this operation\r\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/trade","urlObject":{"path":["trade"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[]}},"response":[{"id":"8661fd93-0c5e-4254-9648-e67c86312038","name":"Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"origin_account_id\": \"24\",\r\n    \"destination_account_id\": \"12\",\r\n    \"destination_amount\": 10000.0,\r\n    \"order_id\": \"demo\",\r\n    \"description\": \"demo\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/trade"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Trade created with success\",\n    \"event\": null,\n    \"result\": {\n        \"id\": \"e72c5625-9daa-4809-a549-88f53b9656d5\",\n        \"origin_account_id\": 12,\n        \"origin_currency\": \"ARS\",\n        \"origin_currency_value\": 12559800.0,\n        \"destination_account_id\": 24,\n        \"destination_currency\": \"USDs\",\n        \"destination_currency_value\": 10000.0,\n        \"created_at\": \"2024-11-17T15:24:27.453170+00:00\",\n        \"expire_at\": \"2024-11-17T15:29:27.440694+00:00\",\n        \"operation\": \"SELL\",\n        \"order_id\": \"demo\",\n        \"price\": 0.00078\n    }\n}"},{"id":"1ecb3e94-80ce-4973-b8dc-be54b3c7084b","name":"Pair not found","originalRequest":{"method":"POST","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"origin_account_id\": \"#\",   // Account that will be debit after the trade\r\n    \"destination_account_id\": \"#\",  // Account that will be credited after the trade\r\n    \"order_id\": \"<order_id>\", // External order id for this trade\r\n    //\"origin_amount\": 10,  // [CONDITIONAL*] If filled, indicates the amount to be debited origin account\r\n    //\"destination_amount\": 4000, // [CONDITIONAL*] If filled, indicates the amount to be credited on destination account\r\n    \"description\": \"<description>\"  // [Optional] A description for this operation\r\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/trade"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"event\": {\n        \"code\": \"ETPC1000\",\n        \"message\": \"Pair configuration not found!\"\n    },\n    \"message\": \"Pair configuration (#->#) not found\",\n    \"result\": null,\n    \"status\": false\n}"},{"id":"0def61ea-3a71-43e9-8402-59dcd191fd63","name":"Restricted by time window","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"account_id\": \"9\",\r\n    \"description\": \"demonstration\",\r\n    \"destination_account_id\": \"12\",\r\n    \"origin_account_id\": \"9\",\r\n    \"destination_amount\": 7,\r\n    \"order_id\": \"demonstration\",\r\n    \"operation_code\": \"BUY\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/trade"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"message\": \"Quote is out of business hours\",\n    \"event\": \"Quote should be done between 19:00:00-03:00 and 20:00:00-03:00\",\n    \"result\": null\n}"}],"_postman_id":"62daa1b1-3d0f-43c5-bab9-c2597d8ea940"},{"name":"Accept Trade","id":"d9b2ccb1-f761-4a28-9ac8-e98e5cf2775d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{}","options":{"raw":{"language":"json"}}},"url":"https://staging-api.bluegreen.im/trade/:trade_id/accept","urlObject":{"path":["trade",":trade_id","accept"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[{"type":"any","value":"","key":"trade_id"}]}},"response":[{"id":"eb09fe62-ea3f-40bd-a162-ba5d0ee5461d","name":"Success","originalRequest":{"method":"PUT","header":[],"url":{"raw":"https://staging-api.bluegreen.im/trade/:trade_id/accept","host":["https://staging-api.bluegreen.im"],"path":["trade",":trade_id","accept"],"variable":[{"key":"trade_id","value":"1abeae73-d45b-479d-a847-bff6fb219f4b"}]}},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Trade executed with success!\",\n    \"event\": null,\n    \"result\": {}\n}"}],"_postman_id":"d9b2ccb1-f761-4a28-9ac8-e98e5cf2775d"},{"name":"Cancel Trade","id":"1b98c7c0-2d8e-4bf2-bc53-ffd43942107d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"authkey","value":"","type":"text"},{"key":"signature","value":"","type":"text"}],"url":"https://staging-api.bluegreen.im/trade/:trade_id","urlObject":{"path":["trade",":trade_id"],"host":["https://staging-api.bluegreen.im"],"query":[],"variable":[{"type":"any","value":"","key":"trade_id"}]}},"response":[{"id":"4afdd674-5117-4fa2-af16-25157bf1247e","name":"Success","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"https://staging-api.bluegreen.im/trade/:trade_id","host":["https://staging-api.bluegreen.im"],"path":["trade",":trade_id"],"variable":[{"key":"trade_id","value":"7c23a28e-9a96-496d-aa03-ee1f33975071"}]}},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"message\": \"Trade Status updated successfully!\",\n    \"event\": null,\n    \"result\": {\n        \"trade_updated\": \"success\"\n    }\n}"},{"id":"39d841e2-bb24-46ef-8599-ad930f9f2db3","name":"Attempt to cancel a processing trade","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"https://staging-api.bluegreen.im/trade/:trade_id","host":["https://staging-api.bluegreen.im"],"path":["trade",":trade_id"],"variable":[{"key":"trade_id","value":"1abeae73-d45b-479d-a847-bff6fb219f4b"}]}},"code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": false,\n    \"message\": \"Processing trade can't be canceled!\",\n    \"event\": null,\n    \"result\": null\n}"}],"_postman_id":"1b98c7c0-2d8e-4bf2-bc53-ffd43942107d"}],"id":"cef391b8-a2b9-4d39-93f4-15f786922152","description":"<p>The following endpoints are meant to be used to quote, accept and cancel trades;</p>\n","_postman_id":"cef391b8-a2b9-4d39-93f4-15f786922152"}],"id":"4e674da1-1884-4e3a-b231-435560268f2e","description":"<h1 id=\"overview\">Overview</h1>\n<p>Our <strong>Trade API</strong> allows merchants to execute secure and efficient currency trades by providing a simple and consistent interface. The process ensures all complexity and exception handling is absorbed internally, enabling a seamless experience for users.</p>\n<p>Trades are fully synchronous, meaning that the operation is processed in real-time and does not require any webhook integration.</p>\n<h2 id=\"key-steps\">Key Steps</h2>\n<ol>\n<li><p><strong>Pair Configuration</strong>:<br /> Before initiating trades, merchants must request the Bluegreen team to configure the desired trade pairs. These configurations define the allowed currencies, operational intervals, and any restrictions on minimum or maximum values.</p>\n</li>\n<li><p><strong>Quoting and Trading</strong>:<br /> Once the trade pairs are configured, merchants can start quoting and trading. Each trade request requires a unique <code>order_id</code>, provided by the merchant for tracking purposes.</p>\n</li>\n<li><p><strong>Account Flow</strong>:<br /> All trades are processed from an <code>origin_account</code> to a <code>destination_account</code> as per the pair configuration.</p>\n<ul>\n<li><p>The <code>origin_account</code> is debited during the operation.</p>\n</li>\n<li><p>The <code>destination_account</code> is credited synchronously upon trade confirmation.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Restrictions</strong>:<br /> Trades may have specific operational restrictions:</p>\n<ul>\n<li><p>Minimum and maximum trade values.</p>\n</li>\n<li><p>Trading is subject to operational intervals.</p>\n</li>\n</ul>\n</li>\n</ol>\n<h2 id=\"trade-statuses\">Trade Statuses</h2>\n<p>Trades can have the following statuses:</p>\n<ul>\n<li><p><strong>QUOTED</strong>: The trade request has been initiated with a valid quote.</p>\n</li>\n<li><p><strong>SUCCESS</strong>: The trade has been successfully executed.</p>\n</li>\n<li><p><strong>FAILED</strong>: The trade was either canceled or encountered an error during confirmation.</p>\n</li>\n</ul>\n<h2 id=\"important-notes\">Important Notes</h2>\n<ul>\n<li><p>The trade side is fixed as <strong>SELL</strong> to simplify quoting and ensure API consistency.</p>\n</li>\n<li><p>The <code>base_currency</code> corresponds to the <code>origin_account</code>, and the <code>quote_currency</code> corresponds to the <code>destination_account</code>.</p>\n</li>\n<li><p>The system supports quoting with either the <code>origin_amount</code> or <code>destination_amount</code>.</p>\n</li>\n<li><p>Trades are synchronous and do not rely on webhook callbacks or asynchronous notifications.</p>\n</li>\n</ul>\n<h2 id=\"example-flow\">Example Flow</h2>\n<ol>\n<li><p><strong>Quote Request</strong>:<br /> The merchant requests a quote specifying the <code>origin_account</code>, <code>destination_account</code>, and amount (either origin or destination).</p>\n<ul>\n<li><p>The API responds with:</p>\n<ul>\n<li><p><code>origin_amount</code>: Amount to debit.</p>\n</li>\n<li><p><code>destination_amount</code>: Amount to credit.</p>\n</li>\n<li><p><code>price</code>: Conversion rate.</p>\n</li>\n<li><p><code>id</code>: Unique quote identifier.</p>\n</li>\n<li><p><code>expire_at</code>: Quote expiration time.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>Trade Execution</strong>:</p>\n<ul>\n<li><p>The merchant confirms the quote within the validity period.</p>\n</li>\n<li><p>The system processes the trade atomically, ensuring synchronous updates to account balances.</p>\n</li>\n</ul>\n</li>\n</ol>\n<p>By adhering to these guidelines, the Trade API ensures a reliable and efficient trading experience while maintaining operational consistency and security.</p>\n","_postman_id":"4e674da1-1884-4e3a-b231-435560268f2e"},{"name":"References","item":[{"name":"Indirect Merchants","item":[],"id":"726b9a0b-08d1-47c1-9f8d-b58410cd2b2d","description":"<p>For PSP (Payment Service Provider) merchants, it is mandatory that every final merchant undergoes a thorough onboarding and evaluation process conducted by our operations and compliance teams.</p>\n<p>To properly identify the final merchant associated with a payment order (whether a deposit or withdraw), all order creation endpoints (DEPOSIT and WITHDRAW) require the inclusion of an indirect_merchant_code. <strong>This code is issued once the final merchant has been successfully onboarded and approved.</strong></p>\n<blockquote>\n<p><strong>Important:</strong> The indirect_merchant_code is a required field for initiating payment orders from PSP merchants’ accounts, regardless of the currency involved. </p>\n</blockquote>\n<h3 id=\"examples\">Examples</h3>\n<h5 id=\"initiating-a-deposit-from-a-psp-account-with-an-indirect-merchant-code\">Initiating a Deposit from a PSP Account with an Indirect Merchant Code</h5>\n<p><strong>Endpoint</strong>: <a href=\"https://docs.bluegreenpay.com/#5cb41d5e-7e0d-49d8-ad27-39ce9c801bc8\">Receive via Pix<br /></a><strong>Request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"order_id\": \"BGTEST444\",\n    \"amount\": 1,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    \"payer_tax_id\": \"07962909030\",\n    \"payer_firstname\":\"Paulo\", \n    \"payer_lastname\":\"Silva\"\n    \"indirect_merchant_code\": \"MERC1001PYI\" \n    \"expiration\": 000\n}\n\n</code></pre>\n<p><strong>Response</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": null,\n    \"message\": \"Deposit Initiated Successfully\",\n    \"result\": {\n        \"amount\": 1.00,\n        \"currency\": \"BRL\",      \n        \"deposit_info\": {\n            \"pix_copy_paste\": \"00020101021226990014br.gov.bcb.pix2577pix.bancogenial.com/qrs1/v2/01AwMZqDBaTXofilrND77iB29zrmykK4b7JBRGp9qsD5uHNG55204000053039865406250.005802BR5925BLUEGREEN PAGAMENTOS LTDA6009Sao Paulo62070503***6304F25F\"\n        },\n        \"expire_at\": \"2024-05-04T18:19:25.476158\",\n        \"method\": \"PIX\",\n        \"order_id\": \"BGTESTDOC0001\",\n        \"reference_id\": \"BRL140573\"        \n    },\n    \"status\": true\n}\n\n</code></pre>\n<h5 id=\"initiating-a-deposit-from-a-psp-account-without-an-indirect-merchant-code\">Initiating a Deposit from a PSP Account without an Indirect Merchant Code</h5>\n<p><strong>Endpoint</strong>: <a href=\"https://docs.bluegreenpay.com/#5cb41d5e-7e0d-49d8-ad27-39ce9c801bc8\">Receive via Pix<br /></a><strong>Request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"order_id\": \"BGTEST444\",\n    \"amount\": 1,\n    \"notification_url\": \"https://webhook.site/ea053a0a-e926-4d63-8bcf-8c16f3417fb4\",\n    \"payer_tax_id\": \"07962909030\",\n    \"payer_firstname\":\"Paulo\", \n    \"payer_lastname\":\"Silva\"\n    \"indirect_merchant_code\": null\n    \"expiration\": 000\n}\n\n</code></pre>\n<p><strong>Response</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"event\": {\n        \"code\": \"MER1002\",\n        \"message\": \"Error processing transaction on bank!\"\n    },\n    \"message\": \"Deposit Initiation Failed, indirect_merchant_code is required for this account! \",\n    \"status\": false\n}\n\n</code></pre>\n<h5 id=\"initiating-a-withdrawal-from-a-psp-account-with-an-indirect-merchant-code\">Initiating a Withdrawal from a PSP Account with an Indirect Merchant Code</h5>\n<h5 id=\"initiating-a-withdrawal-from-a-psp-account-without-an-indirect-merchant-code\">Initiating a Withdrawal from a PSP Account without an Indirect Merchant Code</h5>\n","_postman_id":"726b9a0b-08d1-47c1-9f8d-b58410cd2b2d"},{"name":"Event Codes","item":[],"id":"6613752b-4cf4-4f64-b062-db2009c43453","description":"<h1 id=\"event-codes-reference\">Event Codes Reference</h1>\n<p>Event codes provide additional details about API requests and platform events. Below is the reference list:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>CH1010</td>\n<td>Chargeback raised for transaction.</td>\n</tr>\n<tr>\n<td>DST1006</td>\n<td>Deposit successful. (Note: Initiated tax_id and paid tax_id do not match.)</td>\n</tr>\n<tr>\n<td>DST1007</td>\n<td>Deposit successful. (Note: Initiated amount and paid amount do not match.)</td>\n</tr>\n<tr>\n<td>DST1008</td>\n<td>Deposit successful.</td>\n</tr>\n<tr>\n<td>DST1009</td>\n<td>Deposit expired!</td>\n</tr>\n<tr>\n<td>DST1010</td>\n<td>Deposit blocked due to amount mismatch.</td>\n</tr>\n<tr>\n<td>DST1011</td>\n<td>Deposit blocked due to tax_id mismatch.</td>\n</tr>\n<tr>\n<td>EAC1003</td>\n<td>Invalid account details!</td>\n</tr>\n<tr>\n<td>EAC1004</td>\n<td>The provided account key is inactive!</td>\n</tr>\n<tr>\n<td>EAC1005</td>\n<td>Invalid tax_id!</td>\n</tr>\n<tr>\n<td>EAC1006</td>\n<td>Invalid target account key!</td>\n</tr>\n<tr>\n<td>EAC1007</td>\n<td>Provided tax_id does not match with the specified account key.</td>\n</tr>\n<tr>\n<td>EAC1008</td>\n<td>User has been blocked internally!</td>\n</tr>\n<tr>\n<td>EAC1009</td>\n<td>The provided user tax_id belongs to a minor.</td>\n</tr>\n<tr>\n<td>EAC1010</td>\n<td>The provided user tax_id does not exist.</td>\n</tr>\n<tr>\n<td>EAC1011</td>\n<td>The provided user tax_id is inactive.</td>\n</tr>\n<tr>\n<td>QT0001</td>\n<td>Quote configuration is deactivated!</td>\n</tr>\n<tr>\n<td>QT0002</td>\n<td>Value should be higher than {min_value} and lesser than {max_value}!</td>\n</tr>\n<tr>\n<td>QT0003</td>\n<td>Quote should be done between {min_time} and {max_time}.</td>\n</tr>\n<tr>\n<td>QT0004</td>\n<td>Quote should be done on business days.</td>\n</tr>\n<tr>\n<td>QT0005</td>\n<td>Provider '{key}' not found!</td>\n</tr>\n<tr>\n<td>QT0006</td>\n<td>Origin account currency mismatched with origin currency.</td>\n</tr>\n<tr>\n<td>QT0007</td>\n<td>Destination account currency mismatched with destination currency.</td>\n</tr>\n<tr>\n<td>QT0008</td>\n<td>Only origin OR destination amounts can be specified.</td>\n</tr>\n<tr>\n<td>QT0009</td>\n<td>Trade already executed!</td>\n</tr>\n<tr>\n<td>QT0010</td>\n<td>Trade expired! Please create a new quote.</td>\n</tr>\n<tr>\n<td>QT0011</td>\n<td>The trade amount is out of the allowed range!</td>\n</tr>\n<tr>\n<td>ET1001</td>\n<td>Payment has timed out!</td>\n</tr>\n<tr>\n<td>ET1002</td>\n<td>Error processing payment!</td>\n</tr>\n<tr>\n<td>ET1003</td>\n<td>Order ID error!</td>\n</tr>\n<tr>\n<td>ET1004</td>\n<td>Transaction not found!</td>\n</tr>\n<tr>\n<td>ET1005</td>\n<td>Unsupported currency!</td>\n</tr>\n<tr>\n<td>TD1012</td>\n<td>Transaction has timed out!</td>\n</tr>\n<tr>\n<td>RE1011</td>\n<td>Transaction has been refunded!</td>\n</tr>\n<tr>\n<td>EW1004</td>\n<td>Wallet not found!</td>\n</tr>\n<tr>\n<td>EW1005</td>\n<td>Insufficient account wallet balance!</td>\n</tr>\n<tr>\n<td>WST1009</td>\n<td>Withdraw successful.</td>\n</tr>\n<tr>\n<td>WST1010</td>\n<td>Withdraw returned!</td>\n</tr>\n<tr>\n<td>WC999</td>\n<td>Waiting for credit!</td>\n</tr>\n<tr>\n<td>WD1000</td>\n<td>Waiting to process payment!</td>\n</tr>\n<tr>\n<td>WD1001</td>\n<td>We are currently processing your payout!</td>\n</tr>\n<tr>\n<td>EB1004</td>\n<td>Error processing transaction on bank!</td>\n</tr>\n<tr>\n<td>ECB1005</td>\n<td>Callback sending failed!</td>\n</tr>\n<tr>\n<td>EM1006</td>\n<td>Merchant account configuration error!</td>\n</tr>\n<tr>\n<td>EI1005</td>\n<td>Internal error occurred!</td>\n</tr>\n<tr>\n<td>EI1006</td>\n<td>Internal error occurred!</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"6613752b-4cf4-4f64-b062-db2009c43453"}],"id":"157f4cd3-4da2-4448-a3f6-b53bfbfa62a2","_postman_id":"157f4cd3-4da2-4448-a3f6-b53bfbfa62a2","description":""}],"event":[{"listen":"prerequest","script":{"id":"13613c21-2507-49cc-ac21-d3a6a969820d","type":"text/javascript","exec":["const cryptoJs = require('crypto-js'); ","","function buildSignature(key, secret) {","    const epoch = new Date().getTime(); // Get current time in milliseconds","    const plainMessage = `${key}:${epoch}`; // Combine key and timestamp","    console.log(\"plainMessage: \", plainMessage);","","    const passphrase = Buffer.from(secret, 'utf-8');  // Convert to UTF-8 byte array","    const iv = passphrase.slice(0, 16); ","","    const cipher = cryptoJs.AES.encrypt(plainMessage, cryptoJs.enc.Utf8.parse(passphrase.toString()), {","      iv: cryptoJs.enc.Utf8.parse(iv),","      mode: cryptoJs.mode.CBC,","      padding: cryptoJs.pad.Pkcs7","    });","    const signature = cipher.ciphertext.toString();","","    //validate","    var decrypted = cryptoJs.AES.decrypt(cipher,cryptoJs.enc.Utf8.parse(passphrase.toString()), {iv: cryptoJs.enc.Utf8.parse(iv)});","    if (decrypted.toString(cryptoJs.enc.Utf8) !== plainMessage){","         throw new Error();","    }","","    // Set the signature as variable","    pm.collectionVariables.set(\"signature\", signature);","}","","// Retrieve auth keys from Postman environment variables","const authKey = pm.collectionVariables.get(\"authKey\");","const authSecret = pm.collectionVariables.get(\"authSecret\");","buildSignature(authKey, authSecret);"]}},{"listen":"test","script":{"id":"0dc8347a-de1f-4bad-bdac-f57d98a10428","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseURL","value":"https://staging-api.bluegreen.im","type":"string"},{"key":"authKey","value":"","type":"string"},{"key":"authSecret","value":"","type":"string"},{"key":"signature","value":""}]}