Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.digiflecttech.dev/llms.txt

Use this file to discover all available pages before exploring further.

A transaction in Save App represents any financial event that affects the group fund or a member’s standing. Every transaction starts in PENDING status and must be approved by all active admins before it is reflected in the group balance and the member’s credit score. This two-step model ensures that every movement of funds has been verified by the group leadership.

Transaction types

TypeDescription
contributionA member’s regular savings deposit
payoutA disbursement from the group fund to a member
loan_repaymentA repayment towards an active loan
penaltyA penalty charged for a late or missed contribution

Record a transaction

Any authenticated user can record a transaction. Admins can record on behalf of any member by name; regular members are limited to recording against their own account.
curl -X POST https://api.saveapp.co/api/transactions \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "memberName": "Amara Nakato",
    "type": "contribution",
    "amount": 50000,
    "description": "Monthly contribution for January 2025",
    "paymentMethod": "mobile_money",
    "idempotency_key": "contrib-amara-202501-001"
  }'
Response
{
  "id": "c4d5e6f7-a8b9-0123-cdef-456789012345",
  "member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "memberName": "Amara Nakato",
  "type": "contribution",
  "amount": 50000.0,
  "description": "Monthly contribution for January 2025",
  "payment_method": "mobile_money",
  "status": "pending",
  "date": "2025-01-10T10:30:00Z"
}
Pass a unique idempotency_key when submitting transactions from a mobile app. If a network timeout causes you to retry, the API will return the original transaction record rather than creating a duplicate charge. Use a key that includes the member name, date, and a unique counter, for example "contrib-amara-202501-001".
The paymentMethod field is a free-form string. Common values used across Save App groups include "mobile_money" and "cash", but you may use any label that matches your group’s reconciliation process.

View transactions

Retrieve transactions with optional filters. Members only see their own transactions; admins see all transactions in the group.
curl "https://api.saveapp.co/api/transactions?limit=20&offset=0" \
  -H "Authorization: Bearer <token>"
The startDate and endDate query parameters accept Unix timestamps in milliseconds. For example, 1704067200000 represents 2024-01-01T00:00:00Z. Convert your date to milliseconds by multiplying a seconds-based Unix timestamp by 1000.
Response
{
  "data": [
    {
      "id": "c4d5e6f7-a8b9-0123-cdef-456789012345",
      "member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "memberName": "Amara Nakato",
      "type": "contribution",
      "amount": 50000.0,
      "description": "Monthly contribution for January 2025",
      "payment_method": "mobile_money",
      "status": "pending",
      "date": "2025-01-10T10:30:00Z"
    }
  ],
  "total": 1,
  "limit": 20,
  "offset": 0
}

Admin approval workflow

Transactions require unanimous approval from all active admins before they take effect. Each admin independently calls the approve endpoint; the API tracks progress and executes the transaction automatically once the final admin approves.
curl -X POST "https://api.saveapp.co/api/transactions/c4d5e6f7-a8b9-0123-cdef-456789012345/approve" \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "adminEmail": "admin@kampalasampavers.co.ug"
  }'
Before unanimous approval (waiting for more admins):
{
  "success": true,
  "message": "Approval recorded. Waiting for other admins to approve."
}
After unanimous approval (all admins have voted):
{
  "success": true,
  "message": "Transaction approved and executed successfully"
}

What happens on approval

When the final admin’s vote triggers execution, the API performs these side effects automatically based on the transaction type:
TypeBalance effectMember effect
contributionGroup balance creditedcontribution_paid increases; credit score updated based on timing
payoutGroup balance debited
loan_repaymentGroup balance credited
penaltyGroup balance creditedshortfall_amount increases

Credit score and timing

For contribution transactions, the API checks whether the payment was made before or after the active cycle’s contribution_due_date:
  • On time — the member’s credit score is increased (default +5 points)
  • Late — the member’s credit score is decreased (default −10 points)
Only PENDING transactions can be approved. Attempting to approve a transaction with any other status will return a 400 error.

TransactionEntity response fields

FieldTypeDescription
idstringUnique transaction UUID
member_idstringUUID of the member the transaction belongs to
memberNamestringDisplay name of the member
typestringcontribution, payout, loan_repayment, or penalty
amountfloatTransaction amount
descriptionstringOptional free-text note
payment_methodstringPayment channel used (e.g. "mobile_money", "cash")
statusstring"pending" or "approved"
datedatetimeTimestamp when the transaction was recorded (ISO 8601)