Payments
Understand how payment events intersect with try-on processing and subscription management. Design your integration to handle authorization, plan changes, and billing states.
Subscription and billing model
Closku operates on a subscription-based SaaS model where each merchant has a plan with a defined try-on limit and billing cycle. The plan limit is a hard monthly cap on try-ons: the API returns 429 when exceeded. Billing cycles are monthly or yearly, with the try-on limit resetting at the start of each cycle. Mid-cycle plan upgrades take effect immediately and increase the try-on cap, while downgrades take effect at the next billing cycle.
Payment event integration
Treat payment events as part of the broader workflow rather than isolated records. On successful payment the try-on service remains active for the billing period. On payment failure the system may suspend try-on processing after a grace period. On plan upgrade the try-on limit increases immediately with no interruption to service. Webhook events are available for subscription state changes, so subscribe to these to automate your response to billing events.
Integration cautions
Do not assume every payment transition is final the moment you receive it. Reconciliation logic should tolerate retries, timing gaps, and delayed downstream confirmation. Webhook events may arrive out of order, so use event timestamps rather than arrival order. Handle idempotency keys to prevent duplicate processing, and when uncertainty exists, prefer holding state with clear visibility over prematurely marking workflows complete.
Next steps
Try-on lifecycle and state management.
Error handling and retry design.
Related pages
Event-driven integration and webhook delivery.
Available API endpoints.