Skip to content

Conversation

@NatElkins
Copy link
Contributor

Summary

  • Change price (singular) to prices (array) on ProductSchema and CheckoutProductSchema
  • This allows future support of metered pricing (e.g., base subscription + usage-based charges)
  • Currently only one static price (FIXED/CUSTOM/FREE) is supported

Breaking Change

Consumers need to update from:

product.price.priceAmount

to:

product.prices[0].priceAmount

Test plan

  • All 126 tests pass
  • Update lightning-node to consume new schema
  • Update mdk-checkout if needed

BREAKING CHANGE: Products now use `prices` array instead of singular `price`.
This matches the pattern used by payment processors and allows for future
support of metered pricing alongside static prices.

- ProductSchema.price -> ProductSchema.prices (array)
- CheckoutProductSchema.price -> CheckoutProductSchema.prices (array)
- Updated all tests to use new schema structure
- Bump version to 0.1.15
@NatElkins NatElkins merged commit 366a8f9 into main Jan 14, 2026
2 checks passed
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.

2 participants