API REFERENCE
...
Instant payment
Await for payment status
1 min
{ "name" "status", "method" "get", "url" "https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/status", "description" "get status of the payment initiation", "tab" "examples", "examples" { "languages" \[ { "id" "fvweq0nqdhalyffe0d0lg", "language" "curl", "code" "curl location globoff 'https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/status' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "38mdwydtavypktmmyyuij", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/status',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "gqmrq8b baiol lhm8r m", "language" "javascript", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/status',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "qhrafi5skzh7mtwa1slp8", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/status\\"\n\npayload = {}\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "w3 gcwgthoxs0bib3io0w", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/customer/v1/instant/payments/{id}/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\[\\"content type\\"] = \\"application/json\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "w3 gcwgthoxs0bib3io0w" }, "results" { "languages" \[ { "id" "pw8js gdbzl6hbfnzuncu", "language" "200", "customlabel" "", "code" "{\n \\"id\\" \\"cfa45795 fe16 48e2 a372 130e30a72606\\",\n \\"clientrequestid\\" \\"1a3s2aebe29s2\\", \n \\"amount\\" \\"1333 04\\", \n \\"currency\\" \\"brl\\", \n \\"status\\" \\"consent authoried\\", \n \\"statusreason\\" {\n \\"code\\" \\"nao informado\\", \n \\"message\\" \\"erro não informado na iniciadora ou detentora de conta \\" \n }, \n \\"statusupdateat\\" \\"2022 09 23t03 39 43 737z\\" \n}" } ], "selectedlanguageid" "pw8js gdbzl6hbfnzuncu" }, "request" { "pathparameters" \[ { "name" "id", "kind" "required", "type" "string", "description" "payment initiation order id, it will be returned when post /payments is called ", "" "payment initiation order id, it will be returned when post /payments is called " } ], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "jwt bearer token", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" }, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "id of the payment order" }, { "name" "clientrequestid", "kind" "optional", "type" "string", "description" "merchant's internal orderid only can be used for once ", "children" \[] }, { "name" "amount", "kind" "optional", "type" "string", "description" "amount that will be paid by the user", "children" \[] }, { "name" "currency", "kind" "optional", "type" "string", "description" "currency", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "status", "children" \[] }, { "name" "statusreason", "kind" "optional", "type" "object", "description" "status update reason", "children" \[ { "name" "code", "kind" "optional", "type" "string", "description" "" }, { "name" "message", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "statusupdateat", "kind" "optional", "type" "string", "description" "status update time", "children" \[] } ] } if the status of user consent is consent authorized means that the authentication has been passed, and redirectconsenturl will not be returned redirectconsenturl this url can only be accessed once, and it has 60 seconds to be accessed