Skip to content

Readiness and failures

The most important integration rule is that false, an empty list, and an error do not mean the same thing.

Result Meaning
200 true or a non-empty list Strent has read the customer, and the answer is yes.
200 false or an empty list Strent has read the customer, and the answer is no.
409 CUSTOMER_STATE_NOT_READY Strent has not read this customer from Stripe yet, so it cannot answer.
Timeout, network, 429, or 5xx The request failed operationally. No billing fact was returned.

Why “no” and “not read yet” differ

Section titled “Why “no” and “not read yet” differ”

A Stripe customer may have no subscription that gives access. Once Strent has read that customer from Stripe, it saves that the customer has nothing active.

Checks then return 200 false or 200 []. That is a real “no”, not missing data.

Before that first successful read, the same check returns 409 CUSTOMER_STATE_NOT_READY. A customer you just created in Stripe stays in this state for a few seconds, until Strent processes Stripe’s customer.created webhook. If your app may check access in those seconds, call customers.refresh right after creating the customer. The guide creates the customer on the way to Checkout, so it refreshes when the user comes back from paying instead.

To fix a customer that stays not ready, search its ID in Customers in Strent Admin. If Strent hasn’t read it yet, use Refresh cus_… from Stripe there: Strent first checks that the customer exists in the project’s Stripe account and mode, then reads it. See Customer state is not ready.

The billing state shows whether Strent has read the customer

Section titled “The billing state shows whether Strent has read the customer”

customers.retrieveBillingState is the read for diagnosing a customer. It always returns 200:

  • last_refreshed_at: null means Strent has not read the customer from Stripe yet.
  • A non-null last_refreshed_at with no subscriptions means Strent has read the customer and it has no retained subscriptions.
  • Retained subscriptions can be unpaid, paused, or incomplete with grants_access: false, so having subscriptions alone never means the customer has access.

This lets billing pages and support tools explain a customer’s state without turning “not read yet” into “no”.