API Reference-Management
Automatic Pix
Get consent list
1 min
{ "name" "consents", "method" "get", "url" "https //api sandbox klavi ai/payment/management/v1/merchants/automatic/{appid}/consents", "description" "get consent list only for automatic pix payment", "tab" "examples", "examples" { "languages" \[ { "id" "wt0jp vpzj1mblilrw9e5", "language" "curl", "code" "curl location globoff 'https //api sandbox klavi ai/payment/management/v1/merchants/automatic/{appid}/consents' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "zle0qimb1s978330y8ou9", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sandbox klavi ai/payment/management/v1/merchants/automatic/{appid}/consents',\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" "1rxdqi1k amzerjxvtojt", "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/management/v1/merchants/automatic/{appid}/consents\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" " a5uj1tu9upz ygmdwgrk", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/management/v1/merchants/automatic/{appid}/consents\\"\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" " aosjvfekgnrrtzs2z5ls", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/management/v1/merchants/automatic/{appid}/consents\\")\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" "wt0jp vpzj1mblilrw9e5" }, "results" { "languages" \[ { "id" "lrie5lt1cwvhh3rvhvk 1", "language" "200", "code" "{\n \\"data\\" \[\n {\n \\"id\\" \\"fcb72e3a b346 4f71 b044 971dc23232c9\\", // required\n \\"appid\\" \\"0b59d801 08e0 4e84 9ecd 569f34e32279\\", // required\n \\"merchantcode\\" \\"0b59d801 08e0 4e84 9ecd 569f34e32279\\", // required\n \\"clientrequestid\\" \\"fcb72e3a b346 4f71 b044 dsndsnmnkdsmk\\", // required\n \\"institutionid\\" \\"c8f0bf49 4744 4933 8960 7add6e590841\\", // required\n \\"customer\\" \n {\n \\"identifiertype\\" \\"cpf\\", // required, cpf | cnpj\n \\"identifier\\" \\"76109277673\\", // required, mask this field\n \\"name\\" \\"joão silva\\", // required\n \\"phone\\" \\"12345\\", // optional, mask this field\n \\"email\\" \\"123\@123 com\\" // optional, mask this field\n }, // required\n \\"loggedusercpf\\" \\"76109277673\\", // required if customer identifiertype = cnpj\n \\"ofconsentid\\" \\"yyt72e3a b846 i771 b044 971dc232ujd8\\", // optional\n \\"redirecturl\\" \\"//close\\", // optional, return url after user checkout in klavi env\n \\"additionalinformation\\" \\"any description\\", // optinal, consent description\n \\"debtoraccount\\" \n {\n \\"ispb\\" \\"00000000\\", // required, ispb (brazilian payment system identifier) of the spi (instant payment system)\n \\"issuer\\" \\"0001\\", // optional, code of the issuing agency of the account without digit \n \\"number\\" \\"324223\\", // required, account number\n \\"accounttype\\" \\"cacc\\" // required, cacc(current account)|svgs(savings account)|tran(transactingaccount)\n }, // optinal, payer's account\n \\"creditoraccount\\" \n {\n \\"ispb\\" \\"00000000\\", // required\n \\"issuer\\" \\"0001\\", // optional, mask this field\n \\"number\\" \\"324223\\", // required, mask this field\n \\"accounttype\\" \\"cacc\\", // required\n \\"holder\\" \n {\n \\"identifier\\" \\"76109277673\\", // required, mask this field\n \\"name\\" \\"john doe\\", // required\n \\"identifiertype\\" \\"cpf\\" // required\n } // required\n }, // required\n \\"paymentmethod\\" \\"automatic pix\\", // required\n \\"paymentmethodconfig\\" {\n \\"contractid\\" \\"premiumplan123456\\", // required\n \\"fixedamount\\" \\"10000 05\\", // optional\n \\"minimumvariableamount\\" \\"100 01\\", // optional\n \\"maximumvariableamount\\" \\"100 01\\", // optional\n \\"currency\\" \\"brl\\", // required\n \\"interval\\" \\"monthly\\", // required\n \\"referencestartdate\\" \\"2025 06 01\\",\n \\"contractdebtor\\" {\n \\"identifiertype\\" \\"cpf\\", // required, cpf | cnpj\n \\"identifier\\" \\"76109277673\\", // required, mask this field\n \\"name\\" \\"joão da silva\\" // required\n },\n \\"isretryaccepted\\" true, // required\n \\"useoverdraftlimit\\" true, // required\n \\"firstpayment\\" {\n \\"clientrequestid\\" \\"fcb72e3a b346 4f71 b044 dsndsnmnkdsmk\\", // required\n \\"remittanceinformation\\" \\"description\\", // optional\n \\"date\\" \\"2025 05 15\\", // required\n \\"amount\\" \\"3000 02\\", // required\n \\"currency\\" \\"brl\\" // required\n } // optional\n },\n \\"externalinfo\\" \n {\n \\"key\\" \\"value\\"\n }, // optional\n \\"expirationdatetime\\" \\"2023 01 23t23 59 59\\", // optional \n \\"status\\" \\"canceled\\", // required\n \\"statusreason\\" {\n \\"code\\" \\"nao informado\\", // required\n \\"message\\" \\"erro não informado na iniciadora ou detentora de conta \\" // required\n }, // optional\n \\"createat\\" \\"2023 01 23t14 17 06 45z\\", // required\n \\"updateat\\" \\"2023 01 23t14 17 06 45z\\", // required\n \\"statusupdateat\\" \\"2023 01 23t14 17 06 45z\\" // optional\n }\n ],\n \\"paging\\" {\n \\"nextcursor\\" \\"eyjjcmvhdgvkx2f0ijnbhew1lbnrfawqioijwyxlfmtizin0\\", // optional\n \\"prevcursor\\" \\"eyjjcmvhdgvkx2f0ijnbhew1lbnrfawqioijwyxlfmtewin0\\", // optional\n \\"hasnext\\" true, // required\n \\"hasprev\\" true // required\n }\n}", "customlabel" "" } ], "selectedlanguageid" "lrie5lt1cwvhh3rvhvk 1" }, "request" { "pathparameters" \[ { "name" "appid", "kind" "required", "type" "string", "description" "id of application for partner", "" "id of application for partner" } ], "queryparameters" \[ { "name" "startdate", "kind" "optional", "type" "string", "description" "start date\nfor example 2025 06 01", "" "start date\nfor example 2025 06 01" }, { "name" "enddate", "kind" "optional", "type" "string", "description" "end date\nfor example 2025 06 01", "" "end date\nfor example 2025 06 01" }, { "name" "pagesize", "kind" "optional", "type" "string", "description" "page size(default 20, max 200)", "" "pagesize" }, { "name" "cursor", "kind" "optional", "type" "string", "description" "page cursor", "" "page cursor" } ], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "bearer access token, it returned by the /auth", "" "bearer access token, it returned by the /auth" } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "query parameter", "value" "queryparameters" }, "hastryitout" false, "response" \[ { "name" "data", "kind" "optional", "type" "object", "description" "consent object", "children" \[ { "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" "appid", "kind" "optional", "type" "string", "description" "app id for partner" }, { "name" "merchantcode", "kind" "optional", "type" "string", "description" "merchant code" }, { "name" "clientrequestid", "kind" "optional", "type" "string", "description" "your internal orderid only can be used for once " }, { "name" "institutionid", "kind" "optional", "type" "string", "description" "id from the bank chosen by the user" }, { "name" "customer", "kind" "optional", "type" "object", "description" "user (natural person) who is logged in to the payment initiator institution", "children" \[ { "name" "identifiertype", "kind" "optional", "type" "string", "description" "type of the user identification document cnpj or cpf\nif value is cpf \nmaxlength 3\nexample cpf\npattern ^\[a z]{3}$\n\nif value is cnpj\nmaxlength 4\nexample cnpj\npattern ^\[a z]{4}$" }, { "name" "identifier", "kind" "optional", "type" "string", "description" "the number of the user identification document\nif identifiertype value is cpf \nmaxlength 11\nexample 11111111111\npattern ^\\\d{11}$\n\nif identifiertype value is cnpj \nmaxlength 14\nexample 11111111111111\npattern ^\\\d{14}$" }, { "name" "name", "kind" "optional", "type" "string", "description" "username" }, { "name" "phone", "kind" "optional", "type" "string", "description" "user's phone number" }, { "name" "email", "kind" "optional", "type" "string", "description" "user's email" } ] }, { "name" "loggedusercpf", "kind" "optional", "type" "string", "description" "user (natural person) who is logged in to the payment initiator institution \nrequired if customer identifiertype = cnpj" }, { "name" "ofconsentid", "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" "redirecturl", "kind" "optional", "type" "string", "description" "return rediect url after user checkout in klavi env" }, { "name" "additionalinformation", "kind" "optional", "type" "string", "description" "must be filled in whenever the paying user enters some additional information in the consent\nexample minha recorrência\npattern \[\\\w\\\w\\\s] \nmaxlength 140" }, { "name" "debtoraccount", "kind" "optional", "type" "object", "description" "payer's origin account information", "children" \[ { "name" "ispb", "kind" "optional", "type" "string", "description" "minlength 8\nmaxlength 8\npattern ^\[0 9]{8}$\nexample 12345678\nit must be filled in with the ispb (brazilian payment system identifier) of the spi participant (instant payment system) with numbers only " }, { "name" "issuer", "kind" "optional", "type" "string", "description" "minlength 1\nmaxlength 4\npattern ^\[0 9]{1,4}$\nexample 1774\ncode of the agency issuing the account without digit \n \[restriction] mandatory for the following account types cacc (conta deposito a vista) and svgs (conta poupanca) " }, { "name" "number", "kind" "optional", "type" "string", "description" "minlength 1\nmaxlength 20\npattern ^\[0 9]{1,20}$\nexample 1234567890\nit must be filled in with the paying user's transactional account number, with verification digit (if any),\nif there is an alphanumeric value, it should be converted to 0 " }, { "name" "accounttype", "kind" "optional", "type" "string", "description" "types of accounts used for payment \nexample cacc\nenum \[ cacc, svgs, tran]\n cacc current current account\n svgs savings saving account\n tran transactingaccount prepaid payment account" } ] }, { "name" "creditoraccount", "kind" "optional", "type" "object", "description" "object containing the data of the recipient (creditor)", "children" \[ { "name" "ispb", "kind" "optional", "type" "string", "description" "minlength 8\nmaxlength 8\npattern ^\[0 9]{8}$\nexample 12345678\nit must be filled in with the ispb (brazilian payment system identifier) of the spi participant (instant payment system) with numbers only " }, { "name" "issuer", "kind" "optional", "type" "string", "description" "minlength 1\nmaxlength 4\npattern ^\[0 9]{1,4}$\nexample 1774\ncode of the agency issuing the account without digit \n \[restriction] mandatory for the following account types cacc (conta deposito a vista) and svgs (conta poupanca) " }, { "name" "number", "kind" "optional", "type" "string", "description" "minlength 1\nmaxlength 20\npattern ^\[0 9]{1,20}$\nexample 1234567890\nit must be filled in with the paying user's transactional account number, with verification digit (if any),\nif there is an alphanumeric value, it should be converted to 0 " }, { "name" "accounttype", "kind" "optional", "type" "string", "description" "types of accounts used for payment \nexample cacc\nenum \[ cacc, svgs, tran]\n cacc current current account\n svgs savings saving account\n tran transactingaccount prepaid payment account" }, { "name" "holder", "kind" "optional", "type" "object", "description" "holder object", "children" \[ { "name" "identifier", "kind" "optional", "type" "string", "description" "the number of the user identification document\nif identifiertype value is cpf \nmaxlength 11\nexample 11111111111\npattern ^\\\d{11}$\n\nif identifiertype value is cnpj \nmaxlength 14\nexample 11111111111111\npattern ^\\\d{14}$" }, { "name" "name", "kind" "optional", "type" "string", "description" "username" }, { "name" "identifiertype", "kind" "optional", "type" "string", "description" "type of the user identification document cnpj or cpf\nif value is cpf \nmaxlength 3\nexample cpf\npattern ^\[a z]{3}$\n\nif value is cnpj\nmaxlength 4\nexample cnpj\npattern ^\[a z]{4}$" } ] } ] }, { "name" "paymentmethod", "kind" "optional", "type" "string", "description" "field intended for the configuration of the different recurring payment products " }, { "name" "paymentmethodconfig", "kind" "optional", "type" "object", "description" "field intended for the configuration of the different recurring payment products ", "children" \[ { "name" "contractid", "kind" "optional", "type" "string", "description" "pattern ^\[a za z0 9]{1,35}$\nminlength 1\nmaxlength 35\nexample xe00038166201907261559y6j6\ntransaction contract identifier" }, { "name" "fixedamount", "kind" "optional", "type" "string", "description" "pattern ^((\\\d{1,16}\\\\ \\\d{2}))$\nminlength 4\nmaxlength 19\nexample 100000 12\nfixed charge amount, if filled in, represents a consent for payments of fixed amounts, or not subject to change during the validity of the consent " }, { "name" "minimumvariableamount", "kind" "optional", "type" "string", "description" "pattern ^((\\\d{1,16}\\\\ \\\d{2}))$\nminlength 4\nmaxlength 19\nexample 1000000 12\nvalue defined by the receiving user if the paying user assigns a maximum amount for payments of that authorization (field “maximumvariableamount”), it cannot be lower than the floor set by the receiving user " }, { "name" "maximumvariableamount", "kind" "optional", "type" "string", "description" "pattern ^((\\\d{1,16}\\\\ \\\d{2}))$\nminlength 4\nmaxlength 19\nexample 1000000 12\nmaximum allowed value per charge, if filled in, represents consent to payments of variable amounts " }, { "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 " }, { "name" "interval", "kind" "optional", "type" "string", "description" "example monthly\nenum \[ weekly,monthly,yearly,semiannual,quarterly ]\ndefines the allowed periodicity for transaction execution" }, { "name" "referencestartdate", "kind" "optional", "type" "string", "description" "pattern ^(\\\d{4}) (1\[0 2]|0?\[1 9]) (3\[01]|\[12]\[0 9]|0?\[1 9])$\nexample 2023 05 21\nrepresents the expected date for the start of the collection cycle for payments associated with recurrence it is a string with date according to rfc 3339 specification, following brasília time (utc 3) the initial bulk payment, declared in the firstpayment object of the consent, is not subject to this date " }, { "name" "contractdebtor", "kind" "optional", "type" "object", "description" "information about the customer who owes the contract ", "children" \[ { "name" "identifiertype", "kind" "optional", "type" "string", "description" "enum \[ cpf, cnpj ]\ntype of the user identification document cnpj or cpf" }, { "name" "identifier", "kind" "optional", "type" "string", "description" "maxlength 14\nexample 11111111111111\npattern ^(\[0 9]{11})$|^(\[0 9a z]{12}\[0 9]{2})$\nthe number of the user identification document" }, { "name" "name", "kind" "optional", "type" "string", "description" "pattern ^(\[a za zà öø öø ÿ, @ & + <>()!?/\\\\\\\\$%\\\d' ]+)$\nmaxlength 120\nexample policarpo quaresma" } ] }, { "name" "isretryaccepted", "kind" "optional", "type" "boolean", "description" "example false\nindicates whether the receiving customer is allowed to make payment attempts (extradition), according to the rules set out in the pix arrangement " }, { "name" "useoverdraftlimit", "kind" "optional", "type" "boolean", "description" "default true\nexample true\nindicates whether the paying user has authorized the use of pre approved limit (special check) in his account for making payments, if the customer owns the product " }, { "name" "firstpayment", "kind" "optional", "type" "object", "description" "definitions for the first payment it is considered as the payment of membership to the service by the paying user ", "children" \[ { "name" "clientrequestid", "kind" "optional", "type" "string", "description" "your internal orderid only can be used for once " }, { "name" "remittanceinformation", "kind" "optional", "type" "string", "description" "maxlength 140\npattern \[\\\w\\\w\\\s] \nexample pagamento da nota rsto035 002\nit must be filled in whenever the paying user enters some additional information in a payment, to be sent to the recipient " }, { "name" "date", "kind" "optional", "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\ndefines the target date for payment settlement the brasília time zone should be used to create and streamline the data in this field " }, { "name" "amount", "kind" "optional", "type" "string", "description" "minlength 4\nmaxlength 19\npattern ^((\\\d{1,16}\\\\ \\\d{2}))$\nexample 100000 12\nthe transaction value with 2 decimal places " }, { "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 " } ] } ] }, { "name" "externalinfo", "kind" "optional", "type" "object", "description" "metadata, user customizable", "children" \[ { "name" "key", "kind" "optional", "type" "string", "description" "" } ] }, { "name" "expirationdatetime", "kind" "optional", "type" "string", "description" "the date and time when the consent shall cease to be valid a string with date and time as specified in rfc 3339, always using the utc time format \nexample 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" }, { "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 ]" }, { "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" "createat", "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\ncreate time" }, { "name" "updateat", "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\nconsent update time" }, { "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" } ] }, { "name" "paging", "kind" "optional", "type" "object", "description" "paging object", "children" \[ { "name" "nextcursor", "kind" "optional", "type" "string", "description" "next cursor" }, { "name" "prevcursor", "kind" "optional", "type" "string", "description" "prev cursor" }, { "name" "hasnext", "kind" "optional", "type" "boolean", "description" "has next" }, { "name" "hasprev", "kind" "optional", "type" "boolean", "description" "has prev" } ] } ] }