[GH-ISSUE #683] Add App Store Server transaction history support to insights #184

Closed
opened 2026-02-26 21:33:56 +03:00 by kerem · 1 comment
Owner

Originally created by @rudrankriyam on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/683

Context

We want to extend asc insights using App Store Server API transaction history.

Current sales-based insights can miss or delay renewal visibility, while transaction history can provide richer renewal signals when processed incrementally.

Scope and effort

This is medium-to-hard, depending on depth:

  • Raw command only (MVP): ~0.5-1.5 days
  • Real app-level renewal insights integration: ~4-8 days (sometimes more)

Phase 1: MVP command (quick win)

Add a raw command, e.g.:

  • asc insights transaction --transaction-id ...

Implementation:

  • Call GET /inApps/v2/history/{transactionId}
  • Parse response payload
  • Render JSON/table output
  • Add basic unit/cmd tests

Phase 2: Full insights integration

Build a reliable app-level renewal pipeline (e.g., "yesterday renewals for app X"):

  • Seed from transaction IDs (endpoint is keyed by transactionId, not app-wide list)
  • Implement pagination via revision tokens
  • Decode/normalize signedTransactions JWS payloads
  • Add dedupe + persistent cursor/state so runs are incremental
  • Aggregate into insights daily/weekly
  • Add robust tests for incremental behavior and edge cases

Key risk / design note

The hard part is not the HTTP call. The hard part is building a reliable seed-ID + incremental-history pipeline so results are complete and repeatable.

Suggested delivery strategy

  1. Ship Phase 1 MVP first.
  2. Follow with Phase 2 using notification-seeded transaction IDs and persistent state.

Reference

Originally created by @rudrankriyam on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/683 ## Context We want to extend `asc insights` using App Store Server API transaction history. Current sales-based insights can miss or delay renewal visibility, while transaction history can provide richer renewal signals when processed incrementally. ## Scope and effort This is medium-to-hard, depending on depth: - **Raw command only (MVP): ~0.5-1.5 days** - **Real app-level renewal insights integration: ~4-8 days (sometimes more)** ## Phase 1: MVP command (quick win) Add a raw command, e.g.: - `asc insights transaction --transaction-id ...` Implementation: - Call `GET /inApps/v2/history/{transactionId}` - Parse response payload - Render JSON/table output - Add basic unit/cmd tests ## Phase 2: Full insights integration Build a reliable app-level renewal pipeline (e.g., "yesterday renewals for app X"): - Seed from transaction IDs (endpoint is keyed by `transactionId`, not app-wide list) - Implement pagination via `revision` tokens - Decode/normalize `signedTransactions` JWS payloads - Add dedupe + persistent cursor/state so runs are incremental - Aggregate into `insights daily/weekly` - Add robust tests for incremental behavior and edge cases ## Key risk / design note The hard part is **not** the HTTP call. The hard part is building a reliable seed-ID + incremental-history pipeline so results are complete and repeatable. ## Suggested delivery strategy 1. Ship Phase 1 MVP first. 2. Follow with Phase 2 using notification-seeded transaction IDs and persistent state. ## Reference - Apple: Get Transaction History - https://developer.apple.com/documentation/appstoreserverapi/get-transaction-history
kerem closed this issue 2026-02-26 21:33:56 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 26, 2026):

Closing for now due scope/priority. Reopen when this is prioritized for a dedicated implementation pass.

<!-- gh-comment-id:3964594000 --> @rudrankriyam commented on GitHub (Feb 26, 2026): Closing for now due scope/priority. Reopen when this is prioritized for a dedicated implementation pass.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#184
No description provided.