Restrict account
Relevant webhooks
For this endpoint be sure you have registered for these webhooks:
API reference
Restricts an account from defined transactions.
A restriction is a flexible way to prevent transactions that contain certain criteria from posting to an account. This is useful in scenarios such as freezing an account that has been compromised.
To restrict all subaccounts of a master account, set appliesTo to SubAccounts and do not supply a value for subAccountNumber.
To restrict a master account together with all its subaccounts, set appliesTo to All and do not supply a value for subAccountNumber.
Payments that fail to post to a Cross River account and are returned will not be visible to you.
Endpoint: v1/dda/accounts/{accountNumber}/restrictions
POST
https://sandbox.crbcos.com/core/v1/dda/accounts/{accountNumber}/restrictions
Path Parameters
- accountNumberstringrequiredDescription
Body Parameters
- subAccountNumberstringDescription
- appliesTostringrequiredDescription
- railstringDescription
- transactionTypestringDescription
- otherAccountTypestringDescription
- amountThresholdintegerDescription
- currencystringDescription
- transactionCodestringDescription
- effectiveStartTimeHourintegerDescription
- effectiveStartTimeMinuteintegerDescription
- effectiveEndTimeHourintegerDescription
- effectiveEndTimeMinuteintegerDescription
- reasonstringrequiredDescription
- notesstringDescription
Response
- idstringDescription
- masterAccountNumberstringDescription
- subAccountNumberstringDescription
- restrictionTypestringDescription
- appliesTostringDescription
- statusstringDescription
- railstringDescription
- transactionTypestringDescription
- otherAccountTypestringDescription
- transactionCodestringDescription
- amountThresholdintegerDescription
- effectiveStartTimeHourintegerDescription
- effectiveStartTimeMinuteintegerDescription
- effectiveEndTimeHourintegerDescription
- effectiveEndTimeMinuteintegerDescription
- currencystringDescription
- reasonstringDescription
- notesstringDescription
- createdAtstringDescription
- removedAtstringDescription
- partnerIdstringDescription
- lastModifiedAtstringDescription
curl
curl --location --globoff 'https://sandbox.crbcos.com/core/v1/dda/accounts/2394312736/restrictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"transactionCode": "Incoming ACH",
"transactionType": "Debit",
"appliesTo": "Account",
"reason": "Account Freeze"
}'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'sandbox.crbcos.com',
'path': '/core/v1/dda/accounts/2394312736/restrictions',
'headers': {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = "{\r\n \"transactionCode\": \"Incoming ACH\",\r\n \"transactionType\": \"Debit\",\r\n \"appliesTo\": \"Account\",\r\n \"reason\": \"Account Freeze\"\r\n}";
req.write(postData);
req.end();python
import http.client
conn = http.client.HTTPSConnection("sandbox.crbcos.com")
payload = "{\r\n \"transactionCode\": \"Incoming ACH\",\r\n \"transactionType\": \"Debit\",\r\n \"appliesTo\": \"Account\",\r\n \"reason\": \"Account Freeze\"\r\n}"
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
conn.request("POST", "/core/v1/dda/accounts/2394312736/restrictions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))ruby
require "uri"
require "net/http"
url = URI("https://sandbox.crbcos.com/core/v1/dda/accounts/2394312736/restrictions")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
request.body = "{\r\n \"transactionCode\": \"Incoming ACH\",\r\n \"transactionType\": \"Debit\",\r\n \"appliesTo\": \"Account\",\r\n \"reason\": \"Account Freeze\"\r\n}"
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/core/v1/dda/accounts/2394312736/restrictions"
method := "POST"
payload := strings.NewReader(`{
"transactionCode": "Incoming ACH",
"transactionType": "Debit",
"appliesTo": "Account",
"reason": "Account Freeze"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}200
{
"id": "51d73b46-ef2a-4a52-b174-b32f00949088",
"masterAccountNumber": "2394312736",
"subAccountNumber": "2394312736",
"restrictionType": "Internal",
"appliesTo": "Account",
"status": "Active",
"transactionType": "Debit",
"transactionCode": "Incoming ACH",
"reason": "Account Freeze",
"createdAt": "2025-08-04T05:00:54.4238173-04:00",
"partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
"lastModifiedAt": "2025-08-04T05:00:54.4238173-04:00"
}