---
title: "Create Counterparty"
method: POST
path: "/api/v1/counterparties"
tags: ["Counterparties"]
---

# Create Counterparty

`POST /api/v1/counterparties`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/counterparties`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/counterparties/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new counterparty. Counterparties define bank accounts where funds will be settled.

## Headers

- `Client-ID` string, uuid, required: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
- `Authorization` string, uuid, required: Secure secret to access privileged endpoints.

## Request body

- object
  - `data` object, required
    - `type` 'CreateCounterparty', required
    - `attributes` object, required
      - `label` string: Optional label for the counterparty.
      - `accountNumber` string, required: The bank account number for settlements.
      - `routingNumber` string, required: The nine-digit ABA routing number of the bank account for settlements. Validated on create: it must be nine digits, begin with a routing symbol issued to a US bank, and satisfy the ABA checksum. A value that fails any of these is rejected with `400 InvalidRoutingNumber`.
      - `accountType` 'Checking' | 'Savings', required: The type of bank account.

## Response `201`

Counterparty created successfully

- CreateCounterpartyResponse
  - `data` Counterparty, required: A counterparty represents a payee. `externalBankAccount` is the payee's own bank account for settlement. Top-level `accountNumber` / `routingNumber` / `accountType` still echo those values but are deprecated. `internalBankAccount` is the Accrue account you can fund over bank rails when one has been provisioned.
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'Counterparty', required
    - `attributes` object, required
      - `updatedAt` string, date-time, required
      - `createdAt` string, date-time, required
      - `label` string: Optional label for the counterparty.
      - `accountNumber` string: Deprecated. Use `externalBankAccount.accountNumber` instead. Still returned for compatibility.
      - `routingNumber` string: Deprecated. Use `externalBankAccount.routingNumber` instead. Still returned for compatibility.
      - `accountType` 'Checking' | 'Savings': Deprecated. Use `externalBankAccount.accountType` instead. Still returned for compatibility.
      - `externalBankAccount` CounterpartyExternalBankAccount: The payee's own bank account for settlement.
        - `accountNumber` string, required: The payee's bank account number for settlement.
        - `routingNumber` string, required: The payee's ABA routing number for settlement.
        - `accountType` 'Checking' | 'Savings', required: The type of the payee's settlement bank account.
      - `internalBankAccount` CounterpartyInternalBankAccount: The Accrue bank account associated with this counterparty. Present only when a dedicated Accrue deposit account has been provisioned. Use these details to send funds to this counterparty over bank rails.
        - `accountNumber` string, required: Account number of the Accrue bank account associated with this counterparty.
        - `routingNumber` string, required: Routing number of the Accrue bank account associated with this counterparty.
        - `accountType` 'Checking' | 'Savings', required: Account type of the Accrue bank account associated with this counterparty.
      - `balance` object
        - `pending` integer, required: Incoming credits that have not posted yet, in cents. Outgoing payouts and transfers are not included. Can exceed the int32 range — read it into a 64-bit integer.
        - `available` integer, required: Posted credits minus every debit, whether posted or still in flight, in cents. This is the amount that can be paid out now. Can exceed the int32 range — read it into a 64-bit integer. A single payout is capped below this (see the payout `amount` field), so a balance above that cap is paid out across multiple payouts.
        - `posted` integer, required: Posted credits minus posted debits, in cents. It changes only when a transaction posts (a transaction's `postedAt`), so it is the balance to reconcile the `Posted` transactions against. `posted - available` is the debits still in flight, such as payouts that have not completed. Can exceed the int32 range — read it into a 64-bit integer.

## Other responses

- `400`: Bad Request
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/byaccrue/apis/accrue-merchant-api.md) - [All operations](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/revisions/3e2d97ef2e6e?raw)
