Cards
APIs
Simulate card reversal
api reference this endpoint is used to reverse an existing authorization using the retrievalreferencenumber returned in the authorization endpoint this reverses the original authorization placed on the account and removes it from the deposit account activity the amount in this request can be any value and does not have to be the same amount as the original clearing transaction, which allows for a partial amount reversal this api can only be run in the cross river docid kaqyvqvnuagqnekfkcuy { "name" "endpoint /cardmanagement/v1/simulate/reversal", "method" "post", "url" "https //sandbox crbcos com/cardmanagement/v1/simulate/reversal", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "wjqtgoaupddzxbwhanjik", "language" "curl", "code" "curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/reversal' \\\\\n data '{\n \\"cardid\\" \\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\",\n \\"retrievalreferencenumber\\" \\"654492282074\\",\n \\"amount\\" \\"123\\"\n}'", "customlabel" "" }, { "id" "khs 3vl2kvo9 lgehszv ", "language" "nodejs", "code" "var https = require('follow redirects') https;\nvar fs = require('fs');\n\nvar options = {\n 'method' 'post',\n 'hostname' 'sandbox crbcos com',\n 'path' '/cardmanagement/v1/simulate/reversal',\n 'headers' {\n },\n 'maxredirects' 20\n};\n\nvar req = https request(options, function (res) {\n var chunks = \[];\n\n res on(\\"data\\", function (chunk) {\n chunks push(chunk);\n });\n\n res on(\\"end\\", function (chunk) {\n var body = buffer concat(chunks);\n console log(body tostring());\n });\n\n res on(\\"error\\", function (error) {\n console error(error);\n });\n});\n\nvar postdata = \\"{\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"retrievalreferencenumber\\\\\\" \\\\\\"654492282074\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" "cwjot8dkvuflyb y9nlx2", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/cardmanagement/v1/simulate/reversal\\"\n\npayload = \\"{\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"retrievalreferencenumber\\\\\\" \\\\\\"654492282074\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\"\nheaders = {}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "ytk hvbhqlk21gbl8ok z", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/cardmanagement/v1/simulate/reversal\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest body = \\"{\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"retrievalreferencenumber\\\\\\" \\\\\\"654492282074\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"123\\\\\\"\\\r\\\n}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "l7bh1 d1sri8gjjvc8sjt", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/cardmanagement/v1/simulate/reversal\\"\n method = \\"post\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"cardid\\" \\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\",`+\\"\n\\"+`\n \\"retrievalreferencenumber\\" \\"654492282074\\",`+\\"\n\\"+`\n \\"amount\\" \\"123\\"`+\\"\n\\"+`\n}`)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\n }\n res, err = client do(req)\n if err != nil {\n fmt println(err)\n return\n }\n defer res body close()\n\n body, err = io readall(res body)\n if err != nil {\n fmt println(err)\n return\n }\n fmt println(string(body))\n}", "customlabel" "" } ], "selectedlanguageid" "wjqtgoaupddzxbwhanjik" }, "results" { "languages" \[ { "id" "dbsaffgkff2je0bhpnjva", "language" "400", "customlabel" "", "code" "{\n \\"errors\\" \[\n {\n \\"code\\" 2350,\n \\"message\\" \\"authorization already been cleared\\"\n }\n ]\n}" } ], "selectedlanguageid" "dbsaffgkff2je0bhpnjva" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "cardid", "kind" "required", "type" "string", "description" "guid format card id in the cross river system, which is the id attribute value of the response to create a card this is not the number that appears on the card ", "" "guid format card id in the cross river system, which is the id attribute value of the response to create a card this is not the number that appears on the card " }, { "name" "retrievalreferencenumber", "kind" "optional", "type" "string", "description" "card network generated identifier used to uniquely track a transaction across systems", "" "card network generated identifier used to uniquely track a transaction across systems" }, { "name" "systemtraceauditnumber", "kind" "optional", "type" "string", "description" "unique transaction id assigned by the acquirer of the transaction for audit purposes", "" "unique transaction id assigned by the acquirer of the transaction for audit purposes" }, { "name" "amount", "kind" "optional", "type" "integer", "description" "monetary value of the transaction in the transaction currency", "" "monetary value of the transaction in the transaction currency" } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "autogeneratedanchorslug" "endpoint cardmanagementv1simulatereversal", "legacyhash" "unv qe4brdwltfygfyto" }