Counterparties

Counterparties represent external entities that you may wish to send or receive funds from. All counterparties are verified to ensure compliance with regulatory requirements prior to being available for use.

Endpoints

GET /counterparties

Retrieve a list of counterparties for a customer.

Query Parameters

Parameter Type Description
customer_id required string Filter by customer ID
type string Filter by type (FIAT_US, FIAT_GB, FIAT_IN, CRYPTO)
status string Filter by status (ACTIVE, PENDING, FROZEN, CLOSED)

Response

200 OK
{
  "data": [
    {
      "id": "cpty_111222333",
      "customer_id": "cust_987654321",
      "type": "FIAT_US",
      "profile_type": "INDIVIDUAL",
      "status": "ACTIVE",
      "name": "John Doe - Chase",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "has_more": false
  }
}
POST /counterparties

Create a new counterparty. The counterparty will undergo AML screening before becoming active.

Request Body

Field Type Description
customer_id required string The customer ID
type required string FIAT_US, FIAT_GB, FIAT_IN, or CRYPTO
profile_type required string INDIVIDUAL or CORPORATION
name required string Name for this counterparty
relationship_to_customer string SELF, FAMILY, BUSINESS, or OTHER
bank_details object Bank account details (for fiat)
wallet_address string Blockchain wallet address (for crypto)

Example Request (Fiat US)

Request
{
  "customer_id": "cust_987654321",
  "type": "FIAT_US",
  "profile_type": "INDIVIDUAL",
  "name": "Personal Checking - Chase",
  "relationship_to_customer": "SELF",
  "bank_details": {
    "account_number": "123456789",
    "routing_number": "021000021",
    "account_type": "CHECKING",
    "bank_name": "Chase Bank"
  }
}

Example Request (Crypto)

Request
{
  "customer_id": "cust_987654321",
  "type": "CRYPTO",
  "profile_type": "INDIVIDUAL",
  "name": "My ETH Wallet",
  "relationship_to_customer": "SELF",
  "wallet_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f7ABCD",
  "network": "ETHEREUM"
}

Response

201 Created
{
  "id": "cpty_111222333",
  "customer_id": "cust_987654321",
  "type": "FIAT_US",
  "profile_type": "INDIVIDUAL",
  "status": "PENDING",
  "name": "Personal Checking - Chase",
  "created_at": "2026-01-15T10:30:00Z"
}
GET /counterparties/{id}

Retrieve details of a specific counterparty.

Response

200 OK
{
  "id": "cpty_111222333",
  "customer_id": "cust_987654321",
  "type": "FIAT_US",
  "profile_type": "INDIVIDUAL",
  "status": "ACTIVE",
  "name": "Personal Checking - Chase",
  "relationship_to_customer": "SELF",
  "bank_details": {
    "account_number_last4": "6789",
    "routing_number": "021000021",
    "account_type": "CHECKING",
    "bank_name": "Chase Bank"
  },
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-01-15T11:00:00Z"
}
PATCH /counterparties/{id}

Update counterparty details. Note: Bank details cannot be modified after creation.

Request Body

Field Type Description
name string Updated name

Response

200 OK
{
  "id": "cpty_111222333",
  "name": "Primary Checking Account",
  "updated_at": "2026-01-15T12:00:00Z"
}
POST /counterparties/linking-details

Retrieve linking details for account verification services (e.g., Plaid).

Request Body

Field Type Description
customer_id required string The customer ID
provider string Linking provider (default: PLAID)

Response

200 OK
{
  "link_token": "link-app-abc123...",
  "expiration": "2026-01-15T11:30:00Z"
}
POST /counterparties/connect-linked

Connect a linked account after completing the linking flow.

Request Body

Field Type Description
customer_id required string The customer ID
public_token required string Public token from linking flow
account_id required string Selected account ID

Response

201 Created
{
  "id": "cpty_444555666",
  "customer_id": "cust_987654321",
  "type": "FIAT_US",
  "status": "PENDING",
  "name": "Chase Checking ****1234",
  "created_at": "2026-01-15T10:45:00Z"
}
POST /counterparties/linkable-accounts

Retrieve available accounts from a linking session.

Request Body

Field Type Description
public_token required string Public token from linking flow

Response

200 OK
{
  "accounts": [
    {
      "account_id": "plaid_acc_001",
      "name": "Checking",
      "mask": "1234",
      "type": "depository",
      "subtype": "checking"
    },
    {
      "account_id": "plaid_acc_002",
      "name": "Savings",
      "mask": "5678",
      "type": "depository",
      "subtype": "savings"
    }
  ]
}