API REFERENCE
...
Automatic Pix
Create a consent
1 min
{ "name" "/consents", "method" "post", "url" "https //api sandbox klavi ai/payment/customer/v1/automatic/consents", "description" "create a consent", "tab" "examples", "examples" { "languages" \[ { "id" "r1ygaojhrwizuno mbmfq", "language" "curl", "code" "curl location 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\\"clientrequestid\\" \\"string\\",\\"institutionid\\" \\"string\\",\\"creditoraccount\\" {\\"holder\\" {}},\\"paymentmethodconfig\\" {\\"contractdebtor\\" {},\\"firstpayment\\" {}}}'", "customlabel" "" }, { "id" "fko5 d6ytvutldzm5 wfn", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sandbox klavi ai/payment/customer/v1/automatic/consents',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"clientrequestid\\" \\"string\\",\n \\"institutionid\\" \\"string\\",\n \\"creditoraccount\\" {\n \\"holder\\" {}\n },\n \\"paymentmethodconfig\\" {\n \\"contractdebtor\\" {},\n \\"firstpayment\\" {}\n }\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "yarbaw0v ohoiotoepsg1", "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 \\"institutionid\\" \\"string\\",\n \\"creditoraccount\\" {\n \\"holder\\" {}\n },\n \\"paymentmethodconfig\\" {\n \\"contractdebtor\\" {},\n \\"firstpayment\\" {}\n }\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "7dzrgznat9jwtkcfk wxl", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents\\"\n\npayload = json dumps({\n \\"clientrequestid\\" \\"string\\",\n \\"institutionid\\" \\"string\\",\n \\"creditoraccount\\" {\n \\"holder\\" {}\n },\n \\"paymentmethodconfig\\" {\n \\"contractdebtor\\" {},\n \\"firstpayment\\" {}\n }\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "g1fg3yuacckez2painfqu", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/customer/v1/automatic/consents\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"clientrequestid\\" \\"string\\",\n \\"institutionid\\" \\"string\\",\n \\"creditoraccount\\" {\n \\"holder\\" {}\n },\n \\"paymentmethodconfig\\" {\n \\"contractdebtor\\" {},\n \\"firstpayment\\" {}\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "r1ygaojhrwizuno mbmfq" }, "results" { "languages" \[ { "id" "ox o udv0xkxmkp43vn9r", "language" "201", "code" "{\n \\"id\\" \\"fcb72e3a b346 4f71 b044 971dc23232c9\\", \n \\"clientrequestid\\" \\"fcb72e3a b346 4f71 b044 dsndsnmnkdsmk\\",\n \\"status\\" \\"consent awaiting authorization\\",\n \\"statusreason\\" {\n \\"code\\" \\"nao informado\\",\n \\"message\\" \\"erro não informado na iniciadora ou detentora de conta \\"\n },\n \\"consentredirecturl\\" \\"https //server example com/cb\\"\n}", "customlabel" "" } ], "selectedlanguageid" "ox o udv0xkxmkp43vn9r" }, "request" { "pathparameters" \[], "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" "institutionid", "kind" "required", "type" "string", "description" "id from the bank chosen by the user", "" "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", "" "user (natural person) who is logged in to the payment initiator institution", "children" \[ { "name" "identifiertype", "kind" "required", "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" "required", "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" } ], "schema" \[ { "name" "identifiertype", "kind" "required", "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" "required", "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", "" "user (natural person) who is logged in to the payment initiator institution \nrequired if customer identifiertype = cnpj" }, { "name" "redirecturl", "kind" "optional", "type" "string", "description" "return rediect url after user checkout in klavi env", "" "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", "" "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", "" "payer's origin account information", "children" \[ { "name" "ispb", "kind" "required", "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" "required", "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" "required", "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" } ], "schema" \[ { "name" "ispb", "kind" "required", "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" "required", "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" "required", "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) ", "" "object containing the data of the recipient (creditor) ", "children" \[ { "name" "ispb", "kind" "required", "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" "required", "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" "required", "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" "required", "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" "required", "type" "string", "description" "username" }, { "name" "identifiertype", "kind" "required", "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}$" } ] } ], "schema" \[ { "name" "ispb", "kind" "required", "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" "required", "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" "required", "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" "required", "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" "required", "type" "string", "description" "username" }, { "name" "identifiertype", "kind" "required", "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" "paymentmethodconfig", "kind" "required", "type" "object", "description" "field intended for the configuration of the different recurring payment products ", "" "required", "children" \[ { "name" "contractid", "kind" "required", "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" "required", "type" "string", "description" "maxlength 3\npattern ^(\[a z]{3})$\nexample brl" }, { "name" "interval", "kind" "required", "type" "string", "description" "example monthly\nenum \[ weekly,monthly,yearly,semiannual,quarterly ]\ndefines the allowed periodicity for transaction execution" }, { "name" "referencestartdate", "kind" "required", "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" "required", "type" "object", "description" "information about the customer who owes the contract ", "children" \[ { "name" "identifiertype", "kind" "required", "type" "string", "description" "enum \[ cpf, cnpj ]\ntype of the user identification document cnpj or cpf" }, { "name" "identifier", "kind" "required", "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" "required", "type" "string", "description" "pattern ^(\[a za zà öø öø ÿ, @ & + <>()!?/\\\\\\\\$%\\\d' ]+)$\nmaxlength 120\nexample policarpo quaresma" } ] }, { "name" "isretryaccepted", "kind" "required", "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" "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" "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" "required", "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" "required", "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 " } ] } ], "schema" \[ { "name" "contractid", "kind" "required", "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" "required", "type" "string", "description" "maxlength 3\npattern ^(\[a z]{3})$\nexample brl" }, { "name" "interval", "kind" "required", "type" "string", "description" "example monthly\nenum \[ weekly,monthly,yearly,semiannual,quarterly ]\ndefines the allowed periodicity for transaction execution" }, { "name" "referencestartdate", "kind" "required", "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" "required", "type" "object", "description" "information about the customer who owes the contract ", "children" \[ { "name" "identifiertype", "kind" "required", "type" "string", "description" "enum \[ cpf, cnpj ]\ntype of the user identification document cnpj or cpf" }, { "name" "identifier", "kind" "required", "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" "required", "type" "string", "description" "pattern ^(\[a za zà öø öø ÿ, @ & + <>()!?/\\\\\\\\$%\\\d' ]+)$\nmaxlength 120\nexample policarpo quaresma" } ] }, { "name" "isretryaccepted", "kind" "required", "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" "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" "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" "required", "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" "required", "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", "" "metadata, user customizable", "children" \[ { "name" "key", "kind" "optional", "type" "string", "description" "" } ], "schema" \[ { "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", "" "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" "clientmetadata", "kind" "required", "type" "object", "description" "client metadata", "" "client metadata", "children" \[ { "name" "platform", "kind" "required", "type" "string", "description" "client type, enum \[ browser, app]" }, { "name" "os", "kind" "required", "type" "string", "description" "os type, enum \[ linux, macos, unix, windows, ios, android, other ]" }, { "name" "osversion", "kind" "required", "type" "string", "description" "os version" } ], "schema" \[ { "name" "platform", "kind" "required", "type" "string", "description" "client type, enum \[ browser, app]" }, { "name" "os", "kind" "required", "type" "string", "description" "os type, enum \[ linux, macos, unix, windows, ios, android, other ]" }, { "name" "osversion", "kind" "required", "type" "string", "description" "os version" } ] } ], "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\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" "\nconsent status", "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" "consentredirecturl", "kind" "optional", "type" "string", "description" " only status = consent awaiting authorization then will a valid url be generated ", "children" \[] } ] }