API REFERENCE
...
Automatic Pix
Get the consent status
1 min
{ "name" "/consent/{id}/status", "method" "get", "url" "https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{id}/status", "description" "get the consent status", "tab" "examples", "examples" { "languages" \[ { "id" " urlgqz ok8zdpo gg8ea", "language" "curl", "code" "curl location globoff 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{id}/status' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "a2fvqefx1bacipuca6lqj", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{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" "cgsdkchlxv0ornhxg9ufg", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{id}/status\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "sn5sp1 vojtj94j vikv8", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{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" "emysays2vhx8ul1qrfh o", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{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" " urlgqz ok8zdpo gg8ea" }, "results" { "languages" \[ { "id" "7vcibyv977aurqgrywxq ", "language" "200", "code" "{\n \\"id\\" \\"cfa45795 fe16 48e2 a372 130e30a72606\\", \n \\"clientrequestid\\" \\"1a3s2aebe29s2\\", \n \\"status\\" \\"consent authoried\\", \n \\"statusreason\\" {\n \\"code\\" \\"nao informado\\", \n \\"message\\" \\"erro não informado na iniciadora ou detentora de conta \\" // required\n }, \n \\"statusupdateat\\" \\"2022 09 23t03 39 43 737z\\" \n}", "customlabel" "" } ], "selectedlanguageid" "7vcibyv977aurqgrywxq " }, "request" { "pathparameters" \[ { "name" "id", "kind" "required", "type" "string", "description" "pattern ^urn \[a za z0 9]\[a za z0 9\\\\ ]{0,31} \[a za z0 9()+,\\\\ =@;$ ! '%\\\\/?#]+$\nmaxlength 256\nconsent id", "" "pattern ^urn \[a za z0 9]\[a za z0 9\\\\ ]{0,31} \[a za z0 9()+,\\\\ =@;$ ! '%\\\\/?#]+$\nmaxlength 256\nconsent id" } ], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "jwt bearer token", "" "jwt bearer token" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" }, "hastryitout" false, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "pattern ^urn \[a za z0 9]\[a za z0 9\\\\ ]{0,31} \[a za z0 9()+,\\\\ =@;$ ! '%\\\\/?#]+$\nmaxlength 256\nconsent id" }, { "name" "clientrequestid", "kind" "optional", "type" "string", "description" "your internal orderid only can be used for once \nyou can use it to associate a payment and you can use uuid generation algorithm to generate it", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "example consent awaiting authorization\ncurrent status of recurring consent according to the state machine\nenum \n \[ started,expired,consent awaiting authorization, consent authorized, consent rejected, consent partially accepted, consent revoked, consent period expired, canceled, error ]", "children" \[] }, { "name" "statusreason", "kind" "optional", "type" "object", "description" "status reson object", "children" \[ { "name" "code", "kind" "optional", "type" "string", "description" "example consent awaiting authorization\nenum \n\[not informed,infrastructure failure,authorization expired time, user rejected, origin destination accounts equal, account does not allow payment, divergent authentication, not informed, revoked user, revoked merchant ]" }, { "name" "message", "kind" "optional", "type" "string", "description" "pattern \[wws] \nlength 2048\nexample user refused consent\nstatus message" } ] }, { "name" "statusupdateat", "kind" "optional", "type" "string", "description" "example 2021 05 21t08 30 00z\npattern ^(\\\d{4}) (1\[0 2]|0?\[1 9]) (3\[01]|\[12]\[0 9]|0?\[1 9])t(? \[01]\\\d|2\[0123]) (? \[012345]\\\d) (? \[012345]\\\d)z$\nmaxlength 20\nstatus update time", "children" \[] } ] }