Skip to content

Expose externalId on PlanOption#26

Closed
robert-moore wants to merge 1 commit into
mainfrom
feature/plan-change-external-id
Closed

Expose externalId on PlanOption#26
robert-moore wants to merge 1 commit into
mainfrom
feature/plan-change-external-id

Conversation

@robert-moore

Copy link
Copy Markdown
Contributor

Adds externalId?: string to PlanOption. When a plan-change option is configured with a merchant's external offer id (see the churnkey-api change), the server sends it on the resolved plan; this types it so handlePlanChange consumers can map the chosen plan back to their own catalog — needed when one Stripe price backs several of their offers.

Non-breaking, type-only: the value already reaches the callback at runtime (the SDK config is cast, not field-mapped). typecheck + build + lint + tests clean.

When a plan-change option is configured with a merchant's external offer id, the server now sends it on the resolved plan. Type it on PlanOption so handlePlanChange consumers can map a chosen plan back to their own catalog — needed when one Stripe price backs several of their offers. The value already flows through at runtime (config is cast, not field-mapped); this makes it a typed, documented field.
@robert-moore

Copy link
Copy Markdown
Contributor Author

Closing for now in favor of custom offer types

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