Skip to main content

Account Service

Manages account creation and balance inquiries.


Endpoints


Create Account

POST /account/create

Create a new account.

Request Body

FieldTypeRequiredDescriptionExample
customerIdstringYesCustomer identifier"cst-123e4567-e89b-12d3-a456-426614174000"
namestringNoAccount name"Main Account"
emailstringNoCustomer email address"john.doe@example.com"
routerDataobjectNoRouter-specific configuration data{ "connectionType": "SOAP" }
customerNamestringNoCustomer name"John Doe"

Example Request:

{
"customerId": "cst-123e4567-e89b-12d3-a456-426614174000",
"name": "Main Account",
"email": "john.doe@example.com",
"routerData": {
"connectionType": "SOAP",
"connectionFormat": "ISO20022",
"endpoint": "https://bank-api.example.com/soap"
},
"customerName": "John Doe"
}

Success Response

Returns the external account ID.

{
"externalId": "acc-789e4567-e89b-12d3-a456-426614174000"
}

Error Responses

  • 400 Bad Request: Validation failed (missing or invalid fields)
  • 500 Internal Server Error: Failed to create account

Balance Inquiry

POST /account/balance-inquiry

Request account balance using ISO 20022 CAMT.052.

Request Body

FieldTypeRequiredDescriptionExample
accountIdstringYesAccount identifier (IBAN or BBAN)"US12345678901234567890"
routerDataobjectNoRouter-specific configuration data{ "connectionType": "SOAP" }

Example Request:

{
"accountId": "US12345678901234567890",
"routerData": {
"connectionType": "SOAP",
"connectionFormat": "ISO20022",
"endpoint": "https://bank-api.example.com/soap"
}
}

Success Response

Returns account balance details.

{
"currentBalance": "15800.00",
"availableBalance": "15234.75",
"ledgerBalance": "15800.00",
"currency": "USD",
"asOfDateTime": "2025-08-27T14:35:22Z"
}

Error Responses

  • 404 Not Found: Account not found or cannot be accessed
  • 500 Internal Server Error: Balance inquiry failed

Error Format

All error responses follow this format:

{
"statusCode": "ERROR_CODE",
"error": ["Description of the error"],
"requestId": "72e32108-6260-45e9-bb12-325fe3b61e42",
"path": "endpoint path",
"timestamp": "2025-11-19T16:32:57.915Z"
}

Field Descriptions

FieldTypeDescription
externalIdstringUnique identifier for the created account
accountIdstringAccount identifier (IBAN or BBAN)
namestringAccount name
emailstringCustomer email address
routerDataobjectRouter-specific configuration data
customerNamestringCustomer name
currentBalancestringCurrent account balance
availableBalancestringAvailable balance for transactions
ledgerBalancestringLedger balance (if provided by bank)
currencystringCurrency code
asOfDateTimestringISO8601 timestamp of balance inquiry

For more details, see CreateAccountDto and BalanceInquiryDto, BalanceResponseDto definitions.