Open a segregation subledger
Handler: OpenAccountSubledger. Opens (idempotently) a purpose-segregated subledger for the account. The subledger's currency is the account's currency; account-anchored purposes anchor to the account, customer-anchored purposes (fees_receivable) to the owning customer. Returns 201 on a fresh open, 200 when the subledger already existed.
Path Parameters
Account id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/subledgers" \ -H "Content-Type: application/json" \ -d '{ "purpose": "pending_settlement_in" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"control_code": "string",
"purpose": "string",
"anchor_level": "account",
"currency": "string",
"balance_posted": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"balance_available": {
"amount": "123456",
"currency": "EUR",
"precision": 2
}
}{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"code": "string",
"control_code": "string",
"purpose": "string",
"anchor_level": "account",
"currency": "string",
"balance_posted": {
"amount": "123456",
"currency": "EUR",
"precision": 2
},
"balance_available": {
"amount": "123456",
"currency": "EUR",
"precision": 2
}
}{
"status": 400,
"message": "string",
"code": "transfers_m.account_not_found",
"class": "validation",
"retryable": false,
"details": [
{
"field": "amount",
"rule": "gt",
"param": "0",
"message": "amount must be greater than 0"
}
]
}{
"status": 400,
"message": "string",
"code": "transfers_m.account_not_found",
"class": "validation",
"retryable": false,
"details": [
{
"field": "amount",
"rule": "gt",
"param": "0",
"message": "amount must be greater than 0"
}
]
}{
"status": 400,
"message": "string",
"code": "transfers_m.account_not_found",
"class": "validation",
"retryable": false,
"details": [
{
"field": "amount",
"rule": "gt",
"param": "0",
"message": "amount must be greater than 0"
}
]
}{
"status": 400,
"message": "string",
"code": "transfers_m.account_not_found",
"class": "validation",
"retryable": false,
"details": [
{
"field": "amount",
"rule": "gt",
"param": "0",
"message": "amount must be greater than 0"
}
]
}Handler: CreateAccountV2. Body CreateAccountInput. Returns UnifiedAccountResponse.
Handler: OpenCustomerSubledger. Opens (idempotently) a customer-anchored subledger (currently only fees_receivable) with no account created or required. One subledger per customer+purpose+currency is shared by every one of the customer's accounts in that currency — repeat calls, including from different accounts of the same customer, resolve to the identical row. Account-anchored purposes (pending_settlement_in/out, compliance_hold_in/out) are rejected: open those via POST /v2/accounts/{id}/subledgers. Returns 201 on a fresh open, 200 when the subledger already existed.