Skip to content

feat: revenue settlement service batch payout #26#87

Merged
greatest0fallt1me merged 13 commits intoCalloraOrg:mainfrom
Demilade01:feature/revenue-settlement-service
Feb 28, 2026
Merged

feat: revenue settlement service batch payout #26#87
greatest0fallt1me merged 13 commits intoCalloraOrg:mainfrom
Demilade01:feature/revenue-settlement-service

Conversation

@Demilade01
Copy link
Contributor

Implemented a batch payout service to aggregate developer revenue from API
usage and settle payments via Soroban.
Closes #26

Implemented a batch payout service to aggregate developer revenue from API
usage and settle payments via Soroban.
Closes CalloraOrg#26
@greatest0fallt1me
Copy link
Contributor

please resolve the conflicts

Demilade01 and others added 10 commits February 25, 2026 16:48
Add GET /api/developers/revenue (authenticated) returning total revenue,
pending settlement, and paginated list of settlements.

- Add requireAuth middleware with Bearer token validation
- Add Settlement, RevenueSummary, DeveloperRevenueResponse types
- Add in-memory mock data layer for settlements and usage
- Add developer routes module mounted at /api/developers
- Add 8 tests covering auth, response shape, values, and pagination

closes CalloraOrg#37
- Add /v1/call/:apiSlugOrId/* proxy route with full middleware pipeline
- Resolve APIs by slug or ID via ApiRegistry
- Auth (x-api-key), rate-limit (429), billing (402) checks
- Forward safe headers, strip internal ones (x-api-key, host, etc.)
- Inject X-Request-Id (UUID) on every request/response
- Configurable timeout (PROXY_TIMEOUT_MS env, default 30s) → 504
- Stream upstream response back to caller
- Record usage events for all proxied requests
- Integration tests covering all error paths and header behavior
This commit implements usage metering for proxied API calls. The billing
and recording logic has been moved to a non-blocking post-response flow
to avoid added latency, and is now based on individual endpoint pricing. Closes CalloraOrg#21
Implemented a batch payout service to aggregate developer revenue from API
usage and settle payments via Soroban.
Closes CalloraOrg#26
@Demilade01
Copy link
Contributor Author

@greatest0fallt1me can you pls check this out, I have fixed the merge conflicts

@Demilade01
Copy link
Contributor Author

@greatest0fallt1me this branch contains all my commit, and it is where I resolved all merge conflicts

@greatest0fallt1me
Copy link
Contributor

@Demilade01

@Demilade01
Copy link
Contributor Author

@greatest0fallt1me i have fixed the conflicts, pls help me merge it

@greatest0fallt1me
Copy link
Contributor

@Demilade01 Can you resolve the conflicts?

@Demilade01
Copy link
Contributor Author

@greatest0fallt1me I have fixed the merge conflicts

@greatest0fallt1me greatest0fallt1me merged commit 94d34ac into CalloraOrg:main Feb 28, 2026
1 check failed
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.

Implement Revenue Settlement Service (Batch Payout)

2 participants