Depa LogoDocsv1
API Reference

Settlements

Settlements move funds between two accounts in your vault without using a bank or blockchain rail.

Use them to fund a customer's sub-account from your main account, sweep balances back, or move money between a customer's own accounts. Each settlement posts a ledger entry on both accounts and returns them in from and to.

List settlements

GET/accounts/{account_id}/settlements

Returns the settlements of an account, each with the ledger entries it posted on both sides.

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

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/settlements"
{  "data": [    {      "id": "e4b1c7a9-3d2f-4e8b-a6c5-9f0d1b2e3a74",      "amount": "250.0",      "currency": "EUR",      "from": {        "account_id": "8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23",        "ledger_entry": {          "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",          "entryable_type": "FiatPayment",          "amount": "1000.0",          "currency": "EUR",          "category": "FiatPayment",          "metadata": {            "description": "Monthly payment",            "category": "subscription"          },          "created_at": 1772813114,          "entryable_id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74"        }      },      "to": {        "account_id": "2b9e4f6a-1c3d-4a8b-b5e7-9f0c2d4e6a81",        "ledger_entry": {          "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",          "entryable_type": "FiatPayment",          "amount": "1000.0",          "currency": "EUR",          "category": "FiatPayment",          "metadata": {            "description": "Monthly payment",            "category": "subscription"          },          "created_at": 1772813114,          "entryable_id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74"        }      },      "created_at": 1772813114    }  ]}

Create a settlement

POST/accounts/{account_id}/settlements

Moves amount of currency from this account to destination_account_id. Both accounts must be in your vault. The settlement posts a debit on this account and a credit on the destination, returned in from and to.

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 the funds leave.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/settlements" \  -H "Content-Type: application/json" \  -d '{    "destination_account_id": "2b9e4f6a-1c3d-4a8b-b5e7-9f0c2d4e6a81",    "amount": 250,    "currency": "EUR",    "metadata": {      "description": "Monthly top-up",      "category": "funding"    }  }'
{  "data": {    "id": "e4b1c7a9-3d2f-4e8b-a6c5-9f0d1b2e3a74",    "amount": "250.0",    "currency": "EUR",    "from": {      "account_id": "8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23",      "ledger_entry": {        "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",        "entryable_type": "FiatPayment",        "amount": "1000.0",        "currency": "EUR",        "category": "FiatPayment",        "metadata": {          "description": "Monthly payment",          "category": "subscription"        },        "created_at": 1772813114,        "entryable_id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74"      }    },    "to": {      "account_id": "2b9e4f6a-1c3d-4a8b-b5e7-9f0c2d4e6a81",      "ledger_entry": {        "id": "c3e7a1f9-2b8d-4c6e-9f1a-5d0b7e3c8a12",        "entryable_type": "FiatPayment",        "amount": "1000.0",        "currency": "EUR",        "category": "FiatPayment",        "metadata": {          "description": "Monthly payment",          "category": "subscription"        },        "created_at": 1772813114,        "entryable_id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74"      }    },    "created_at": 1772813114  }}
🍪 We do not track your behaviour or use any cookie on this site.