Skip to content

feat: REST user billing history (transactions)#103

Open
precious-akpan wants to merge 19 commits intoCalloraOrg:mainfrom
precious-akpan:feature/rest-billing-history
Open

feat: REST user billing history (transactions)#103
precious-akpan wants to merge 19 commits intoCalloraOrg:mainfrom
precious-akpan:feature/rest-billing-history

Conversation

@precious-akpan
Copy link
Contributor

Implements GET /api/billing/transactions endpoint as described in issue #39

Changes

  • Added GET /api/billing/transactions endpoint with authentication
  • Supports query params: from, to, type (deposit|charge|withdrawal), limit, offset
  • Extended UsageEventsRepository to fetch billing transactions (charges)
  • Extended VaultRepository to fetch vault transactions (deposits/withdrawals)
  • Merged transactions from both sources with consistent shape
  • Added comprehensive tests for the endpoint
  • Returns transactions with amount, date, type, tx_hash, and description

Testing

  • Added unit tests in src/routes/billing.test.ts
  • Tests cover authentication, validation, filtering, and pagination

Closes #39

@precious-akpan
Copy link
Contributor Author

@greatest0fallt1me awaiting your review sir..

@greatest0fallt1me
Copy link
Contributor

@precious-akpan Can you resolve the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add REST Route: User Billing History (Transactions)

2 participants