Agregadores y PSPaaS
Gestión de Cuentas
4 min
 al realizar operaciones sobre un comercio la cuenta corriente para la moneda principal del comercio será creada automáticamente registrando en ella todas las transacciones realizadas de tipo cash in, cash out, impuestos, ajustes, entre otros { "name" "obtener cuentas comercio", "method" "get", "url" "https //api sugaway com/p/operator/entity/\ uid/account", "description" "permite obtener las cuentas corrientes de un comercio", "tab" "examples", "examples" { "languages" \[ { "id" "0k7gkq1sw3bytwfg56bzi", "language" "curl", "code" "curl location g request get 'https //api sugaway com/p/operator/entity/\ uid/account/{uid}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "yzeftvegcipnydbfk7lvj", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sugaway com/p/operator/entity/\ uid/account/{uid}',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "j2j4ldtv8vhwit2wuwmwn", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/operator/entity/\ uid/account/{uid}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "1eudiq06 gfci8o88leey", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sugaway com/p/operator/entity/\ uid/account/{uid}\\"\n\npayload={}\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "dv6qvzx6apqoj chwwc2c", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/operator/entity/\ uid/account/{uid}\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "0k7gkq1sw3bytwfg56bzi" }, "results" { "languages" \[ { "id" "h2tc3j37lqugajpnmfuo6", "language" "200", "customlabel" "", "code" "" }, { "id" "vgq43a1hyvqwsnmr m5ac", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ], "selectedlanguageid" "h2tc3j37lqugajpnmfuo6" }, "request" { "pathparameters" \[ { "name" "uid", "kind" "required", "type" "string", "description" "identificador único del comercio generado durante la creación", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "x access token", "kind" "optional", "type" "string", "description" "", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" } } { "name" "crear cuenta ", "method" "post", "url" "https //api sugaway com/p/accounts/", "description" "permite crear una cuenta corriente para un comercio", "tab" "examples", "examples" { "languages" \[ { "id" "y63lsvxeclpiwb4u fs q", "language" "curl", "code" "curl location request post 'https //api sugaway com/p/operator/entity/\ uid/account' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data raw '{\\"reference\\" \\"string\\",\\"currency\\" \\"string\\"}'", "customlabel" "" }, { "id" "z3jqmvxb8yizuw5wb29jf", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sugaway com/p/operator/entity/\ uid/account',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"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" "rm7m6hdkqohwggpcvehkg", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/operator/entity/\ uid/account\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "dqahd9hbz9cqfgpqcxrlm", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sugaway com/p/operator/entity/\ uid/account\\"\n\npayload = json dumps({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\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" "ar5fgftdm2qvsdk0hsjhs", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/operator/entity/\ uid/account\\")\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 \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "y63lsvxeclpiwb4u fs q" }, "results" { "selectedlanguageid" "8syxfwpaehhu2pqbkbygq", "languages" \[ { "id" "8syxfwpaehhu2pqbkbygq", "language" "200", "customlabel" "", "code" "{\n \\"name\\" \\"cake's name\\",\n }" }, { "id" "ahdimxwwc3klwcf7bovz7", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ] }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "optional", "type" "string", "description" "api key del operador", "" "api key del operador" }, { "name" "x access token", "kind" "optional", "type" "string", "description" "access token del operador", "" "access token del operador" }, { "name" "x suga entity", "kind" "optional", "type" "string", "description" "id del comercio sobre el cual se desea crear la cuenta ", "" "id del comercio sobre el cual se desea crear la cuenta " } ], "bodydataparameters" \[ { "name" "reference", "kind" "required", "type" "string", "description" "referencia única de la cuenta" }, { "name" "currency", "kind" "required", "type" "string", "description" "código de moneda aceptados ars, clp, usd, mxn, uyu", "children" \[] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" }, "hastryitout" false } { "name" "asignar cvu a una cuenta", "method" "post", "url" "https //api sugaway com/p/accounts/\ accounts/info", "description" "permite asignar un cvu a una cuenta", "tab" "examples", "examples" { "languages" \[ { "id" "y63lsvxeclpiwb4u fs q", "language" "curl", "code" "curl location request post 'https //api sugaway com/p/\ accounts/info' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data raw '{\\"accounttype\\" \\"string\\",\\"accountnumber\\" \\"string\\"}'", "customlabel" "" }, { "id" "z3jqmvxb8yizuw5wb29jf", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sugaway com/p/\ accounts/info',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"accounttype\\" \\"string\\",\n \\"accountnumber\\" \\"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" "rm7m6hdkqohwggpcvehkg", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"accounttype\\" \\"string\\",\n \\"accountnumber\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/\ accounts/info\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "dqahd9hbz9cqfgpqcxrlm", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sugaway com/p/\ accounts/info\\"\n\npayload = json dumps({\n \\"accounttype\\" \\"string\\",\n \\"accountnumber\\" \\"string\\"\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" "ar5fgftdm2qvsdk0hsjhs", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/\ accounts/info\\")\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 \\"accounttype\\" \\"string\\",\n \\"accountnumber\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "z3jqmvxb8yizuw5wb29jf" }, "results" { "selectedlanguageid" "8syxfwpaehhu2pqbkbygq", "languages" \[ { "id" "8syxfwpaehhu2pqbkbygq", "language" "200", "customlabel" "", "code" "{\n \\"name\\" \\"cake's name\\",\n }" }, { "id" "ahdimxwwc3klwcf7bovz7", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ] }, "request" { "pathparameters" \[ { "name" "accountid", "kind" "required", "type" "string", "description" "identificador de cuenta corriente", "" "identificador de cuenta corriente" } ], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "required", "type" "string", "description" "api key del operador", "" "required" }, { "name" "x access token", "kind" "required", "type" "string", "description" "access token del operador", "" "access token del operador" }, { "name" "x suga entity", "kind" "required", "type" "string", "description" "id del comercio sobre el cual se desea agregar al cvu\n", "" "id del comercio sobre el cual se desea agregar al cvu\n" } ], "bodydataparameters" \[ { "name" "accounttype", "kind" "required", "type" "string", "description" "tipo de cuenta valor admitido \\"arg cvu\\"", "" "tipo de cuenta valor admitido \\"arg cvu\\"" }, { "name" "accountnumber", "kind" "required", "type" "string", "description" "número de cvu sobre el cual se desea agregar a la cuenta", "" "número de cvu sobre el cual se desea agregar a la cuenta" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" }, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "id of the cake retrieved" } ] } { "name" "obtener cuenta", "method" "get", "url" "https //api sugaway com/p/accounts/\ accountid/info", "description" "permite obtener una cuenta corriente y el saldo de la misma", "tab" "examples", "examples" { "languages" \[ { "id" "0lobuz7i0n6a ioiazfkb", "language" "curl", "code" "curl location g request get 'https //api sugaway com/p/accounts/\ accountid/info/{accountid}' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json'", "customlabel" "" }, { "id" "jgbgykyf2gtmzrgbw5pfl", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'get',\n 'url' 'https //api sugaway com/p/accounts/\ accountid/info/{accountid}',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n }\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "lghkqwy4hrtz1vz8f5leu", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/accounts/\ accountid/info/{accountid}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "gyyitxr2vlwlw3v9 lf 7", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sugaway com/p/accounts/\ accountid/info/{accountid}\\"\n\npayload={}\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "l1rxih9ex0gyplwqpybrd", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/accounts/\ accountid/info/{accountid}\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "0lobuz7i0n6a ioiazfkb" }, "results" { "languages" \[ { "id" "8syxfwpaehhu2pqbkbygq", "language" "200", "customlabel" "", "code" "{\n \\"result\\" true,\n \\"data\\" {\n \\"balance\\" 10,\n \\"account id\\" \\"eqweqwewq212ssddd\\"\n }\n}" }, { "id" "ahdimxwwc3klwcf7bovz7", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ], "selectedlanguageid" "8syxfwpaehhu2pqbkbygq" }, "request" { "pathparameters" \[ { "name" "accountid", "kind" "required", "type" "string", "description" "identificador de cuenta corriente", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "x access token", "kind" "optional", "type" "string", "description" "", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" } } { "name" "asociar webhook", "method" "post", "url" "https //api sugaway com/p/accounts/\ accountid/action/webhook", "description" "permite asociar un webhook a la cuenta mediante el cual se notificarán todas las transacciones entrantes o salientes tanto de la cuenta principal como de los alias emitidos", "tab" "examples", "examples" { "languages" \[ { "id" "y63lsvxeclpiwb4u fs q", "language" "curl", "code" "curl location request post 'https //api sugaway com/p/operator/entity/\ uid/account' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data raw '{\\"reference\\" \\"string\\",\\"currency\\" \\"string\\"}'", "customlabel" "" }, { "id" "z3jqmvxb8yizuw5wb29jf", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sugaway com/p/operator/entity/\ uid/account',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"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" "rm7m6hdkqohwggpcvehkg", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/operator/entity/\ uid/account\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "dqahd9hbz9cqfgpqcxrlm", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //api sugaway com/p/operator/entity/\ uid/account\\"\n\npayload = json dumps({\n \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\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" "ar5fgftdm2qvsdk0hsjhs", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/operator/entity/\ uid/account\\")\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 \\"reference\\" \\"string\\",\n \\"currency\\" \\"string\\"\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "y63lsvxeclpiwb4u fs q" }, "results" { "selectedlanguageid" "8syxfwpaehhu2pqbkbygq", "languages" \[ { "id" "8syxfwpaehhu2pqbkbygq", "language" "200", "customlabel" "", "code" "{\n \\"name\\" \\"cake's name\\",\n }" }, { "id" "ahdimxwwc3klwcf7bovz7", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ] }, "request" { "pathparameters" \[ { "name" "uid", "kind" "optional", "type" "string", "description" "id del comercio", "children" \[] }, { "name" "accountid", "kind" "optional", "type" "string", "description" "id de la cuenta", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "x access token", "kind" "optional", "type" "string", "description" "", "children" \[] } ], "bodydataparameters" \[ { "name" "url", "kind" "required", "type" "string", "description" "url del webhook a asociar debe ser https de manera obligatoria de lo contrario no serán enviados" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" } } creación de cvu sólo para argentina { "name" "emitir cuenta cvu", "method" "get", "url" "https //api sugaway com/p/operator/entity/\ uid/account/\ aid/issue", "description" "permite emitir cuenta cvu para usuarios de argentina", "tab" "examples", "examples" { "selectedlanguageid" "lavgvsu qyliay8fpu5da", "languages" \[ { "id" "lavgvsu qyliay8fpu5da", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"id\\" \\"string\\"\n});\n\nvar requestoptions = {\n method 'get',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api cakes com\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" } ] }, "results" { "selectedlanguageid" "ccjsxa8 gipvrxovfihbg", "languages" \[ { "id" "ccjsxa8 gipvrxovfihbg", "language" "200", "customlabel" "", "code" "{\n \\"name\\" \\"cake's name\\",\n }" }, { "id" "aalwf kmmyjhulqz1ky7i", "language" "404", "customlabel" "", "code" "{\n \\"message\\" \\"ain't no cake like that \\"\n }" } ] }, "request" { "pathparameters" \[ { "name" "uid", "kind" "required", "type" "string", "description" "id único de comercio", "children" \[] }, { "name" "aid", "kind" "required", "type" "string", "description" "id de la cuenta", "children" \[] } ], "queryparameters" \[], "headerparameters" \[ { "name" "x api key", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "x access token", "kind" "optional", "type" "string", "description" "", "children" \[] } ], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } }