# /entitlements/pending - Shop-facing "order placed, payment not confirmed" **POST /entitlements/pending** Mark an add-on activation as pending: the shop order exists but the payment (bank transfer/RiBa) has not been confirmed yet. Display-only — the UI shows the entitlement as `pending` instead of offering another purchase; enforcement is NOT affected (collect keeps answering 403 until the real activation). On a fresh purchase a non-active stub grant is created; on an existing grant (renewal, re-buy after revocation/expiry) only the pending marker is stamped. Idempotent. The marker is cleared by `POST /entitlements/activate` (order completed) or by `POST /entitlements/deactivate` with the same `source_ref` (order cancelled before payment). Same addressing and auth as activate (`manage:entitlements` permission). ## Servers - Backend API server (port 8080): https://api.your-domain.com/api (Backend API server (port 8080)) - Collect API server (port 8081): https://collect.your-domain.com/api (Collect API server (port 8081)) ## Authentication methods - Bearer auth ## Parameters ### Body: application/json (object) - **system_key** (string) Key of the system the add-on was bought for - **entitlement** (string) Canonical catalog id or legacy alias of the add-on - **scope** (string) Application instance the grant is narrowed to - **source_ref** (string) Reference of the order awaiting payment; the later activate/deactivate with the same ref resolves the marker - **buyer_email** (string) Email of the WordPress customer that owns the order (server-to-server, trusted). Stamped in `purchased_by` on fresh pending stubs only — a pending renewal never overwrites who bought the currently active grant. - **variant** (object) Shop variation (tier) of the purchased product line. Display metadata only: the add-on↔product mapping stays on the parent product and /auth enforcement ignores it. Refreshed by activate, so tier upgrades/downgrades follow the renewals. Omitted for manual grants and simple (non-variable) products. ## Responses ### 200 Entitlement activation marked pending #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object) One add-on grant for one system, optionally narrowed to a single application instance via `scope` (omitted = whole system). `active` is derived: not revoked and not expired (`valid_until` null = perpetual). Revocation is soft (sets `revoked_at`, the row is kept for audit). ### 400 Unknown entitlement, scope not supported by the catalog item, or system-type mismatch #### Body: application/json (object) - **code** (integer) HTTP error code - **message** (string) Error message - **data** (object) ### 401 Unauthorized - invalid or missing token #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 403 Forbidden - insufficient permissions #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) ### 404 System not found for this key #### Body: application/json (object) - **code** (integer) HTTP error code - **message** (string) Error message - **data** (object) ### 500 Internal server error #### Body: application/json (object) - **code** (integer) - **message** (string) - **data** (object | null) [Powered by Bump.sh](https://bump.sh)