Skip to content

Align SDK with OpenAPI spec#3

Merged
sandervanhooft merged 2 commits intomainfrom
align-with-openapi-spec
Feb 25, 2026
Merged

Align SDK with OpenAPI spec#3
sandervanhooft merged 2 commits intomainfrom
align-with-openapi-spec

Conversation

@sandervanhooft
Copy link
Member

Brings the PHP SDK resources, status enums, and docs in line with the OpenAPI spec (source of truth).

Status enums:

  • RefundStatus: refunded/queued/processing replaced with pending/completed/failed/canceled
  • OrderStatus: trimmed to pending/paid/failed (removed created/canceled/completed/expired)
  • CheckoutStatus: removed completed/pending, added failed
  • New ProductStatus: approved/draft/archived (used by SubscriptionPlan + OneOffProduct)

Resources:

  • SubscriptionPlan: added testmode, status, createdAt + helper methods
  • OneOffProduct: added testmode, status, createdAt + helper methods
  • Refund: added status, customerId + helper methods (isPending, isCompleted, isFailed, isCanceled)
  • Order: removed cancelled bool, removed helpers for non-spec statuses
  • Subscription: trialEndAt renamed to trialUntil, removed trialDays
  • Checkout: removed isCompleted/isPending, added isFailed

Docs: all SDK docs updated to match. All 56 tests pass.

- RefundStatus: refunded/queued/processing -> pending/completed/failed/canceled
- OrderStatus: remove created/canceled/completed/expired (spec only has pending/paid/failed)
- CheckoutStatus: remove completed/pending, add failed
- Add ProductStatus type (approved/draft/archived)
- SubscriptionPlan: add testmode, status, createdAt properties + helper methods
- OneOffProduct: add testmode, status, createdAt properties + helper methods
- Refund: add status property + isPending/isCompleted/isFailed/isCanceled helpers
- Refund: add customerId property per spec
- Order: remove cancelled bool property, remove isCreated/isCanceled/isCompleted/isExpired helpers
- Subscription: rename trialEndAt -> trialUntil, remove trialDays
- Chargeback docs: align properties with spec (amount as Money object, no status field)
- Webhooks docs: refund.succeeded -> refund.completed
- Update all docs to match
- Fix tests
- Update CI matrix: 8.0, 8.1, 8.2, 8.3, 8.4
- Update composer.json: require ^8.0 (drop 7.4)
@sandervanhooft sandervanhooft force-pushed the align-with-openapi-spec branch from 2d1025d to 7a229c2 Compare February 25, 2026 20:20
@sandervanhooft sandervanhooft merged commit 2d54a22 into main Feb 25, 2026
12 checks passed
@sandervanhooft sandervanhooft deleted the align-with-openapi-spec branch February 25, 2026 20:26
sandervanhooft added a commit that referenced this pull request Feb 26, 2026
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