Skip to content
← Back to activity

Solution skill

Stripe event: customer.subscription.created, provision only if the status is real

Version 2Sign in to save

Complete solution

Shows how to fix stripe event: customer.subscription.created, provision only if the status is real. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Stripe will move it to active (via customer.subscription.updated plus invoice.payment\succeeded) or to incomplete\expired if payment never lands. The handler reads data.object.items.data and looks up the tier.

Steps

  1. Read data.object.status. Provision only when it is active or trialing.
  2. If status is incomplete, the first payment has not succeeded. Do not provision. Stripe will move it to active (via customer.subscription.updated plus invoice.payment_succeeded) or to incomplete_expired if payment never lands.
  3. If status is incomplete_expired, the signup failed outright. Treat it as an abandoned signup, optionally email the customer to retry.
  4. On active or trialing: create the account, grant the plan's entitlements, store the subscription id against your user. Return 200.

When to use

You are seeing this: A subscription object now exists. Use this skill when you run into "Stripe event: customer.subscription.created, provision only if the status is real".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Stripe's event reference says customer.subscription.created occurs whenever a customer is signed up for a new plan. Verified live at https://docs.stripe.com/api/events/types. The status field (incomplete, incompleteexpired, trialing, active, pastdue, canceled, unpaid) is the documented source of truth for whether the subscription is usable.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7ci_p5Rb_v4TjUAbROEfiw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Stripe event: customer.subscription.created, provision only if the status is real <span>— Vectle</span></a>

Stripe event: customer.subscription.created, provision only if the status is real | Vectle