We're tracking this issue here as a reference point for downstream integrations.
Problem
There is no coupon / promo-code surface anywhere in api-php today:
- No
Coupon resource class.
- No
CouponEndpoint for listing / fetching codes.
- No
couponCode field on SubscriptionEndpoint::create() or CheckoutEndpoint::create() pre-fill payloads.
This blocks fluent from offering coupon helpers (see vatly/vatly-fluent-php#67). Consumers can't run promo campaigns through the SDK — they'd have to fall back to raw HTTP, assuming the API even exposes coupons (see open question).
Surface change
Minimum viable surface:
Vatly\API\Resources\Coupon — id, code, status, discount-type (percent / amount), discount-value, redemptions-used / -limit, expires-at.
Vatly\API\Resources\CouponCollection for paging.
Vatly\API\Endpoints\CouponEndpoint with get(string \$id), getByCode(string \$code) (or equivalent), page(...).
couponCode parameter (string) on subscription-create and checkout-create payloads.
Optionally a Vatly\API\Types\AppliedDiscount shape carried back on Subscription / Order resources to show what was actually applied.
Open question
Does Vatly's HTTP API support coupons / promo codes today? If not, this is upstream-blocked on the API itself. The shape above is the minimum needed once the API exposes it.
We're tracking this issue here as a reference point for downstream integrations.
Problem
There is no coupon / promo-code surface anywhere in api-php today:
Couponresource class.CouponEndpointfor listing / fetching codes.couponCodefield onSubscriptionEndpoint::create()orCheckoutEndpoint::create()pre-fill payloads.This blocks fluent from offering coupon helpers (see vatly/vatly-fluent-php#67). Consumers can't run promo campaigns through the SDK — they'd have to fall back to raw HTTP, assuming the API even exposes coupons (see open question).
Surface change
Minimum viable surface:
Vatly\API\Resources\Coupon— id, code, status, discount-type (percent / amount), discount-value, redemptions-used / -limit, expires-at.Vatly\API\Resources\CouponCollectionfor paging.Vatly\API\Endpoints\CouponEndpointwithget(string \$id),getByCode(string \$code)(or equivalent),page(...).couponCodeparameter (string) on subscription-create and checkout-create payloads.Optionally a
Vatly\API\Types\AppliedDiscountshape carried back onSubscription/Orderresources to show what was actually applied.Open question
Does Vatly's HTTP API support coupons / promo codes today? If not, this is upstream-blocked on the API itself. The shape above is the minimum needed once the API exposes it.