API Reference
Balances
Balance operations
Fetch balances
This endpoint allows you to fetch balances on the currencies you hold
AuthorizationBearer <token>
In: header
Query Parameters
currency?string
Filter by currency code
Response Body
curl -X GET "https://api.ohentpay.com/balances?currency=GBP"[
{
"id": "88fe6e8a-bd3b-11e9-821e-4180c1a9232a",
"name": "Main",
"currency": "GBP",
"balance": 10000,
"default_currency": "GBP",
"default_currency_balance": 10000,
"addresses": [
{
"details": {
"account_name": "John Doe",
"sort_code": "000000",
"account_number": "12345678"
},
"type": "local",
"supported_channels": [
"FP",
"BACS",
"CHAPS"
],
"active": true
}
],
"created": "2019-09-02T13:16:47+01:00"
}
]curl -X POST "https://api.ohentpay.com/balances" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "88fe6e8a-bd3b-11e9-821e-4180c1a9232a",
"name": "Main",
"currency": "GBP",
"balance": 10000,
"default_currency": "GBP",
"default_currency_balance": 10000,
"addresses": [
{
"details": {
"account_name": "John Doe",
"sort_code": "000000",
"account_number": "12345678"
},
"type": "local",
"supported_channels": [
"FP",
"BACS",
"CHAPS"
],
"active": true
}
],
"created": "2019-09-02T13:16:47+01:00"
}{
"request": "error",
"code": 400,
"message": "Invalid request"
}Fetch single balance
AuthorizationBearer <token>
In: header
Path Parameters
idstring
Balance ID
Format
uuidResponse Body
curl -X GET "https://api.ohentpay.com/balances/88fe6e8a-bd3b-11e9-821e-4180c1a9232a"{
"id": "88fe6e8a-bd3b-11e9-821e-4180c1a9232a",
"name": "Main",
"currency": "GBP",
"balance": 10000,
"default_currency": "GBP",
"default_currency_balance": 10000,
"addresses": [
{
"details": {
"account_name": "John Doe",
"sort_code": "000000",
"account_number": "12345678"
},
"type": "local",
"supported_channels": [
"FP",
"BACS",
"CHAPS"
],
"active": true
}
],
"created": "2019-09-02T13:16:47+01:00"
}Empty
Update balance name
AuthorizationBearer <token>
In: header
Path Parameters
idstring
Balance ID
Format
uuidname?string
Range
value <= 50Response Body
curl -X PATCH "https://api.ohentpay.com/balances/88fe6e8a-bd3b-11e9-821e-4180c1a9232a" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "88fe6e8a-bd3b-11e9-821e-4180c1a9232a",
"name": "Main",
"currency": "GBP",
"balance": 10000,
"default_currency": "GBP",
"default_currency_balance": 10000,
"addresses": [
{
"details": {
"account_name": "John Doe",
"sort_code": "000000",
"account_number": "12345678"
},
"type": "local",
"supported_channels": [
"FP",
"BACS",
"CHAPS"
],
"active": true
}
],
"created": "2019-09-02T13:16:47+01:00"
}{
"request": "error",
"code": 400,
"message": "Invalid request"
}