Skip to content

Checkout and order discounts - #6

Merged
sandervanhooft merged 2 commits into
mainfrom
checkout-discounts
Nov 30, 2026
Merged

sandervanhooft merged 2 commits into
mainfrom
checkout-discounts

Conversation

@sandervanhooft

Copy link
Copy Markdown
Member

Adds discounts, matching the PHP and JS SDKs:

  • CreateCheckoutRequest.discounts: at most one CheckoutDiscount, a percentage or a fixed EUR amount, plus an optional description. A fixed amount follows the products' tax basis, including on a subscription's first payment after a trial.
  • Order.discounts and OrderLine.discounts: read-only Discount lists (id, description, discount_type, percentage, amount), also in order.* webhooks. Amounts exclude taxes. Payloads without discounts read as [].
  • openapi.yaml synced with docs.vatly.com; models regenerated.

Checks: 222 tests pass (coverage 95.27%), generate.py --check, ruff and mypy clean.

sandervanhooft and others added 2 commits November 30, 2026 09:59
Adds CreateCheckoutRequest.discounts (one CheckoutDiscount: percentage or fixed
EUR amount, optional description) and read-only Order/OrderLine.discounts,
also in order webhooks, with amounts excluding taxes. Syncs openapi.yaml with
docs.vatly.com.

Amp-Thread-ID: https://ampcode.com/threads/T-3f59dfd0-1f6e-41a8-b940-15b496a7ab0c
Co-authored-by: Amp <amp@ampcode.com>
@sandervanhooft
sandervanhooft merged commit aaf0cf5 into main Nov 30, 2026
12 of 14 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.

1 participant