Cards
APIs
Simulate reversal
api reference this endpoint allows you to create a reversal transaction to a single message clearing transaction for example, use the single message clearing endpoint to simulate a purchase and then simulate a return with the single message reversal this api can only be run in the cross river sandbox { "name" "endpoint /cardmanagement/v1/simulate/single message reversal", "method" "post", "url" "https //sandbox crbcos com/cardmanagement/v1/simulate/single message reversal", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "wjqtgoaupddzxbwhanjik", "language" "curl", "code" "curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/single message reversal' \\\\\n data '{\n \\"amount\\" \\"22\\",\n \\"processingcode\\" \\"purchase\\",\n \\"cardid\\" \\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\",\n \\"merchantcountrycode\\" \\"us\\",\n \\"merchantname\\" \\"streamflix\\",\n \\"merchantstreet\\" \\"123 any st\\",\n \\"merchantcity\\" \\"anywhere\\",\n \\"merchantstate\\" \\"ny\\",\n \\"merchantpostalcode\\" \\"10001\\",\n \\"cardnetwork\\" \\"visa\\",\n \\"additionalamounts\\" \[\n {\n \\"amounttype\\" \\"unknown\\",\n \\"accounttype\\" \\"notspecified\\",\n \\"amount\\" \\"10\\"\n }\n ]\n}\n'", "customlabel" "" }, { "id" "iqgdgookbmwffwget0oss", "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/single message 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 \\\\\\"amount\\\\\\" \\\\\\"22\\\\\\",\\\r\\\n \\\\\\"processingcode\\\\\\" \\\\\\"purchase\\\\\\",\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"merchantcountrycode\\\\\\" \\\\\\"us\\\\\\",\\\r\\\n \\\\\\"merchantname\\\\\\" \\\\\\"streamflix\\\\\\",\\\r\\\n \\\\\\"merchantstreet\\\\\\" \\\\\\"123 any st\\\\\\",\\\r\\\n \\\\\\"merchantcity\\\\\\" \\\\\\"anywhere\\\\\\",\\\r\\\n \\\\\\"merchantstate\\\\\\" \\\\\\"ny\\\\\\",\\\r\\\n \\\\\\"merchantpostalcode\\\\\\" \\\\\\"10001\\\\\\",\\\r\\\n \\\\\\"cardnetwork\\\\\\" \\\\\\"visa\\\\\\",\\\r\\\n \\\\\\"additionalamounts\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"amounttype\\\\\\" \\\\\\"unknown\\\\\\",\\\r\\\n \\\\\\"accounttype\\\\\\" \\\\\\"notspecified\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"10\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\\r\\\n\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" "hq0thvq5xp 49lvnm eqc", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/cardmanagement/v1/simulate/single message reversal\\"\n\npayload = \\"{\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"22\\\\\\",\\\r\\\n \\\\\\"processingcode\\\\\\" \\\\\\"purchase\\\\\\",\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"merchantcountrycode\\\\\\" \\\\\\"us\\\\\\",\\\r\\\n \\\\\\"merchantname\\\\\\" \\\\\\"streamflix\\\\\\",\\\r\\\n \\\\\\"merchantstreet\\\\\\" \\\\\\"123 any st\\\\\\",\\\r\\\n \\\\\\"merchantcity\\\\\\" \\\\\\"anywhere\\\\\\",\\\r\\\n \\\\\\"merchantstate\\\\\\" \\\\\\"ny\\\\\\",\\\r\\\n \\\\\\"merchantpostalcode\\\\\\" \\\\\\"10001\\\\\\",\\\r\\\n \\\\\\"cardnetwork\\\\\\" \\\\\\"visa\\\\\\",\\\r\\\n \\\\\\"additionalamounts\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"amounttype\\\\\\" \\\\\\"unknown\\\\\\",\\\r\\\n \\\\\\"accounttype\\\\\\" \\\\\\"notspecified\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"10\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\\r\\\n\\"\nheaders = {}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "morhobe8m4ajddbfecmuy", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/cardmanagement/v1/simulate/single message 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 \\\\\\"amount\\\\\\" \\\\\\"22\\\\\\",\\\r\\\n \\\\\\"processingcode\\\\\\" \\\\\\"purchase\\\\\\",\\\r\\\n \\\\\\"cardid\\\\\\" \\\\\\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\\\\\",\\\r\\\n \\\\\\"merchantcountrycode\\\\\\" \\\\\\"us\\\\\\",\\\r\\\n \\\\\\"merchantname\\\\\\" \\\\\\"streamflix\\\\\\",\\\r\\\n \\\\\\"merchantstreet\\\\\\" \\\\\\"123 any st\\\\\\",\\\r\\\n \\\\\\"merchantcity\\\\\\" \\\\\\"anywhere\\\\\\",\\\r\\\n \\\\\\"merchantstate\\\\\\" \\\\\\"ny\\\\\\",\\\r\\\n \\\\\\"merchantpostalcode\\\\\\" \\\\\\"10001\\\\\\",\\\r\\\n \\\\\\"cardnetwork\\\\\\" \\\\\\"visa\\\\\\",\\\r\\\n \\\\\\"additionalamounts\\\\\\" \[\\\r\\\n {\\\r\\\n \\\\\\"amounttype\\\\\\" \\\\\\"unknown\\\\\\",\\\r\\\n \\\\\\"accounttype\\\\\\" \\\\\\"notspecified\\\\\\",\\\r\\\n \\\\\\"amount\\\\\\" \\\\\\"10\\\\\\"\\\r\\\n }\\\r\\\n ]\\\r\\\n}\\\r\\\n\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "gapse8uyxswa b6agqgtp", "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/single message reversal\\"\n method = \\"post\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"amount\\" \\"22\\",`+\\"\n\\"+`\n \\"processingcode\\" \\"purchase\\",`+\\"\n\\"+`\n \\"cardid\\" \\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\",`+\\"\n\\"+`\n \\"merchantcountrycode\\" \\"us\\",`+\\"\n\\"+`\n \\"merchantname\\" \\"streamflix\\",`+\\"\n\\"+`\n \\"merchantstreet\\" \\"123 any st\\",`+\\"\n\\"+`\n \\"merchantcity\\" \\"anywhere\\",`+\\"\n\\"+`\n \\"merchantstate\\" \\"ny\\",`+\\"\n\\"+`\n \\"merchantpostalcode\\" \\"10001\\",`+\\"\n\\"+`\n \\"cardnetwork\\" \\"visa\\",`+\\"\n\\"+`\n \\"additionalamounts\\" \[`+\\"\n\\"+`\n {`+\\"\n\\"+`\n \\"amounttype\\" \\"unknown\\",`+\\"\n\\"+`\n \\"accounttype\\" \\"notspecified\\",`+\\"\n\\"+`\n \\"amount\\" \\"10\\"`+\\"\n\\"+`\n }`+\\"\n\\"+`\n ]`+\\"\n\\"+`\n}`+\\"\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" "200", "customlabel" "", "code" "{\n \\"retrievalreferencenumber\\" \\"150323318008\\",\n \\"cardid\\" \\"8c6a53e0 83ad 4b76 b446 b300006a3e6a\\"\n}" } ], "selectedlanguageid" "dbsaffgkff2je0bhpnjva" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "amount", "kind" "required", "type" "integer", "description" "monetary value of the transaction in the transaction currency ", "" "monetary value of the transaction in the transaction currency " }, { "name" "processingcode", "kind" "optional", "type" "string", "description" "code indicating the transaction type and account types involved \nselect from \n purchase\n withdrawal\n debitadjustment\n conversionguarantee\n conversionverification\n travelercheck\n cashbackpurchase\n accountfunding\n quasicash\n fundswithdrawal\n cashdisbursement\n deferredgoods\n debitfee\n creditreturn\n deposit\n creditadjustment\n checkdepositguarantee\n checkdeposit\n cashdeposit\n originalcredit\n paymenttransaction\n creditdisbursement\n availablefundsinquiry\n balanceinquiry\n accountverification\n atmministatement\n eligibilityinquiry\n cardholdertransfer\n billpayment\n payment\n p2ppayment\n paymentfromthirdparty\n p2ppaymentcredit\n loanpayment\n paymentenclosed\n prepaidactivation\n pinunblock\n pinchange\n pv\n pd\n cb\n q2\n", "" "code indicating the transaction type and account types involved \nselect from \n purchase\n withdrawal\n debitadjustment\n conversionguarantee\n conversionverification\n travelercheck\n cashbackpurchase\n accountfunding\n quasicash\n fundswithdrawal\n cashdisbursement\n deferredgoods\n debitfee\n creditreturn\n deposit\n creditadjustment\n checkdepositguarantee\n checkdeposit\n cashdeposit\n originalcredit\n paymenttransaction\n creditdisbursement\n availablefundsinquiry\n balanceinquiry\n accountverification\n atmministatement\n eligibilityinquiry\n cardholdertransfer\n billpayment\n payment\n p2ppayment\n paymentfromthirdparty\n p2ppaymentcredit\n loanpayment\n paymentenclosed\n prepaidactivation\n pinunblock\n pinchange\n pv\n pd\n cb\n q2\n" }, { "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" "merchantcountrycode", "kind" "required", "type" "string", "description" "county code of the merchant ", "" "county code of the merchant " }, { "name" "merchantname", "kind" "required", "type" "string", "description" "name of the merchant ", "" "name of the merchant " }, { "name" "merchantstreet", "kind" "required", "type" "string", "description" "street address of the merchant ", "" "street address of the merchant " }, { "name" "merchantcity", "kind" "required", "type" "string", "description" "city of the merchant ", "" "city of the merchant " }, { "name" "merchantstate", "kind" "required", "type" "string", "description" "state where the merchant is located 2 letter code format ", "" "state where the merchant is located 2 letter code format " }, { "name" "merchantpostalcode", "kind" "required", "type" "string", "description" "postal code of the merchant ", "" "postal code of the merchant " }, { "name" "cardnetwork", "kind" "optional", "type" "string", "description" "payment network used to process the transaction \nselect from \n visa\n mastercard\n i2c", "" "payment network used to process the transaction \nselect from \n visa\n mastercard\n i2c" }, { "name" "additionalamounts", "kind" "required", "type" "object", "description" "array with amounts other than the transaction amount that are relevant to this transaction (e g fees) ", "" "array with amounts other than the transaction amount that are relevant to this transaction (e g fees) ", "children" \[ { "name" "amounttype", "kind" "optional", "type" "string", "description" "select from \n unknown \n ledgerbalance\n availablebalance \n amountowing\n amountdue \n accountavailablecredit\n amountcurrencyconversionassessment\n overlimitfee\n overpaymentfee \n healthcareeligibilityamount\n perscriptioneligibilityamount\n creditline\n prepaidonlinebillpayfeeamount\n beginningbalance\n amountremainingthiscycle\n amountcashback\n amountgoodsandservices\n amountsurcharge\n holdamount\n originalamount\n authorizedamountstaraccess\n floorlimit\n feeamount \n copayamount \n availablecreditorcheckamount\n creditlimitortipservice \n cashdepositamount \n checkdepositamount\n foreignexchangefee \n merchantlocalcurrencycashbenefitamount \n courtesyamount \n originalcashbackamount \n interchangefee\n totalauthorizationamount\n atmexcessusagefee\n currencyconversionexcessusagefee" }, { "name" "accounttype", "kind" "optional", "type" "string", "description" "select from \n notspecified\n savings\n checking\n account\n universal" }, { "name" "amount", "kind" "optional", "type" "integer", "description" "monetray value of the transaction in the transaction currency " } ], "schema" \[ { "name" "amounttype", "kind" "optional", "type" "string", "description" "select from \n unknown \n ledgerbalance\n availablebalance \n amountowing\n amountdue \n accountavailablecredit\n amountcurrencyconversionassessment\n overlimitfee\n overpaymentfee \n healthcareeligibilityamount\n perscriptioneligibilityamount\n creditline\n prepaidonlinebillpayfeeamount\n beginningbalance\n amountremainingthiscycle\n amountcashback\n amountgoodsandservices\n amountsurcharge\n holdamount\n originalamount\n authorizedamountstaraccess\n floorlimit\n feeamount \n copayamount \n availablecreditorcheckamount\n creditlimitortipservice \n cashdepositamount \n checkdepositamount\n foreignexchangefee \n merchantlocalcurrencycashbenefitamount \n courtesyamount \n originalcashbackamount \n interchangefee\n totalauthorizationamount\n atmexcessusagefee\n currencyconversionexcessusagefee" }, { "name" "accounttype", "kind" "optional", "type" "string", "description" "select from \n notspecified\n savings\n checking\n account\n universal" }, { "name" "amount", "kind" "optional", "type" "integer", "description" "monetray value of the transaction in the transaction currency " } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "retrievalreferencenumber", "kind" "optional", "type" "string", "description" "card network generated identifier used to uniquely track a transaction across systems \nautomatically generated reference (alphanumeric)" }, { "name" "cardid", "kind" "optional", "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 ", "children" \[] } ] }