> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ledger.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Counterparties

> Register external accounts for receiving payouts.

## Create a counterparty

Register an external bank account, mobile money wallet, or other destination for payouts:

```bash theme={null}
curl -X POST https://api.ledger.so/v1/counterparties \
  -H "Authorization: Bearer $LEDGER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-cp-1" \
  -d '{
    "customerId": "cus_...",
    "currency": "ghs",
    "accountType": "mobile_money",
    "accountOwnerName": "John Doe",
    "details": {
      "provider": "mtn",
      "phoneNumber": "+233501234567"
    }
  }'
```

Response:

```json theme={null}
{
  "ok": true,
  "data": {
    "id": "pa_...",
    "customerId": "cus_...",
    "accountType": "mobile_money",
    "currency": "ghs",
    "status": "active",
    "accountOwnerName": "John Doe",
    "last4": "4567",
    "details": {
      "provider": "mtn",
      "phoneNumber": "+233501234567"
    },
    "createdAt": 1710000000000,
    "updatedAt": 1710000000000
  }
}
```

## Account types

| Type           | Network         | KYC Required | Fields                                       |
| -------------- | --------------- | ------------ | -------------------------------------------- |
| `us_bank`      | ACH             | Yes          | `account` (account\_number, routing\_number) |
| `iban`         | SEPA            | Yes          | `iban`                                       |
| `clabe`        | SPEI            | Yes          | `clabe`                                      |
| `pix`          | PIX             | Yes          | `pixKey` or `brCode`                         |
| `gb_bank`      | Faster Payments | Yes          | `account` (account\_number, sort\_code)      |
| `mobile_money` | MTN, etc.       | No           | `details` (provider, phoneNumber)            |
| `ghipss`       | GhIPSS          | No           | `details` (accountNumber)                    |
| `nip`          | NIP             | No           | `details` (accountNumber, bankCode)          |
| `swift`        | SWIFT           | No           | `details` (accountNumber, swiftCode)         |

Bank-backed types (us\_bank, iban, clabe, pix, gb\_bank) require the customer to have completed KYC verification. Direct types (mobile\_money, ghipss, nip, swift) can be created without KYC.

## Required fields

| Field              | Type   | Required | Description                                     |
| ------------------ | ------ | -------- | ----------------------------------------------- |
| `customerId`       | string | Yes      | Customer who owns this counterparty             |
| `currency`         | string | Yes      | Currency code (e.g. `usd`, `eur`, `ghs`, `ngn`) |
| `accountType`      | string | Yes      | One of the supported account types above        |
| `accountOwnerName` | string | Yes      | Legal name on the account                       |
| `accountOwnerType` | string | No       | `individual` or `business`                      |
| `bankName`         | string | No       | Name of the bank                                |
| `firstName`        | string | No       | Account holder first name                       |
| `lastName`         | string | No       | Account holder last name                        |
| `businessName`     | string | No       | Business name (for business accounts)           |

## List counterparties

```bash theme={null}
curl "https://api.ledger.so/v1/counterparties?customerId=cus_..." \
  -H "Authorization: Bearer $LEDGER_API_KEY"
```

Filter by `customerId` or `currency`.
