Skip to main content
POST
/
v1
/
counterparties
Create a counterparty
curl --request POST \
  --url https://api.ledger.so/v1/counterparties \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "<string>",
  "currency": "<string>",
  "accountType": "us_bank",
  "accountOwnerName": "<string>",
  "accountOwnerType": "<string>",
  "bankName": "<string>",
  "accountName": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "businessName": "<string>",
  "account": "<string>",
  "iban": "<string>",
  "clabe": "<string>",
  "pixKey": "<string>",
  "brCode": "<string>",
  "address": {},
  "details": {}
}
'
{
  "ok": true,
  "data": {
    "id": "<string>",
    "customerId": "<string>",
    "accountType": "us_bank",
    "currency": "<string>",
    "status": "<string>",
    "accountOwnerName": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "bankName": "<string>",
    "accountName": "<string>",
    "accountOwnerType": "<string>",
    "last4": "<string>",
    "details": {}
  }
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token: Authorization: Bearer ld_live_...

Body

application/json
customerId
string
required

The customer ID

currency
string
required

Currency code (e.g. "usd", "eur", "mxn")

accountType
enum<string>
required

Type of external account

Available options:
us_bank,
iban,
clabe,
pix,
gb_bank,
mobile_money,
ghipss,
nip,
swift
accountOwnerName
string
required

Name of the account owner

accountOwnerType
string

Type of account owner (e.g. "individual", "business")

bankName
string

Name of the bank

accountName
string

Friendly name for the account

firstName
string

Account owner's first name

lastName
string

Account owner's last name

businessName
string

Business name (for business accounts)

account
string

Account number (for us_bank, gb_bank, etc.)

iban
string

IBAN (for iban account type)

clabe
string

CLABE number (for clabe account type)

pixKey
string

PIX key (for pix account type)

brCode
string

BR code (for pix account type)

address
object

Address of the account owner

details
object

Additional account-type-specific details

Response

Counterparty created

ok
enum<boolean>
required
Available options:
true
data
object
required