---
title: Simulate card clearing
slug: crossriver-apis/cards/apis/simulate-card-clearing
description: Simulate the replacement of a memo post with a core transaction using POST /cardmanagement/v1/simulate/clearing.
icon: {"apiMethod":"POST"}
createdAt: 2026-09-29T15:33:37.013Z
---

## API reference

Simulates replacement of a memo post with a core transaction.

:::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/clearing",
  "method": "POST",
  "url": "https://sandbox.crbcos.com/cardmanagement/v1/simulate/clearing",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "WJQTgOAuPddzxBwHanjiK",
        "language": "curl",
        "code": "curl --location 'https://sandbox.crbcos.com/cardmanagement/v1/simulate/clearing' \\\n--data '{\n  \"cardId\": \"8c6a53e0-83ad-4b76-b446-b300006a3e6a\",\n  \"retrievalReferenceNumber\": \"644371423186\",\n  \"processingCode\": \"BillPayment\"\n}'",
        "customLabel": ""
      },
      {
        "id": "FekkAT2y5bJjxP9feijS_",
        "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/clearing',\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\\\": \\\"644371423186\\\",\\r\\n  \\\"processingCode\\\": \\\"BillPayment\\\"\\r\\n}\";\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "_XKMz_OWJ0ckpXHGno88O",
        "language": "python",
        "code": "import requests\n\nurl = \"https://sandbox.crbcos.com/cardmanagement/v1/simulate/clearing\"\n\npayload = \"{\\r\\n  \\\"cardId\\\": \\\"8c6a53e0-83ad-4b76-b446-b300006a3e6a\\\",\\r\\n  \\\"retrievalReferenceNumber\\\": \\\"644371423186\\\",\\r\\n  \\\"processingCode\\\": \\\"BillPayment\\\"\\r\\n}\"\nheaders = {}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "anrSY4yeosv820M7ITlG1",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/cardmanagement/v1/simulate/clearing\")\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\\\": \\\"644371423186\\\",\\r\\n  \\\"processingCode\\\": \\\"BillPayment\\\"\\r\\n}\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "f2ANhBmuVmiDYbYq3ueRq",
        "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/clearing\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`{`+\"\n\"+`\n  \"cardId\": \"8c6a53e0-83ad-4b76-b446-b300006a3e6a\",`+\"\n\"+`\n  \"retrievalReferenceNumber\": \"644371423186\",`+\"\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": ""
      }
    ],
    "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."
      },
      {
        "name": "retrievalReferenceNumber",
        "kind": "optional",
        "type": "string",
        "description": "Automatically generated reference (alphanumeric). 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."
      },
      {
        "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,
  "autoGeneratedAnchorSlug": "endpoint-cardmanagementv1simulateclearing",
  "legacyHash": "unv_-qe4bRDWltFygFYto"
}
```
:::

