Skip to content

feat(pay): add livemode to webhook payloads + type subscription webhook events - #37

Merged
PancheI merged 1 commit into
mainfrom
feat/pay-webhook-livemode-subs
Aug 19, 2026
Merged

feat(pay): add livemode to webhook payloads + type subscription webhook events#37
PancheI merged 1 commit into
mainfrom
feat/pay-webhook-livemode-subs

Conversation

@PancheI

@PancheI PancheI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What

  • Adds livemode: boolean to every WebhookEvent data type (CheckoutCompletedData, SendCompletedData, SendFailedData).
  • Adds a new SubscriptionData type and the 5 subscription.* events to the WebhookEvent union: created, renewed, payment_failed, updated, canceled (exported from the package index).

Why

Mirrors the platform payload change (AgentaOS/platform#153): livemode (true=live, false=test) is the account-mode signal that replaces the chain-specific testnet field — testnet was meaningless for card/bank rails. The SDK never typed testnet, so this is purely additive. Subscription lifecycle events are emitted by the platform but were previously untyped in the SDK.

Verification

Type-only change (the SDK passes payload fields through). tsc clean, build clean, 109 tests pass. Changeset included (minor).

🤖 Generated with Claude Code

…ok events

- Every WebhookEvent data now carries livemode: boolean (true=live, false=test).
  Replaces the chain-specific testnet field (meaningless for card/bank rails);
  use network for the chain/rail.
- New SubscriptionData type + 5 subscription.* events on the WebhookEvent union
  (created / renewed / payment_failed / updated / canceled).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PancheI
PancheI merged commit 0b3489a into main Aug 19, 2026
1 check passed
@PancheI
PancheI deleted the feat/pay-webhook-livemode-subs branch August 19, 2026 07:12
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