Widget API Reference
Check Credits
Check whether the store has try-on credits available before opening the widget.
GET
Check whether your shop has credits available to create generations. Cached for 2 minutes on both client and server.
Return the shop’s current billing plan name. Shop is identified via app proxy authentication. Cached for 1 hour on the server.
Request
No parameters. Shop is identified via app proxy authentication.Response
boolean
required
true if credits are available, false if quota is exhausted.string
required
The Genlook store ID for the shop.
This endpoint fails closed. If the check errors, or if no billing plan can be resolved for the shop, it returns
allowed: false. Treat allowed: false as “do not offer a try-on”. The Create Generation endpoint performs the definitive quota check and will return QUOTA_EXCEEDED if needed.Current plan
string
required
The plan name for the shop. Defaults to
free when no paid plan is resolved.
