Payments
...
APIs
Cancel transfer
1 min
{ "name" "endpoint /wires/v1/payments/{id}/cancel", "method" "post", "url" "https //sandbox crbcos com/wires/v1/payments/{id}/cancel", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "kvbln zyajw6sbxqfbh1v", "language" "curl", "code" "curl l g 'https //sandbox crbcos com/wires/v1/payments/{id}/cancel' ^\n h 'idempotency key 0b700631 e844 464d a747 ecb65c15d2c5' ^\n d '\n\n'", "customlabel" "" }, { "id" "evxkeg1zz07we iljma2w", "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' '/wires/v1/payments/{id}/cancel',\n 'headers' {\n 'idempotency key' '0b700631 e844 464d a747 ecb65c15d2c5'\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 = \\"\\\n\\\n\\";\n\nreq write(postdata);\n\nreq end();", "customlabel" "" }, { "id" "lq1cz3pdplx4hyqejxdvb", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/wires/v1/payments/{id}/cancel\\"\n\npayload = \\"\\\n\\\n\\"\nheaders = {\n 'idempotency key' '0b700631 e844 464d a747 ecb65c15d2c5'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "u85mflcvl6dccejsitjzj", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/wires/v1/payments/{id}/cancel\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"idempotency key\\"] = \\"0b700631 e844 464d a747 ecb65c15d2c5\\"\nrequest body = \\"\\\n\\\n\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "ko1fx9frsffunauzucu7b", "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/wires/v1/payments/{id}/cancel\\"\n method = \\"post\\"\n\n payload = strings newreader(`\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 req header add(\\"idempotency key\\", \\"0b700631 e844 464d a747 ecb65c15d2c5\\")\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" "kvbln zyajw6sbxqfbh1v" }, "results" { "languages" \[ { "id" "pbxjlj26wbqhegkbu1gou", "language" "200", "customlabel" "", "code" "{\n \\"id\\" \\"932ab92c 6cf6 4af3 b9fb b288017529d7\\",\n \\"accountnumber\\" \\"2330604998\\",\n \\"coretransactionid\\" \\"5d7b8635 1bc6 4a7b a1fa b288017529d7\\",\n \\"referenceid\\" \\"s65bryjr29s\\",\n \\"direction\\" \\"outbound\\",\n \\"paymenttype\\" \\"transfer\\",\n \\"source\\" \\"api\\",\n \\"status\\" \\"canceled\\",\n \\"posting\\" \\"posted\\",\n \\"partnerauthorization\\" \\"canceled\\",\n \\"partnerauthorization2\\" \\"canceled\\",\n \\"enteredbyid\\" \\"3qtu9nljxwhcd33wn0xxmrbr5p7fxx0z\\",\n \\"amount\\" 5000,\n \\"currency\\" \\"usd\\",\n \\"purpose\\" \\"testing\\",\n \\"businessfunctioncode\\" \\"ctr\\",\n \\"typecode\\" \\"1000\\",\n \\"senderroutingnumber\\" \\"021214891\\",\n \\"sendername\\" \\"cross river bank\\",\n \\"senderreference\\" \\"s65bryjr29s\\",\n \\"receiverroutingnumber\\" \\"026009593\\",\n \\"receivername\\" \\"bk amer nyc\\",\n \\"originatingfi\\" {\n \\"idcode\\" \\"f\\",\n \\"identifier\\" \\"021214891\\",\n \\"name\\" \\"crb 21852936\\",\n \\"address1\\" \\"400 kelby street\\",\n \\"address2\\" \\"fort lee, nj\\",\n \\"address3\\" \\"us\\"\n },\n \\"originator\\" {\n \\"idcode\\" \\"d\\",\n \\"identifier\\" \\"2330604998\\",\n \\"name\\" \\"peter griffin\\",\n \\"address1\\" \\"31 spooner st\\",\n \\"address2\\" \\"\\",\n \\"address3\\" \\"quahog ri 33156 us\\"\n },\n \\"beneficiaryfi\\" {\n \\"idcode\\" \\"f\\",\n \\"identifier\\" \\"026009593\\",\n \\"name\\" \\"bank of america, n a , ny\\",\n \\"address1\\" \\"new york, ny\\"\n },\n \\"beneficiary\\" {\n \\"idcode\\" \\"d\\",\n \\"identifier\\" \\"316840684\\",\n \\"name\\" \\"stewie griffin\\",\n \\"address1\\" \\"31 spooner st\\",\n \\"address2\\" \\"quahog ri 33030\\",\n \\"address3\\" \\"us\\"\n },\n \\"originatortobeneficiary1\\" \\"happy birthday\\",\n \\"beneficiaryreference\\" \\"gift\\",\n \\"wasreversed\\" false,\n \\"isinternational\\" false,\n \\"clientidentifier\\" \\"05d73490 65ac 4725 98b6 cbf8252e52fe\\",\n \\"createdat\\" \\"2025 02 18t17 38 38 79 05 00\\",\n \\"canceledat\\" \\"2025 02 18t17 38 46 6595381 05 00\\",\n \\"effectivedate\\" \\"2025 02 18t00 00 00 05 00\\",\n \\"postedat\\" \\"2025 02 18t17 38 45 013 05 00\\",\n \\"originalpaymentid\\" \\"932ab92c 6cf6 4af3 b9fb b288017529d7\\",\n \\"partnerid\\" \\"ba9d0234 26e9 43a2 9070 aedd0108eadb\\",\n \\"productid\\" \\"2733f398 b44a 4f0c 9064 b1b700e619af\\",\n \\"lastmodifiedat\\" \\"2025 02 18t17 38 46 6595381 05 00\\",\n \\"postingcode\\" \\"ok\\",\n \\"investigated\\" false,\n \\"isopaymenttype\\" \\"customercredittransfer\\"\n}" } ], "selectedlanguageid" "pbxjlj26wbqhegkbu1gou" }, "request" { "pathparameters" \[ { "name" "id", "kind" "required", "type" "string", "description" "the payment id first appears in the initial response to the originate a payment request this id is in guid format ", "" "the payment id first appears in the initial response to the originate a payment request this id is in guid format " } ], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "path parameter", "value" "pathparameters" }, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "the payment id first appears in the initial response to the originate a payment request this id is in guid format " }, { "name" "accountnumber", "kind" "optional", "type" "string", "description" "cross river account number in cross river, depending on the account type, the number of digits will vary the first digit indicates the kind of account ", "children" \[] }, { "name" "coretransactionid", "kind" "optional", "type" "string", "description" "internal cross river unique id for the transaction", "children" \[] }, { "name" "referenceid", "kind" "optional", "type" "string", "description" "unique reference id for the payment the reference id always begins with the first letter of the rail for wires the reference id starts with 'w' ", "children" \[] }, { "name" "fedbatchid", "kind" "optional", "type" "string", "description" "unique identifier in guid format for the federal reserve batch the payment went out on (or came in on for inbound payments)", "children" \[] }, { "name" "fedbatchsequence", "kind" "optional", "type" "integer", "description" "sequence number of payment in batch", "children" \[] }, { "name" "direction", "kind" "optional", "type" "string", "description" "inbound or outbound", "children" \[] }, { "name" "paymenttype", "kind" "optional", "type" "string", "description" "transfer, drawdown, drawdownresponse, servicemessage, reversal", "children" \[] }, { "name" "source", "kind" "optional", "type" "string", "description" "method used to send payment instructions phone, fax, email, file, api, partner portal, ops portal ", "children" \[] }, { "name" "status", "kind" "optional", "type" "string", "description" "payment status created, pending, hold, batched, processing, completed, rejected, canceled, blocked", "children" \[] }, { "name" "posting", "kind" "optional", "type" "string", "description" "posting status pending, posted, failed, canceled", "children" \[] }, { "name" "rejectionreason", "kind" "optional", "type" "string", "description" "rejected because ofaccancel, unabletodetermine, ofacconfirmed, ofacunconfirmed, other", "children" \[] }, { "name" "blockedreason", "kind" "optional", "type" "string", "description" "blocked because ofacmatch, other", "children" \[] }, { "name" "partnerauthorization", "kind" "optional", "type" "string", "description" "partner authorization for out of band payment requests notrequired, pending , approved, canceled", "children" \[] }, { "name" "authorizedat", "kind" "optional", "type" "string", "description" "date and time the wire was authorized in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "authorizedbyid", "kind" "optional", "type" "string", "description" "cross river user id of the partner user who authorizes the wire", "children" \[] }, { "name" "authorizedbyname", "kind" "optional", "type" "string", "description" "cross river username of the partner user who authorizes the wire", "children" \[] }, { "name" "partnerauthorization2", "kind" "optional", "type" "string", "description" "second partner authorization for out of band payment requests notrequired, pending , approved, canceled", "children" \[] }, { "name" "authorizedat2", "kind" "optional", "type" "string", "description" "date and time the wire was authorized in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "authorizedbyid2", "kind" "optional", "type" "string", "description" "cross river user id of the partner user who authorizes the wire", "children" \[] }, { "name" "authorizedbyname2", "kind" "optional", "type" "string", "description" "cross river username of the partner user who authorizes the wire", "children" \[] }, { "name" "amount", "kind" "optional", "type" "integer", "description" "dollar amount of wire transfer in positive integral cents for example, write $1 00 as 100 ", "children" \[] }, { "name" "currency", "kind" "optional", "type" "string", "description" "currency of funds transfer", "children" \[] }, { "name" "purpose", "kind" "optional", "type" "string", "description" "reason for the wire transfer, such as \\"daily settlement \\" also use this field if you submit multiple wires for the same amount, such as \\"1 of 2, 2 of 2 \\" this data is not included with the outgoing fedwire message ", "children" \[] }, { "name" "imad", "kind" "optional", "type" "string", "description" "input messaging accountability data a combination of a date, source identifier, and sequence number assigned to a fedwire message when it is processed by the federal reserve bank funds transfer application unique to the payment ", "children" \[] }, { "name" "omad", "kind" "optional", "type" "string", "description" "output messaging accountability data a combination of a date, destination identifier, and sequence number assigned to a fedwire message when it is processed by the federal reserve bank funds transfer application ", "children" \[] }, { "name" "businessfunctioncode", "kind" "optional", "type" "string", "description" "the business purpose of the wire transfer the most common type is customer wire transfer (ctr) where the beneficiary isn't a bank see the full list of codes and descriptions ", "children" \[] }, { "name" "typecode", "kind" "optional", "type" "string", "description" "the type code value provides information about the type of wire transfer sent (type code, first 2 digits) and more details about the transfer (subtype code, second 2 digits) ", "children" \[] }, { "name" "senderroutingnumber", "kind" "optional", "type" "string", "description" "fedwire routing number for the sender's bank", "children" \[] }, { "name" "sendername", "kind" "optional", "type" "string", "description" "entity sending the wire", "children" \[] }, { "name" "senderreference", "kind" "optional", "type" "string", "description" "sender assigned reference number maximum 35 characteres ", "children" \[] }, { "name" "receiverroutingnumber", "kind" "optional", "type" "string", "description" "the 9 digit fedwire routing number of the financial institution receiving the wire drawdown request the aba directory provides financial institution routing numbers ", "children" \[] }, { "name" "receivername", "kind" "optional", "type" "string", "description" "name of the fi receiving the funds", "children" \[] }, { "name" "originatingfi", "kind" "optional", "type" "object", "description" "details of the financial institution sending the wire", "children" \[ { "name" "idcode", "kind" "optional", "type" "string", "description" "specifies the type of value in the identifier field that follows it 1 character see the list of id codes " }, { "name" "identifier", "kind" "optional", "type" "string", "description" "identifier at the financial institution sending the wire" }, { "name" "name", "kind" "optional", "type" "string", "description" "name of the originating financial institution maximum 140 characteres " }, { "name" "address1", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the street address" }, { "name" "address2", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the city, state, and postal code" }, { "name" "address3", "kind" "optional", "type" "string", "description" "field of 35 characters for any information, for example, country code or information related to the wire" } ] }, { "name" "originator", "kind" "optional", "type" "object", "description" "details of the party sending the wire", "children" \[ { "name" "idcode", "kind" "optional", "type" "string", "description" "specifies the type of value in the identifier field that follows it 1 character see the list of id codes " }, { "name" "identifier", "kind" "optional", "type" "string", "description" "identifier for the party sending the wire for outbound payments where originator details are submitted with the payment request, this is the customer account number otherwise, the system automatically populates this field " }, { "name" "name", "kind" "optional", "type" "string", "description" "originator name maximum 140 characteres " }, { "name" "address1", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the street address" }, { "name" "address2", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the city, state, and postal code" }, { "name" "address3", "kind" "optional", "type" "string", "description" "field of 35 characters for any information, for example, country code or information related to the wire" } ] }, { "name" "intermediaryfi", "kind" "optional", "type" "object", "description" "details of any intermediary bank involved in the wire transaction not all wire transfers use an intermediary fi ", "children" \[ { "name" "idcode", "kind" "optional", "type" "string", "description" "specifies the type of value in the identifier field that follows it 1 character see the list of id codes " }, { "name" "identifier", "kind" "optional", "type" "string", "description" "identifier for the intermediary bank involved with the wire transaction " }, { "name" "name", "kind" "optional", "type" "string", "description" "intermediary financial institution name maximum 140 characters " }, { "name" "address1", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the street address" }, { "name" "address2", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the city, state, and postal code" }, { "name" "address3", "kind" "optional", "type" "string", "description" "field of 35 characters for any information, for example, country code or information related to the wire" } ] }, { "name" "beneficiaryfi", "kind" "optional", "type" "object", "description" "details of the financial institution receiving the wire", "children" \[ { "name" "idcode", "kind" "optional", "type" "string", "description" "specifies the type of value in the identifier field that follows it 1 character see the list of id codes \n\nfor outbound payments, the value for the beneficiary fi is f to indicate the bank fed routing number this field is optional for domestic wires because the system automatically uses the banking information for the value entered into the receiverroutingnumber field " }, { "name" "identifier", "kind" "optional", "type" "string", "description" "identifier for the bank receiving the wire for outbound payments, this is the bank fed routing number this field is optional for domestic wires because the system automatically uses the banking information for the value entered into the receiverroutingnumber field " }, { "name" "name", "kind" "optional", "type" "string", "description" "beneficiary financial institution name maximum 140 characters " }, { "name" "address1", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the street address" }, { "name" "address2", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the city, state, and postal code" }, { "name" "address3", "kind" "optional", "type" "string", "description" "field of 35 characters for any information, for example, country code or information related to the wire" } ] }, { "name" "beneficiary", "kind" "optional", "type" "object", "description" "details of the party receiving the wire", "children" \[ { "name" "idcode", "kind" "optional", "type" "string", "description" "identifier code for the party receiving the wire for outbound payments, this is \\"d\\" to indicate a deposit account " }, { "name" "identifier", "kind" "optional", "type" "string", "description" "identifier for the party receiving the wire for outbound payments, this is the beneficiary's account number " }, { "name" "name", "kind" "optional", "type" "string", "description" "beneficiary name maximum 140 characters " }, { "name" "address1", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the street address" }, { "name" "address2", "kind" "optional", "type" "string", "description" "field of 35 characters usually used for the city, state, and postal code" }, { "name" "address3", "kind" "optional", "type" "string", "description" "field of 35 characters for any information, for example, country code or information related to the wire" } ] }, { "name" "originatortobeneficiary1", "kind" "optional", "type" "string", "description" "field for additional information from the originator to the beneficiary ", "children" \[] }, { "name" "beneficiaryreference", "kind" "optional", "type" "string", "description" "optional field for additional information 35 characters maximum ", "children" \[] }, { "name" "receiptdate", "kind" "optional", "type" "string", "description" "month and day the wire was received in the format mmdd", "children" \[] }, { "name" "receipttime", "kind" "optional", "type" "string", "description" "time the wire was received, in the format hhmm", "children" \[] }, { "name" "wasreversed", "kind" "optional", "type" "boolean", "description" "true if the payment was reversed, otherwise false", "children" \[] }, { "name" "isinternational", "kind" "optional", "type" "boolean", "description" "true if the payment is international, otherwise false", "children" \[] }, { "name" "clientidentifier", "kind" "optional", "type" "string", "description" "use this attribute to add your own unique identifying string to a payment call or cos record this attribute is useful for idempotency purposes ", "children" \[] }, { "name" "createdat", "kind" "optional", "type" "string", "description" "date and time the payment was created in the system in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "releasedat", "kind" "optional", "type" "string", "description" "date and time the payment was released in a distribution to the fed in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm] ", "children" \[] }, { "name" "processedat", "kind" "optional", "type" "string", "description" "date and time the payment was processed by cross river in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm] ", "children" \[] }, { "name" "canceledat", "kind" "optional", "type" "string", "description" "date and time the payment was canceled", "children" \[] }, { "name" "rejectedat", "kind" "optional", "type" "string", "description" "date and time the payment was rejected in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "blockedat", "kind" "optional", "type" "string", "description" "date and time the payment was blocked by bsa/aml in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm] ", "children" \[] }, { "name" "effectivedate", "kind" "optional", "type" "string", "description" "business date on which the payment is effective", "children" \[] }, { "name" "completedat", "kind" "optional", "type" "string", "description" "date and time the payment was systemically completed this can only occur after the payment has successfully posted to the account in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm] ", "children" \[] }, { "name" "postedat", "kind" "optional", "type" "string", "description" "date and time the payment was posted to the cross river account in this case, the date and time are in this format yyyy mm ddthh\ mm\ ss\[ mmm]", "children" \[] }, { "name" "originalpaymentid", "kind" "optional", "type" "string", "description" "payment id of a previously sent wire that was reversed otherwise, the same as the payment id ", "children" \[] }, { "name" "partnerid", "kind" "optional", "type" "string", "description" "your id in the cross river system this id is in guid format ", "children" \[] }, { "name" "productid", "kind" "optional", "type" "string", "description" "id in guid format of your specific product type on which the account is based provided by cross river in this case, the cross river account involved in the payment more about product ids ", "children" \[] }, { "name" "lastmodifiedat", "kind" "optional", "type" "string", "description" "internal cross river value date and time the database entry was last modified ", "children" \[] }, { "name" "postingcode", "kind" "optional", "type" "string", "description" "includes ok (posted), res (account restricted), nsf (insufficient funds in the account sending the wire)", "children" \[] } ] }