Skip to main content

Accounts

Create Account​

This API allows you to create a new account for a user in the system.

POST {{baseUrl}}/roecny/api/v1/account

Description

Creates a new global account with specified currency and transfer capabilities. This API enables the creation of a new account for a user within the system. It establishes a global account for the authenticated user in the specified currency and supports multiple transfer methods—such as Local and SWIFT—allowing for both domestic and international transactions.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier based on requirement
x-request-idstringYesIdempotency key for request tracking
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
typestringYesAccount type ("global_account", "virtual_account")
countrystringYesISO country code (e.g., "US")
currencystringYesCurrency code (e.g., "USD")
labelstringNoHuman-readable account label
required_featuresarrayYesArray of required transfer capabilities
required_features[].currencystringYesCurrency for the feature
required_features[].transfer_methodstringYes"LOCAL" or "SWIFT"

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code
statusstring"success" or "error"
messagestringResult description
dataarrayCreated account(s)
data[].idstringAccount UUID
data[].statusstring"INACTIVE", "ACTIVE", etc.
data[].account_numberstringAccount identifier
data[].account_typestringType of account
data[].swift_codestringSWIFT/BIC code
data[].supported_featuresarrayAvailable transfer methods

Request Example

curl --request POST \
--url {{baseUrl}}/roecny/api/v1/account \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{ProgramID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{AccessToken}}' \
--data '{
"type": "global_account",
"country": "US",
"currency": "USD",
"label": "Satyakee17",
"required_features": [
{
"currency": "USD",
"transfer_method": "LOCAL"
},
{
"currency": "USD",
"transfer_method": "SWIFT"
}
]
}'

Response Example

{
"status": "success",
"message": "global_account created successfully",
"code": 200,
"data": [
{
"id": "0f7a67a5-1804-4708-a1f2-c0c1c8aa2c4b",
"status": "INACTIVE",
"account_number": "-",
"label": "Satyakee17",
"account_type": "Checking",
"country_code": "US",
"institution": {
"address": "89-16 Jamaica Ave",
"city": "Woodhaven, NY",
"name": "Community Federal Savings Bank",
"zip_code": "11421"
},
"supported_features": [
{
"currency": "USD",
"local_clearing_system": "ACH",
"transfer_method": "LOCAL",
"type": "DEPOSIT",
"routing_codes": [
{
"type": "ach",
"value": "026073150"
}
]
},
{
"currency": "USD",
"local_clearing_system": "FEDWIRE",
"transfer_method": "LOCAL",
"type": "DEPOSIT",
"routing_codes": [
{
"type": "fedwire",
"value": "026073008"
}
]
},
{
"currency": "USD",
"local_clearing_system": null,
"transfer_method": "SWIFT",
"type": "DEPOSIT",
"routing_codes": [
{
"type": "swift",
"value": "CMFGUS33"
}
]
}
],
"swift_code": "CMFGUS33"
}
]
}

Get Account​

This API allows you to retrieve all accounts associated with a user in the system.

GET {{baseUrl}}/roecny/api/v1/account

Description

Returns a list of all accounts (both active and inactive) for the authenticated user, including account details, institution information, and supported transfer features

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key (UUID recommended)
x-user-idstringYesUnique user identifier
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
idstringNoFilter by specific account ID
currencystringNoFilter by currency (e.g., "USD")
statusstringNoFilter by status ("ACTIVE", "INACTIVE")

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code
statusstring"success" or "error"
messagestringResult description
dataarrayList of account objects
data[].idstringAccount UUID
data[].statusstringAccount status
data[].account_numberstringBank account number
data[].account_typestringType of account
data[].institutionobjectBank institution details
data[].supported_featuresarrayAvailable transfer methods

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/account?status=ACTIVE' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{ProgramID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Authorization: Bearer {{AccessToken}}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"id": "0f7a67a5-1804-4708-a1f2-c0c1c8aa2c4b",
"status": "ACTIVE",
"account_number": "8483855800",
"label": "",
"account_type": "Checking",
"country_code": "US",
"institution": {
"address": "89-16 Jamaica Ave",
"city": "Woodhaven, NY",
"name": "Community Federal Savings Bank",
"zip_code": "11421"
},
"supported_features": [
{
"currency": "USD",
"local_clearing_system": "ACH",
"routing_codes": [
{
"type": "ach",
"value": "026073150"
}
],
"transfer_method": "LOCAL",
"type": "DEPOSIT"
},
{
"currency": "USD",
"local_clearing_system": "FEDWIRE",
"routing_codes": [
{
"type": "fedwire",
"value": "026073008"
}
],
"transfer_method": "LOCAL",
"type": "DEPOSIT"
},
{
"currency": "USD",
"routing_codes": [
{
"type": "swift",
"value": "CMFGUS33"
}
],
"transfer_method": "SWIFT",
"type": "DEPOSIT"
}
]
}
]
}

Get Balance​

This API allows you to retrieve the available, pending, and reserved balances for all currencies associated with an account.

GET {{baseUrl}}/roecny/api/v1/account/balance

Description

