API REFERENCE
...
Automatic Pix
Get the payment status
1 min
{ "name" "/consents/{consentid}/payments/{paymentid}/status", "method" "get", "url" "https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/status", "description" "get the payment status", "tab" "examples", "examples" { "languages" \[ { "id" "fu6t3b19jeiuiagdzxdyl", "language" "curl", "code" "curl location globoff 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/status' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "hqk2dmdglyxbnbsjgdk2m", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/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" "ej61g70ovi3pf97isb0iq", "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/{consentid}/payments/{paymentid}/status\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "rwj90ng9ysjhnmfbbh g2", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/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" "mdutupamgkp5z0d4lx1sb", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/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" "fu6t3b19jeiuiagdzxdyl" }, "results" { "languages" \[ { "id" "naxwiyx7de5edui1yybx5", "language" "200", "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}", "customlabel" "" } ], "selectedlanguageid" "naxwiyx7de5edui1yybx5" }, "request" { "pathparameters" \[ { "name" "consentid", "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" }, { "name" "paymentid", "kind" "required", "type" "string", "description" "pattern ^urn \[a za z0 9]\[a za z0 9\\\\ ]{0,31} \[a za z0 9()+,\\\\ =@;$ ! '%\\\\/?#]+$\nmaxlength 256\npayment id", "" "pattern ^urn \[a za z0 9]\[a za z0 9\\\\ ]{0,31} \[a za z0 9()+,\\\\ =@;$ ! '%\\\\/?#]+$\nmaxlength 256\npayment id" } ], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "jwt bearer token", "" "jwt bearer token" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" }, "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\npayment 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" "amount", "kind" "optional", "type" "string", "description" "minlength 4\nmaxlength 19\npattern ^((\\\d{1,16}\\\\ \\\d{2}))$\nexample 100000 12\ntransaction value with 2 decimal places", "children" \[] }, { "name" "currency", "kind" "optional", "type" "string", "description" "maxlength 3\npattern ^(\[a z]{3})$\nexample brl\nnational currency code according to iso 4217, i e , 'brl' all reported monetary values are represented with the current currency of brazil", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "example payment pending\nenum \n\[payment pending,payment ready for settlement,payment scheduled,payment settlement processing, payment completed,payment rejected]", "children" \[] }, { "name" "statusreason", "kind" "optional", "type" "object", "description" "status reason 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" "maxlength 20\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$\nexample 2020 07 21t08 30 00z", "children" \[] } ] }