Onramp API Integration.
Orders
Fetch Order Status
1 min
{ "tab" "examples", "url" "https //stg api onmeta in/v1/orders/status", "name" "fetch order status", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "authorization", "type" "string", "children" \[], "description" "bearer \<authtoken>" }, { "kind" "required", "name" "x api key", "type" "string", "children" \[], "description" "api key from dashboard" } ], "bodydataparameters" \[ { "kind" "required", "name" "orderid", "type" "string", "description" "order id from create order response " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "klsdtrdrdzopayfmyp7hi", "code" "{\n \\"success\\" true,\n \\"data\\" {\n \\"status\\" \\"fiatpending\\",\n \\"reason\\" \\"\\",\n \\"transactionhash\\" \\"\\",\n \\"explorerurl\\" \\"\\",\n \\"transferredamount\\" \\"\\",\n \\"transferredamountwei\\" \\"\\",\n \\"fiat\\" 100,\n \\"receiverwalletaddress\\" \\"0xcdf10bc7a1fae391ff18f4c220ace912547971cc\\",\n \\"buytokensymbol\\" \\"wmatic\\",\n \\"buytokenaddress\\" \\"0x9c3c9283d3e44854697cd22d3faa240cfb032889\\",\n \\"currency\\" \\"inr\\",\n \\"created at\\" \\"2022 10 13t19 07 30 155z\\",\n \\"updated at\\" \\"2022 10 13t19 07 30 155z\\",\n \\"chainid\\" 80001,\n \\"customer\\" {\n \\"email\\" \\"testa\@test com\\",\n \\"phone\\" {\n \\"countrycode\\" \\"+91\\",\n \\"number\\" \\"919191919\\"\n },\n \\"created at\\" \\"2022 04 05t12 13 51 899z\\"\n },\n \\"orderid\\" \\"1312151618191\\"\n },\n \\"error\\" {}\n}", "language" "200", "customlabel" "" }, { "id" "fmnzryjvcqxq52h3madqn", "code" "{\n \\"success\\" false,\n \\"error\\" {\n \\"code\\" 400,\n \\"message\\" \\"bad request\\"\n }\n}", "language" "400", "customlabel" "" }, { "id" "vpgrkty arg05t6y0lm1i", "code" "{\n \\"success\\" false,\n \\"error\\" {\n \\"code\\" 401,\n \\"message\\" \\"unauthorized to access\\"\n }\n}", "language" "401", "customlabel" "" } ], "selectedlanguageid" "vpgrkty arg05t6y0lm1i" }, "examples" { "languages" \[ { "id" "mgqt81l9bcbfpbl1vvhzj", "code" "curl location request get 'https //stg api onmeta in/v1/orders/status' \\\\\n header 'accept application/json' \\\\\n header 'authorization string' \\\\\n header 'x api key string' \\\\\n data raw '{\\"orderid\\" \\"string\\"}'", "language" "curl", "customlabel" "" }, { "id" "gix fp5fxm9n6diirheqw", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //stg api onmeta in/v1/orders/status',\n 'headers' {\n 'accept' 'application/json',\n 'authorization' 'string',\n 'x api key' 'string'\n },\n body '{\\"orderid\\" \\"string\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "language" "nodejs", "customlabel" "" }, { "id" "icb47k am drdmmc8yw2o", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\nmyheaders append(\\"x api key\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"orderid\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //stg api onmeta in/v1/orders/status\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "language" "javascript", "customlabel" "" }, { "id" "ajxudk2lxirgxpmwwjjvi", "code" "import requests\n\nurl = \\"https //stg api onmeta in/v1/orders/status\\"\n\npayload = \\"{\\\\\\"orderid\\\\\\" \\\\\\"string\\\\\\"}\\"\nheaders = {\n 'accept' 'application/json',\n 'authorization' 'string',\n 'x api key' 'string'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "language" "python", "customlabel" "" }, { "id" "smlweyn qrqk7nebq6yrn", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //stg api onmeta in/v1/orders/status\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"authorization\\"] = \\"string\\"\nrequest\[\\"x api key\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"orderid\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "language" "ruby", "customlabel" "" } ], "selectedlanguageid" "ajxudk2lxirgxpmwwjjvi" }, "description" "fetch order status with order id ", "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } } sample request body { "orderid" "1312151618191" }