API REFERENCE
...
Instant payment
Create a payment initiation
1 min
name payments method post url https api sandbox klavi ai payment customer v1 instant payments description create a payment initiation tab examples examples languages id yxtk25yc9o5jm5lw8szxp language curl code curl location https api sandbox klavi ai payment customer v1 instant payments n header accept application json n header content type application json n data n clientrequestid string n institutionid string n inittype string n customer n identifiertype string n identifier string n name string n phone string n email string n n date string n amount string n currency string n debtoraccount n ispb string n issuer string n number string n accounttype string n n creditoraccount n ispb string n issuer string n number string n accounttype string n holder n identifiertype string n identifier string n name string n n n clientmetadata n platform string n os string n osversion string n n customlabel id 7glijvlmvrzrjvpx3 8r language nodejs code var request require request ; nvar options n method post n url https api sandbox klavi ai payment customer v1 instant payments n headers n accept application json n content type application json n n body json stringify n clientrequestid string n institutionid string n inittype string n customer n identifiertype string n identifier string n name string n phone string n email string n n date string n amount string n currency string n debtoraccount n ispb string n issuer string n number string n accounttype string n n creditoraccount n ispb string n issuer string n number string n accounttype string n holder n identifiertype string n identifier string n name string n n n clientmetadata n platform string n os string n osversion string 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 gjzaghxndgdag zkvhvww 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 inittype string n customer n identifiertype string n identifier string n name string n phone string n email string n n date string n amount string n currency string n debtoraccount n ispb string n issuer string n number string n accounttype string n n creditoraccount n ispb string n issuer string n number string n accounttype string n holder n identifiertype string n identifier string n name string n n n clientmetadata n platform string n os string n osversion string 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 instant payments requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel id fedigszcxndg2bu2ekb1r language python code import requests nimport json n nurl https api sandbox klavi ai payment customer v1 instant payments n npayload json dumps n clientrequestid string n institutionid string n inittype string n customer n identifiertype string n identifier string n name string n phone string n email string n n date string n amount string n currency string n debtoraccount n ispb string n issuer string n number string n accounttype string n n creditoraccount n ispb string n issuer string n number string n accounttype string n holder n identifiertype string n identifier string n name string n n n clientmetadata n platform string n os string n osversion string 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 rc3mtvotiiprwbyyuek i language ruby code require uri nrequire json nrequire net http n nurl uri https api sandbox klavi ai payment customer v1 instant payments 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 inittype string n customer n identifiertype string n identifier string n name string n phone string n email string n n date string n amount string n currency string n debtoraccount n ispb string n issuer string n number string n accounttype string n n creditoraccount n ispb string n issuer string n number string n accounttype string n holder n identifiertype string n identifier string n name string n n n clientmetadata n platform string n os string n osversion string n n n nresponse https request request nputs response read body n customlabel selectedlanguageid rc3mtvotiiprwbyyuek i results languages id bp2s0qrgoz5gy3jine6cl language 200 customlabel code n id fcb72e3a b346 4f71 b044 971dc23232c9 n clientrequestid fcb72e3a b346 4f71 b044 dsndsnmnkdsmk n amount 1333 04 n currency brl 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 id x5wpfwmw2dpoyxlcelfsm language 409 code n statuscode 409 n error conflict n message insufficient permissions requested n customlabel selectedlanguageid x5wpfwmw2dpoyxlcelfsm request pathparameters queryparameters headerparameters name authorization kind required type string description jwt bearer token children 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 clientrequestid name institutionid kind required type string description id from the bank chosen by the user institutionid name inittype kind required type string description payment initiation type npix inic pre registration of payee s account npix manu the creditor object must be sent with all payee information npix dict the pixkey field represents creditor information npix qrcode the qrcode field represents creditor information payment initiation type npix inic pre registration of payee s account npix manu the creditor object must be sent with all payee information npix dict the pixkey field represents creditor information npix qrcode the qrcode field represents creditor information name customer kind required 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 date kind required type string description payment initiation date the date here must be utc 3 nmaxlength 10 npattern d 4 1 0 2 0? 1 9 3 01 12 0 9 0? 1 9 nexample 2021 01 01 payment initiation date the date here must be utc 3 nmaxlength 10 npattern d 4 1 0 2 0? 1 9 3 01 12 0 9 0? 1 9 nexample 2021 01 01 name loggedusercpf kind optional type string description user natural person who is logged in to the payment initiator institution nmaxlength 11 nexample 11111111111 npattern d 11 n restriction required if customer identifiertype is cnpj user natural person who is logged in to the payment initiator institution nmaxlength 11 nexample 11111111111 npattern d 11 n restriction required if customer identifiertype is cnpj name ibgetowncode kind optional type string description ibge town code nminlength 7 nmaxlength 7 npattern d 7 nexample 5300108 ibgetowncode name proxy kind optional type string description pix key nmaxlength 77 npattern w w s nexample 12345678901 nthe types of keys can be phone e mail cpf cnpj or random key nin the case of a mobile phone it must be informed in the e 1641 standard nin the case of e mail it must have the format xxxxxxxx xxxxxxx xxx xx and a maximum of 77 characters nin the case of cpf it must be informed with 11 numbers without dots or dashes in the case of cnpj it must be informed with 14 numbers without dots or dashes n restriction if inittype is pix manu the proxy field should not be filled in if inittype is pix inic pix dict pix qrcode the proxy field should always be filled with the pix key pix key nmaxlength 77 npattern w w s nexample 12345678901 nthe types of keys can be phone e mail cpf cnpj or random key nin the case of a mobile phone it must be informed in the e 1641 standard nin the case of e mail it must have the format xxxxxxxx xxxxxxx xxx xx and a maximum of 77 characters nin the case of cpf it must be informed with 11 numbers without dots or dashes in the case of cnpj it must be informed with 14 numbers without dots or dashes n restriction if inittype is pix manu the proxy field should not be filled in if inittype is pix inic pix dict pix qrcode the proxy field should always be filled with the pix key name qrcode kind optional type string description qr code nmaxlength 512 npattern w w s nexample 00020104141234567890123426660014br gov bcb pix014466756c616e6f32303139406578616d706c652e636f6d27300012 br com outro011001234567895204000053039865406123 455802br5915nomedorecebedor6008brasilia61087007490062 530515rp12345678 201950300017br gov bcb brcode01051 0 080450014br gov bcb pix0123padrao url pix 0123ab cd81390012br com outro01190123 abcd 3456 wxyz6304eb76 nthis field should be in utf 8 format n restriction required for pix qrcode payments with a maximum size of 512 bytes qr code nmaxlength 512 npattern w w s nexample 00020104141234567890123426660014br gov bcb pix014466756c616e6f32303139406578616d706c652e636f6d27300012 br com outro011001234567895204000053039865406123 455802br5915nomedorecebedor6008brasilia61087007490062 530515rp12345678 201950300017br gov bcb brcode01051 0 080450014br gov bcb pix0123padrao url pix 0123ab cd81390012br com outro01190123 abcd 3456 wxyz6304eb76 nthis field should be in utf 8 format n restriction required for pix qrcode payments with a maximum size of 512 bytes name amount kind required type string description amount that will be paid by the user nminlength 4 nmaxlength 19 npattern d 1 16 d 2 nexample 100000 12 n restriction the value with 2 decimal places amount that will be paid by the user nminlength 4 nmaxlength 19 npattern d 1 16 d 2 nexample 100000 12 n restriction the 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 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 redirecturl kind required type string description the url redirected after completing user authentication and consent in an institutional environment required name remittanceinformation kind optional type string description payment description nmaxlength 140 npattern w w s nexample pagamento da nota xpto035 002 nit must be filled in whenever the paying user enters some additional information in a payment to be sent to the recipient payment description nmaxlength 140 npattern w w s nexample pagamento da nota xpto035 002 nit must be filled in whenever the paying user enters some additional information in a payment to be sent to the recipient name debtoraccount kind optional type object description payer s origin account information optional 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 required if mthod pix manu required if mthod pix manu 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 required if inittype is pix manu 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 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 required if inittype is pix manu 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 externalinfo kind optional type object description metadata user customizable externalinfo children schema 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 response name id kind optional type string description id of payment order name clientrequestid kind optional type string description partner internal id children name amount kind optional type string description amount that will be paid by the user children name currency kind optional type string description currency children name status kind optional type string description payment status children name statusreason kind optional type object description children name code kind optional type string description name message kind optional type string description name consentredirecturl kind optional type string description when status is consent awaiting authorization children https //docs klavipay ai/docs/api reference/customer/payments/create payment#code 409