This endpoint retrieves the current balance information for all currencies associated with the authenticated user's account. The response includes available balance, pending amounts, and reserved amounts for each currency.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key (UUID recommended)
x-user-idstringYesUnique user identifier
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code
statusstring"success" or "error"
messagestringResult description
dataarrayList of balance objects by currency
data[].currencystringISO currency code (e.g., "USD", "SGD")
data[].available_balancenumberImmediately usable funds
data[].pending_amountnumberFunds in pending transactions
data[].reserved_amountnumberFunds held for reservations

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/account/balance' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{ProgramID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Authorization: Bearer {{AccessToken}}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"currency": "SGD",
"available_balance": 42.72,
"pending_amount": 0,
"reserved_amount": 12
},
{
"currency": "USD",
"available_balance": 22.72,
"pending_amount": 5,
"reserved_amount": 10
}
]
}

Get Account Transactions​

This API returns paginated transaction history with filters for date range and transaction status. Includes detailed information about each transaction including amount, currency, and status..

GET {{baseUrl}}/roecny/api/v1/account/transactions

Description

This endpoint returns a paginated list of transactions for the user's account. Transactions can be filtered by date range, type, status, and other criteria.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key (UUID recommended)
x-user-idstringYesUnique user identifier
x-account-idstringYesGlobal account identifier
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination (default: 1)
sizeintegerNoNumber of items per page (default: 20)
from_datestringNoStart date filter (ISO 8601 format)
to_datestringNoEnd date filter (ISO 8601 format)
currencystringNoFilter by currency code (e.g., "USD")
statusstringNoFilter by status ("SETTLED", "PENDING", etc.)

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code
statusstring"success" or "error"
messagestringResult description
dataarrayList of transaction objects
data[].idstringUnique transaction identifier
data[].amountnumberTransaction amount
data[].currencystringCurrency code
data[].typestring"CREDIT" or "DEBIT"
data[].statusstringTransaction status
data[].create_timestringISO 8601 timestamp
data[].descriptionstringTransaction description

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/account/transactions?page=1&size=10&from_date=2025-01-01&to_date=2025-04-30' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{ProgramID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'x-account-id:{{GlobalAccountId}}'\
--header 'Authorization: Bearer {{AccessToken}}'

Response Example

{
"status": "success",
"message": "global_accounts transactions details",
"code": 200,
"data": [
{
"amount": 1000.0,
"create_time": "2025-04-09T10:12:37+0000",
"description": "Test from Postman",
"currency": "USD",
"id": "a9e5d92e-b83e-42e4-84e9-73318782ce21",
"type": "CREDIT",
"status": "SETTLED"
}
]
}

Get Balance History​

This API returns paginated balance history with filters for date range. Includes detailed information about each balance change including amount, currency, and transaction type.

  GET {{baseUrl}}/roecny/api/v1/account/balance/history

Description

This endpoint returns a paginated list of balance changes for the user's account. Results can be filtered by date range and include detailed information about each transaction affecting the balance.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key (UUID recommended)
x-user-idstringYesUnique user identifier
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number for pagination (default: 1)
sizeintegerNoNumber of items per page (default: 20)
from_datestringNoStart date filter (ISO 8601 format)
to_datestringNoEnd date filter (ISO 8601 format)
currencystringNoFilter by currency code (e.g., "USD")
transaction_typestringNoFilter by transaction type ("DEPOSIT", "PAYOUT", etc.)

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code
statusstring"success" or "error"
messagestringResult description
dataarrayList of balance history objects
data[].idstringUnique transaction identifier
data[].amountnumberTransaction amount (positive for credit, negative for debit)
data[].currencystringCurrency code
data[].balancenumberAccount balance after transaction
data[].descriptionstringTransaction description
data[].feenumberFee amount (if applicable)
data[].create_timestringISO 8601 timestamp
data[].source_typestringSource of transaction ("DEPOSIT", "PAYOUT", etc.)
data[].transaction_typestringDetailed transaction type ("CONVERSION_BUY", "HOLD", etc.)

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/account/balance/history?page=1&size=10&from_date=2025-01-01&to_date=2025-04-30' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{ProgramID}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{UserID}}' \
--header 'Authorization: Bearer {{AccessToken}}'

Response Example

{
"status": "success",
"message": "balance history details",
"code": 200,
"data": [
{
"id": "962a6bea-1949-4e75-93c9-d32fd9773c50",
"amount": -1.0,
"currency": "SGD",
"balance": 8919.86,
"description": "Pay SGD 1.00 to (Individual Local SG)",
"fee": 0.0,
"create_time": "2025-05-07T12:13:24+0800",
"source_type": "PAYOUT",
"transaction_type": "PAYOUT"
},
{
"id": "e5042ce1-e2d0-4ddd-a843-0abe4a169bfe",
"amount": 12.86,
"currency": "SGD",
"balance": 8920.86,
"description": "Buy SGD 12.86",
"fee": 0.0,
"create_time": "2025-05-07T11:28:39+0800",
"source_type": "CONVERSION",
"transaction_type": "CONVERSION_BUY"
},
{
"id": "1f0e2c08-1e31-45ff-9242-20f9995252ca",
"amount": 60000.0,
"currency": "DKK",
"balance": 60000.0,
"description": "Test from Postman - GA (First DKK)",
"fee": 0.0,
"create_time": "2025-04-30T19:38:41+0800",
"source_type": "DEPOSIT",
"transaction_type": "DEPOSIT"
}
]
}