Create virtual account
2 min
📝 description creates a new virtual account/subaccount for segregation, reconciliation, and allocation of funds use virtual accounts to separate balances by clients, projects, or business rules { "name" "/api/pay/v1/virtual account/create", "method" "post", "url" "https //cloudbreak cambyopro com/api/pay/v1/virtual account/create", "description" "create virtual account", "tab" "examples", "examples" { "languages" \[ { "id" "i7kwc wq9iehluxmjp2vd", "language" "json", "code" "{\n \\"virtualaccount\\" \\"minha conta\\",\n \\"tipochavepix\\" \\"aleatoria\\",\n \\"chavepix\\" \\"teste\@empresa com br\\"\n}", "customlabel" "" }, { "id" "0fegyw3jniq1ctfaqzxxy", "language" "curl", "code" "curl request post \\\\\n url https //cloudbreak cambyopro com/api/pay/v1/virtual account/create \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n header 'authorization string' \\\\\n data '{\n \\"virtualaccount\\" \\"string\\",\n \\"tipochavepix\\\t\\" \\"string\\",\n \\"chavepix\\" \\"string\\"\n }'", "customlabel" "" }, { "id" "yorrzmra8vhsmobxt j1i", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //cloudbreak cambyopro com/api/pay/v1/virtual account/create',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json',\n 'authorization' 'string'\n },\n body json stringify({\n \\"virtualaccount\\" \\"string\\",\n \\"tipochavepix\\\t\\" \\"string\\",\n \\"chavepix\\" \\"string\\"\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "r4zealtioma atyuupsrv", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = json stringify({\n \\"virtualaccount\\" \\"string\\",\n \\"tipochavepix\\\t\\" \\"string\\",\n \\"chavepix\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //cloudbreak cambyopro com/api/pay/v1/virtual account/create\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "r5 1vs04bsf6yqmqsiarz", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //cloudbreak cambyopro com/api/pay/v1/virtual account/create\\"\n\npayload = json dumps({\n \\"virtualaccount\\" \\"string\\",\n \\"tipochavepix\\\t\\" \\"string\\",\n \\"chavepix\\" \\"string\\"\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json',\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "7fv lk0wmcfugwezzte k", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //cloudbreak cambyopro com/api/pay/v1/virtual account/create\\")\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\[\\"authorization\\"] = \\"string\\"\nrequest body = json dump({\n \\"virtualaccount\\" \\"string\\",\n \\"tipochavepix\\\t\\" \\"string\\",\n \\"chavepix\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "i7kwc wq9iehluxmjp2vd" }, "results" { "languages" \[ { "id" "8awq k4b2jwsr3cwel30t", "language" "200", "code" "{\n \\"sucesso\\" true,\n \\"mensagem\\" \\"conta virtual criada\\",\n \\"id\\" \\"va 123\\"\n}", "customlabel" "" }, { "id" "qzzycxvt3pslynsvslutf", "language" "401", "code" "{\n \\"success\\" false,\n \\"message\\" \\"missing bearer token\\"\n}", "customlabel" "" }, { "id" "7 htuskdixsfl vb74i2", "language" "422", "code" "{\n \\"success\\" false,\n \\"message\\" \\"chavepix é obrigatório para tipochavepix email ou cnpj\\"\n}", "customlabel" "" }, { "id" "gii5ripmkuyzyuqrcdv8f", "language" "502", "code" "{\n \\"success\\" false,\n \\"message\\" \\"falha ao criar conta virtual\\"\n}", "customlabel" "" } ], "selectedlanguageid" "8awq k4b2jwsr3cwel30t" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "name" "authorization", "kind" "required", "type" "string", "description" "bearer {{accesstoken}}", "" "bearer {{accesstoken}}" } ], "bodydataparameters" \[ { "name" "virtualaccount", "kind" "required", "type" "string", "description" "name of your virtual account", "" "name of your virtual account" }, { "name" "tipochavepix\t", "kind" "required", "type" "string", "description" "random, email or cnpj", "" "random, email or cnpj" }, { "name" "chavepix", "kind" "required", "type" "string", "description" "required if \\"tipochavepix\\" is email or cnpj\nenter the pix key of your virtual account", "" "required" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" true, "autogeneratedanchorslug" "apipayv1virtual accountcreate", "legacyhash" "vabnn9kdyglobqscz27uj" }