API REFERENCE
...
Automatic Pix
Create a retry payment
1 min
{ "name" "/consents/{consentid}/payments/{paymentid}/retry", "method" "post", "url" "https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/retry", "description" "create a retry payment", "tab" "examples", "examples" { "languages" \[ { "id" "zceqa0kqiasi1kluol9op", "language" "curl", "code" "curl location globoff request get 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/retry' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\\"clientrequestid\\" \\"string\\",\\"date\\" \\"string\\"}'", "customlabel" "" }, { "id" "esynxu9z3zluvwhapquud", "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}/retry',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"clientrequestid\\" \\"string\\",\n \\"date\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "2wyqydtpkw1dqn0xnpu7b", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"clientrequestid\\" \\"string\\",\n \\"date\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/retry\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "z p5imtq ddo7djm3gzyw", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents/{consentid}/payments/{paymentid}/retry\\"\n\npayload = json dumps({\n \\"clientrequestid\\" \\"string\\",\n \\"date\\" \\"string\\"\n})\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" "uqzj0lg4gzpkprwjhhmc1", "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}/retry\\")\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\\"\nrequest body = json dump({\n \\"clientrequestid\\" \\"string\\",\n \\"date\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "zceqa0kqiasi1kluol9op" }, "results" { "languages" \[ { "id" "4v4qf buqh allhu9hhoo", "language" "201", "code" "{\n \\"id\\" \\"fcb72e3a b346 4f71 b044 971dc23232c9\\",\n \\"clientrequestid\\" \\"fcb72e3a b346 4f71 b044 dsndsnmnkdsmk\\",\n \\"status\\" \\"canceled\\",\n \\"statusreason\\" {\n \\"code\\" \\"nao informado\\", \n \\"messa\tge\\" \\"erro não informado na iniciadora ou detentora de conta \\" \n } \n}", "customlabel" "" } ], "selectedlanguageid" "4v4qf buqh allhu9hhoo" }, "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" \[ { "name" "clientrequestid", "kind" "required", "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", "" "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" }, { "name" "date", "kind" "required", "type" "string", "description" "maxlength 10\npattern ^(\\\d{4}) (1\[0 2]|0?\[1 9]) (3\[01]|\[12]\[0 9]|0?\[1 9])$\nexample 2021 01 01\ndate of payment creation", "" "maxlength 10\npattern ^(\\\d{4}) (1\[0 2]|0?\[1 9]) (3\[01]|\[12]\[0 9]|0?\[1 9])$\nexample 2021 01 01\ndate of payment creation" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "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" "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" } ] } ] }