This endpoint also accepts a customer session token — see Customer Session Endpoints. When called with a customer token, the buyer identity is taken from the token and overrides any
buyerIdentity field in the request body.Eligibility Rule
Eligibility is based on whether the buyer already has a trial record on this product (or any product in the same product group):- No prior trial record →
isEligible: true,trialDaysreflects the product’s configured trial length - Trial record exists →
isEligible: false,trialDaysisnull
buyerIdentity is treated as a brand-new buyer and always returns isEligible: true.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
checkoutSessionId | string | Yes | Checkout session ID returned by Create Checkout Session (must be a subscription product) |
buyerIdentity | string | Conditional | Buyer email. Required in customer mode (taken from the token); optional in visitor mode — omitting it returns the full trial without record lookup |
Example Request
Success Response (200) — Eligible
Success Response (200) — Not Eligible
Response Fields
| Field | Type | Description |
|---|---|---|
isEligible | boolean | Whether the buyer is eligible for a trial (no prior trial record = true) |
trialDays | number | null | Trial day count when eligible; null when not eligible |
Errors
Retry policy: Never retry 4xx — fix the request and resubmit. Retry 5xx with exponential backoff (start 5s, max 3 attempts).
| Status | errors[0].message | What it means | Recommended handling |
|---|---|---|---|
| 400 | Invalid JSON body | Request body is not valid JSON | Fix the body, resubmit |
| 400 | Missing required field: checkoutSessionId | checkoutSessionId was not provided | Fix the body, resubmit |
| 400 | Session product type mismatch: expected subscription | The session was created for a one-time product | Create a subscription checkout session and retry |
| 401 | Unauthorized | Invalid Store Slug or session token | Verify auth headers |
| 404 | Session not found | Checkout session does not exist or has expired | Create a new checkout session and retry |
| 404 | Session does not belong to this store | The session was created for a different store | Use a session belonging to the calling store |
| 500 | Internal server error | Unexpected server-side failure | Retry with exponential backoff (start 5s, max 3 attempts) |