---
title: Simulate card auth
slug: crossriver-apis/cards/apis/simulate-card-authorization
description: Simulate a merchant authorization with POST /cardmanagement/v1/simulate/authorization, affecting the available balance on the deposit account.
icon: {"apiMethod":"POST"}
createdAt: 2026-09-29T15:33:39.894Z
---

## 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.

:::hint{type="info"}
This API can only be run in the Cross River [Sandbox](https://public.qa.archbee.co/crossriver/get-started/quickstart/sandbox)&#x20;
:::

:::ApiMethodV2
```json
{
  "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"
      },
      {
        "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."
      },
      {
        "name": "merchantCountryCode",
        "kind": "required",
        "type": "string",
        "description": "Country code of the merchant"
      },
      {
        "name": "merchantName",
        "kind": "required",
        "type": "string",
        "description": "Name of the merchant"
      },
      {
        "name": "merchantStreet",
        "kind": "required",
        "type": "string",
        "description": "Street address of the merchant"
      },
      {
        "name": "merchantCity",
        "kind": "required",
        "type": "string",
        "description": "City where the merchant is located"
      },
      {
        "name": "merchantState",
        "kind": "required",
        "type": "string",
        "description": "State where the merchant is located"
      },
      {
        "name": "merchantPostalCode",
        "kind": "required",
        "type": "string",
        "description": "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"
      },
      {
        "name": "additionalAmounts",
        "kind": "optional",
        "type": "object",
        "description": "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."
          }
        ]
      },
      {
        "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"
      }
    ],
    "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": []
    }
  ],
  "autoGeneratedAnchorSlug": "endpoint-cardmanagementv1simulateauthorization",
  "legacyHash": "unv_-qe4bRDWltFygFYto"
}
```
:::

