Cards
APIs
Simulate card auth
api reference simulates merchant authorization that affects the available balance on the deposit account to simulate a declined transaction ensure the amount of the authorization is greater than the cos account balance this api can only be run in the cross river docid kaqyvqvnuagqnekfkcuy { "name" "endpoint /cardmanagement/v1/simulate/authorization", "method" "post", "url" "https //sandbox crbcos com/cardmanagement/v1/simulate/authorization", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "wjqtgoaupddzxbwhanjik", "language" "curl", "code" "curl location 'https //sandbox crbcos com/cardmanagement/v1/simulate/authorization' \\\\\n data '{\n \\"amount\\" 1999,\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 \\"processingcode\\" \\"billpayment\\"\n}'", "customlabel" "" }, { "id" "i3z8bukvzf3 bgxqjfzvk", "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/authorization',\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\\\\\\" 1999,\\\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 \\\\\\"processingcode\\\\\\" \\\\\\"billpayment\\\\\\"\\\r\\\n}\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" "x3c7mrwwvmqmdnblcrq n", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/cardmanagement/v1/simulate/authorization\\"\n\npayload = \\"{\\\r\\\n \\\\\\"amount\\\\\\" 1999,\\\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 \\\\\\"processingcode\\\\\\" \\\\\\"billpayment\\\\\\"\\\r\\\n}\\"\nheaders = {}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "wqzesgwvnfqfnlyftskd8", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/cardmanagement/v1/simulate/authorization\\")\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\\\\\\" 1999,\\\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 \\\\\\"processingcode\\\\\\" \\\\\\"billpayment\\\\\\"\\\r\\\n}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "ko vcmglnwazr5b2qps51", "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/authorization\\"\n method = \\"post\\"\n\n payload = strings newreader(`{`+\\"\n\\"+`\n \\"amount\\" 1999,`+\\"\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 \\"processingcode\\" \\"billpayment\\"`+\\"\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\\" \\"644371423186\\",\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" "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" "country code of the merchant", "" "country 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 where the merchant is located", "" "city where the merchant is located" }, { "name" "merchantstate", "kind" "required", "type" "string", "description" "state where the merchant is located", "" "state where the merchant is located" }, { "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", "" "optional" }, { "name" "additionalamounts", "kind" "optional", "type" "object", "description" "array with ammounts other than the transaction amount that are relevant to this transactions (e g fees) ", "" "optional", "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 " } ] }, { "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", "" "optional" } ], "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" \[] } ] }