Skip to content

feat(pay): subscription invoices + plan id - #35

Merged
PancheI merged 2 commits into
mainfrom
feat/pay-subscription-invoices
Aug 18, 2026
Merged

feat(pay): subscription invoices + plan id#35
PancheI merged 2 commits into
mainfrom
feat/pay-subscription-invoices

Conversation

@PancheI

@PancheI PancheI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Why

No open PR covered this. #32 (pay 2.0) is already merged. SaaS integrators need to list a subscription’s invoices and know which plan (paymentLinkId) it belongs to.

What

  • subscriptions.invoices(id)GET /gateway/subscriptions/:id/invoices
  • Subscription.paymentLinkId (same as product Copy link ID / paymentLinks.id)
  • cancelAtPeriodEnd, canceledAt, effectiveCancelDate on the type
  • JSDoc: checkouts.create({ linkId }) uses that same id
  • Changeset: @agentaos/pay minor
  • Tests: 25/25 in resources.test.ts

Public-repo check

No customer data, keys, or internal ids. Example invoice number is INV-2026-0001.

Pairs with docs PR: AgentaOS/docs#5

Add subscriptions.invoices(id) for billing history. Surface paymentLinkId
and cancel fields on Subscription so integrators can match a plan and
drive status/cancel. Copy link ID on the product page is paymentLinks.id.
Rename Subscription.paymentLinkId to linkId. Checkout.paymentLinkId
is unchanged (that is the session column camelCase).
@PancheI
PancheI merged commit 5f52799 into main Aug 18, 2026
1 check passed
@PancheI
PancheI deleted the feat/pay-subscription-invoices branch August 18, 2026 19:29
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.

1 participant