API REFERENCE
...
Automatic Pix
Create a consent-links
1 min
name consent links method post url https api sandbox klavi ai payment customer v1 automatic consent links description create a consent links for whitelabel tab examples examples languages id 3frb xxtlqb4wcnzwaxv5 language curl code curl location https api sandbox klavi ai payment customer v1 automatic consent links n header accept application json n header content type application json n data accesskey string secretkey string consent customer debtoraccount creditoraccount holder paymentmethodconfig contractdebtor firstpayment externalinfo customlabel id owsomhgtpu4v6m0jdvobw language nodejs code var request require request ; nvar options n method post n url https api sandbox klavi ai payment customer v1 automatic consent links n headers n accept application json n content type application json n n body json stringify n accesskey string n secretkey string n consent n customer n debtoraccount n creditoraccount n holder n n paymentmethodconfig n contractdebtor n firstpayment n n externalinfo 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 ns6 nhkigetrydh jzerk language javascript code var myheaders new headers ; nmyheaders append accept application json ; nmyheaders append content type application json ; n nvar raw json stringify n accesskey string n secretkey string n consent n customer n debtoraccount n creditoraccount n holder n n paymentmethodconfig n contractdebtor n firstpayment n n externalinfo 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 consent links requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id z4wyf0dslzlayr1mxzbel language python code import requests nimport json n nurl https api sandbox klavi ai payment customer v1 automatic consent links n npayload json dumps n accesskey string n secretkey string n consent n customer n debtoraccount n creditoraccount n holder n n paymentmethodconfig n contractdebtor n firstpayment n n externalinfo 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 h ues lqjcrnr n8kfsse language ruby code require uri nrequire json nrequire net http n nurl uri https api sandbox klavi ai payment customer v1 automatic consent links 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 accesskey string n secretkey string n consent n customer n debtoraccount n creditoraccount n holder n n paymentmethodconfig n contractdebtor n firstpayment n n externalinfo n n n nresponse https request request nputs response read body n customlabel selectedlanguageid 3frb xxtlqb4wcnzwaxv5 results languages id kpuoeytms pe5j7kfkslq language 200 code n id cfa45795 fe16 48e2 a372 130e30a72606 n consenturl https link example com?v dmskdclckkclxkcox c xxxxyyyyzzz n customlabel selectedlanguageid kpuoeytms pe5j7kfkslq request pathparameters queryparameters headerparameters bodydataparameters name accesskey kind required type string description pre generated by klavi for partner pre generated by klavi for partner name secretkey kind required type string description pre generated by klavi for partner pre generated by klavi for partner name consent kind required type object description consent object consent object children name clientrequestid kind required 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 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 required type string description username name phone kind optional type string description user s phone number name email kind required 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 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 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 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 name paymentmethodconfig kind required type object description field intended for the configuration of the different recurring payment products 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 number 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 number 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 number 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 semanal nenum semanal mensal anual semestral trimestral 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 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 schema name clientrequestid kind required 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 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 required type string description username name phone kind optional type string description user s phone number name email kind required 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 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 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 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 name paymentmethodconfig kind required type object description field intended for the configuration of the different recurring payment products 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 number 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 number 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 number 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 semanal nenum semanal mensal anual semestral trimestral 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 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 formdataparameters currentnewparameter label body parameter value bodydataparameters hastryitout false response name id kind optional type string description consent link id name consenturl kind optional type string description consent link url children