API Reference-Management
Merchants
Register or update a receiving account for the application
1 min
{ "name" "accounts", "method" "post", "url" "https //api sandbox klavi ai/payment/management/v1/merchants/{appid}/accounts", "description" "register a receiving account for the application", "tab" "examples", "examples" { "languages" \[ { "id" "1wpd3d2g39iqh0mjkss9y", "language" "curl", "code" "curl location globoff 'https //api sandbox klavi ai/payment/management/v1/merchants/{appid}/accounts/{appid}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"ispb\\" \\"string\\",\n \\"issuer\\" \\"string\\",\n \\"number\\" \\"string\\",\n \\"accounttype\\" \\"string\\",\n \\"proxy\\" \\"string\\",\n \\"holder\\" {\n \\"identifier\\" \\"\\",\n \\"name\\" \\"\\",\n \\"identifiertype\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "s9gf005cbcew3 ybj4uky", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sandbox klavi ai/payment/management/v1/merchants/{appid}/accounts/{appid}',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"ispb\\" \\"string\\",\n \\"issuer\\" \\"string\\",\n \\"number\\" \\"string\\",\n \\"accounttype\\" \\"string\\",\n \\"proxy\\" \\"string\\",\n \\"holder\\" {\n \\"identifier\\" \\"\\",\n \\"name\\" \\"\\",\n \\"identifiertype\\" \\"\\"\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" "2sc3uu2bvyasyrapv aox", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"ispb\\" \\"string\\",\n \\"issuer\\" \\"string\\",\n \\"number\\" \\"string\\",\n \\"accounttype\\" \\"string\\",\n \\"proxy\\" \\"string\\",\n \\"holder\\" {\n \\"identifier\\" \\"\\",\n \\"name\\" \\"\\",\n \\"identifiertype\\" \\"\\"\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/management/v1/merchants/{appid}/accounts/{appid}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "bd6ihlw0p 7qgqbmssuhv", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sandbox klavi ai/payment/management/v1/merchants/{appid}/accounts/{appid}\\"\n\npayload = json dumps({\n \\"ispb\\" \\"string\\",\n \\"issuer\\" \\"string\\",\n \\"number\\" \\"string\\",\n \\"accounttype\\" \\"string\\",\n \\"proxy\\" \\"string\\",\n \\"holder\\" {\n \\"identifier\\" \\"\\",\n \\"name\\" \\"\\",\n \\"identifiertype\\" \\"\\"\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" "edqseu3h9zpuxbxkivbhk", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sandbox klavi ai/payment/management/v1/merchants/{appid}/accounts/{appid}\\")\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 \\"ispb\\" \\"string\\",\n \\"issuer\\" \\"string\\",\n \\"number\\" \\"string\\",\n \\"accounttype\\" \\"string\\",\n \\"proxy\\" \\"string\\",\n \\"holder\\" {\n \\"identifier\\" \\"\\",\n \\"name\\" \\"\\",\n \\"identifiertype\\" \\"\\"\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "1wpd3d2g39iqh0mjkss9y" }, "results" { "languages" \[ { "id" "euhmgclpolm0oawrnoxex", "language" "201", "customlabel" "", "code" "" } ], "selectedlanguageid" "euhmgclpolm0oawrnoxex" }, "request" { "pathparameters" \[ { "name" "appid", "kind" "required", "type" "string", "description" "the appid of merchant", "" "the appid of merchant" } ], "queryparameters" \[], "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" \[ { "name" "ispb", "kind" "required", "type" "string", "description" "it must be filled in with the ispb (brazilian payment system identifier) of the spi participant (instant payment system) with numbers only \nminlength 8\nmaxlength 8\npattern ^\[0 9]{8}$\nexample 12345678", "" "it must be filled in with the ispb (brazilian payment system identifier) of the spi participant (instant payment system) with numbers only \nminlength 8\nmaxlength 8\npattern ^\[0 9]{8}$\nexample 12345678" }, { "name" "issuer", "kind" "optional", "type" "string", "description" "code of the agency issuing the account without digit (agency is the dependency intended to serve customers, the general public and the members of credit cooperatives, in the exercise of activities of the institution, and may not be mobile or transitory) \n \[restriction] mandatory for the following account types cacc (conta deposito a vista) and svgs (conta poupanca) \nminlength 1\nmaxlength 4\npattern ^\[0 9]{1,4}$\nexample 1774", "" "code of the agency issuing the account without digit (agency is the dependency intended to serve customers, the general public and the members of credit cooperatives, in the exercise of activities of the institution, and may not be mobile or transitory) \n \[restriction] mandatory for the following account types cacc (conta deposito a vista) and svgs (conta poupanca) \nminlength 1\nmaxlength 4\npattern ^\[0 9]{1,4}$\nexample 1774" }, { "name" "number", "kind" "required", "type" "string", "description" "it must be filled in with the account number of the receiving user, with verification digit (if any), if there is an alphanumeric value, it should be converted to 0 \nminlength 1\nmaxlength 20\npattern ^\[0 9]{1,20}$\nexample 1234567890", "" "it must be filled in with the account number of the receiving user, with verification digit (if any), if there is an alphanumeric value, it should be converted to 0 \nminlength 1\nmaxlength 20\npattern ^\[0 9]{1,20}$\nexample 1234567890" }, { "name" "accounttype", "kind" "required", "type" "string", "description" "types of accounts used for payment \ntraditional arrangements provided for by resolution 4 753, excluding linked accounts, overseas domiciled accounts, foreign currency accounts and corresponding electronic currency accounts the following is a description of each enum value \n\ncacc current account \nsvgs savings \ntran transactingaccount prepaid payment account \n\nenum \n \[ cacc , svgs , tran ]\n\nexample cacc", "" "types of accounts used for payment \ntraditional arrangements provided for by resolution 4 753, excluding linked accounts, overseas domiciled accounts, foreign currency accounts and corresponding electronic currency accounts the following is a description of each enum value \n\ncacc current account \nsvgs savings \ntran transactingaccount prepaid payment account \n\nenum \n \[ cacc , svgs , tran ]\n\nexample cacc" }, { "name" "proxy", "kind" "required", "type" "string", "description" "pix key", "" "pix key" }, { "name" "holder", "kind" "required", "type" "object", "description" "", "" "required", "children" \[ { "name" "identifier", "kind" "required", "type" "string", "description" "" }, { "name" "name", "kind" "required", "type" "string", "description" "" }, { "name" "identifiertype", "kind" "required", "type" "string", "description" "" } ], "schema" \[ { "name" "identifier", "kind" "required", "type" "string", "description" "" }, { "name" "name", "kind" "required", "type" "string", "description" "" }, { "name" "identifiertype", "kind" "required", "type" "string", "description" "" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[] }