Depa LogoDocsv1
API Reference

Counterparties

A counterparty is a saved recipient on a bank account: the beneficiary of fiat payments and local payouts.

Every counterparty needs iban, recipient, country, address_line1, city, postal_code and kind. Some destination countries need more:

CountryAlso required
China (CN)supported_rails (CIPS or SWIFT), institution_name, swift, state
United Arab Emirates (AE)supported_rails (UAEFTS00 or SWIFT), swift, state
Colombia (CO)institution_name, national_identification_number, phone_number, account_type, state
United States (US)routing_number, state (two-letter code), supported_rails, institution_name
Mexico (MX)state

A 422 response lists every field that's missing or invalid, one error per field.

List counterparties

GET/accounts/{account_id}/bank_accounts/{bank_account_id}/counterparties

Returns the counterparties saved on a bank account, newest first.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
bank_account_id*string

ID of the bank account.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/bank_accounts/6d1c9e2a-3f4b-4c8d-a7e6-5b2f0e9d1c47/counterparties"
{  "data": [    {      "id": "1a6e3b9d-8c2f-4d7a-b5e1-3f9c0a7d2b64",      "iban": "DE89370400440532013000",      "description": "Supplier – office equipment",      "recipient": "Müller Bürobedarf GmbH",      "alias": "Müller",      "external_id": "SUP-0042",      "currency": "EUR",      "kind": "Business",      "address_line1": "Friedrichstraße 123",      "city": "Berlin",      "postal_code": "10117",      "country": "DE",      "state": "BE",      "favourite": true,      "status": null,      "amount": 0,      "relationship_to_customer": "supplier",      "supported_rails": [        "SWIFT"      ],      "preferred_rail": "SWIFT",      "institution_name": "Deutsche Bank",      "routing_number": null,      "swift": "DEUTDEFF",      "national_identification_number": null,      "date_of_birth": null,      "nationality": null,      "phone_number": null,      "email": "accounts@mueller.example",      "account_type": null    }  ]}

Create a counterparty

POST/accounts/{account_id}/bank_accounts/{bank_account_id}/counterparties

Saves a payment recipient on a bank account. Besides the base fields, some destination countries need extra fields (see the table above). A 422 lists every missing or invalid field, one error each.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
bank_account_id*string

ID of the bank account.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A payment recipient. iban, recipient, country, address_line1, city, postal_code and kind are always required; see the table above for the extra fields each destination country needs.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/bank_accounts/6d1c9e2a-3f4b-4c8d-a7e6-5b2f0e9d1c47/counterparties" \  -H "Content-Type: application/json" \  -d '{    "kind": "Business",    "recipient": "Müller Bürobedarf GmbH",    "iban": "DE89370400440532013000",    "address_line1": "Friedrichstraße 123",    "city": "Berlin",    "postal_code": "10117",    "country": "DE",    "currency": "EUR",    "favourite": true,    "alias": "Müller"  }'
{  "data": {    "id": "1a6e3b9d-8c2f-4d7a-b5e1-3f9c0a7d2b64",    "iban": "DE89370400440532013000",    "description": "Supplier – office equipment",    "recipient": "Müller Bürobedarf GmbH",    "alias": "Müller",    "external_id": "SUP-0042",    "currency": "EUR",    "kind": "Business",    "address_line1": "Friedrichstraße 123",    "city": "Berlin",    "postal_code": "10117",    "country": "DE",    "state": "BE",    "favourite": true,    "status": null,    "amount": 0,    "relationship_to_customer": "supplier",    "supported_rails": [      "SWIFT"    ],    "preferred_rail": "SWIFT",    "institution_name": "Deutsche Bank",    "routing_number": null,    "swift": "DEUTDEFF",    "national_identification_number": null,    "date_of_birth": null,    "nationality": null,    "phone_number": null,    "email": "accounts@mueller.example",    "account_type": null  }}

Update a counterparty

PATCH/accounts/{account_id}/bank_accounts/{bank_account_id}/counterparties/{id}

Changes a saved counterparty. Send only the fields you want to change.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
bank_account_id*string

ID of the bank account.

Formatuuid
id*string

ID of the counterparty.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Send only the fields you want to change.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/bank_accounts/6d1c9e2a-3f4b-4c8d-a7e6-5b2f0e9d1c47/counterparties/1a6e3b9d-8c2f-4d7a-b5e1-3f9c0a7d2b64" \  -H "Content-Type: application/json" \  -d '{    "favourite": true,    "alias": "Müller"  }'
{  "data": {    "id": "1a6e3b9d-8c2f-4d7a-b5e1-3f9c0a7d2b64",    "iban": "DE89370400440532013000",    "description": "Supplier – office equipment",    "recipient": "Müller Bürobedarf GmbH",    "alias": "Müller",    "external_id": "SUP-0042",    "currency": "EUR",    "kind": "Business",    "address_line1": "Friedrichstraße 123",    "city": "Berlin",    "postal_code": "10117",    "country": "DE",    "state": "BE",    "favourite": true,    "status": null,    "amount": 0,    "relationship_to_customer": "supplier",    "supported_rails": [      "SWIFT"    ],    "preferred_rail": "SWIFT",    "institution_name": "Deutsche Bank",    "routing_number": null,    "swift": "DEUTDEFF",    "national_identification_number": null,    "date_of_birth": null,    "nationality": null,    "phone_number": null,    "email": "accounts@mueller.example",    "account_type": null  }}

Delete a counterparty

DELETE/accounts/{account_id}/bank_accounts/{bank_account_id}/counterparties/{id}

Deletes a saved counterparty. Payments already made to it aren't affected.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
bank_account_id*string

ID of the bank account.

Formatuuid
id*string

ID of the counterparty.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/bank_accounts/6d1c9e2a-3f4b-4c8d-a7e6-5b2f0e9d1c47/counterparties/1a6e3b9d-8c2f-4d7a-b5e1-3f9c0a7d2b64"
{  "status": 200}
🍪 We do not track your behaviour or use any cookie on this site.