Skip to main content
POST
/
api
/
v1
/
wallet
/
account-statement
curl -X POST "https://olive-gateway-a6ba.onrender.com/api/v1/wallet/account-statement" \
  -H "Authorization: Bearer olive_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriber_id": "sub_abc123",
    "pin": "1234",
    "from_date": "2025-01-01",
    "to_date": "2025-01-31",
    "format": "pdf"
  }'
{
  "success": true,
  "message": "Statement generated successfully",
  "statement_url": "https://storage.olive.example.com/statements/stmt_abc123.pdf",
  "transaction_count": 45,
  "period": {
    "from": "2025-01-01",
    "to": "2025-01-31"
  },
  "opening_balance": "50,000.00 SLE",
  "closing_balance": "125,000.00 SLE",
  "expires_at": "2025-02-01T10:30:00Z"
}
Generate downloadable account statements in PDF or CSV format for a specified date range.

Request

Authorization
string
required
Bearer olive_live_xxx or Bearer eyJ... (JWT)

Body Parameters

subscriber_id
string
required
Subscriber UUID
pin
string
required
Subscriber’s 4-digit PIN
from_date
string
required
Start date (YYYY-MM-DD)
to_date
string
required
End date (YYYY-MM-DD)
format
string
default:"pdf"
Output format: pdf or csv

Response

success
boolean
Whether generation succeeded
statement_url
string
Download URL (valid for 24 hours)
transaction_count
integer
Number of transactions in statement

Examples

curl -X POST "https://olive-gateway-a6ba.onrender.com/api/v1/wallet/account-statement" \
  -H "Authorization: Bearer olive_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriber_id": "sub_abc123",
    "pin": "1234",
    "from_date": "2025-01-01",
    "to_date": "2025-01-31",
    "format": "pdf"
  }'
{
  "success": true,
  "message": "Statement generated successfully",
  "statement_url": "https://storage.olive.example.com/statements/stmt_abc123.pdf",
  "transaction_count": 45,
  "period": {
    "from": "2025-01-01",
    "to": "2025-01-31"
  },
  "opening_balance": "50,000.00 SLE",
  "closing_balance": "125,000.00 SLE",
  "expires_at": "2025-02-01T10:30:00Z"
}

Statement Contents

Professional statement including:
  • Account holder details
  • Opening/closing balance
  • Transaction table with dates
  • Running balance column
  • Summary totals

Date Range Limits

PeriodMaximum Range
Standard90 days
Premium365 days
CorporateUnlimited
Statement URLs expire after 24 hours. Download or share immediately.

Errors

StatusCodeDescription
400INVALID_DATE_RANGEInvalid or excessive date range
400INVALID_FORMATFormat must be pdf or csv
400INVALID_PINPIN verification failed
401UNAUTHORIZEDInvalid API key
404SUBSCRIBER_NOT_FOUNDSubscriber not found
500GENERATION_FAILEDStatement generation error