docs

When billing starts

A new subscription has two dates that are easy to confuse:

  1. The day the customer is charged. This is always checkout, the moment your backend calls POST /v1/subscriptions. No setting moves it.
  2. The day the first billing period starts. This is the month the first bill pays for, and it also fixes the customer's renewal day for the life of the subscription. A per-operator setting decides whether it starts at checkout or when the customer's SIM first comes into service.

So the setting does not choose between "charge at checkout" and "charge at activation". Both options charge the full first bill at checkout. What the setting chooses is when the month that bill paid for begins to run.

Terms used on this page

  • First bill: the invoice raised and charged when the subscription is created. It is returned on the create response as invoice, with the result in charge_status.
  • Billing period: the window a bill pays for, exposed on the subscription as current_period_start and current_period_end. A monthly plan's period runs to the same day of the next month (clamped in short months: a period starting on the 31st ends on the 28th or 29th in February).
  • Renewal day: the start of the first billing period. Every later bill is charged when a period ends, on that same day of the month. It is set once and never moves.
  • Activation: the SIM coming into service at the carrier, reported by the sim.activated webhook. It is not the moment you call the attach or activate endpoint. Carrier activation is asynchronous: an eSIM usually comes into service within seconds of the call, a port-in only when the number transfer completes, and a physical SIM when the customer inserts it and the carrier activates it.

The two options

At sign-up (default)When the SIM is activated
First bill chargedAt checkout, in fullAt checkout, in full
A declined cardWith sim: "deferred", fails checkout. With sim: "immediate", the subscription stays and the bill is retriedSame
First billing period startsAt checkoutWhen the SIM is first activated
Renewal dayThe checkout dateThe activation date
current_period_start before activationSet (the checkout time)null
What the invoice line saysThe plan nameThe plan name, followed by "(starts when your SIM is activated)"
Customer who takes a week to activateHas used a week of the month they paid forGets the whole month, starting the day service starts
Customer who never activatesThe paid month runs out unusedThe paid month waits, unopened
Second billDue one period after checkout, but only once the SIM has been activatedDue one period after activation

Under both options:

  • Nobody is charged a second time until a SIM has been activated. A subscription that is still pending_activation is never renewed.
  • Nothing is refunded or expired automatically. A customer who pays and never activates keeps the subscription in pending_activation. Refunding or cancelling it is your decision, made from the dashboard or the API.

At sign-up (the default)

  1. Your backend creates the subscription. The first bill is charged.
  2. The first billing period opens immediately: current_period_start is the checkout time and current_period_end is one period later.
  3. The subscription is pending_activation until a SIM comes into service, then active. The period does not move when that happens.
  4. The second bill is charged at current_period_end. If the SIM was activated after that date had already passed, the second bill is charged as soon as activation happens.

When the SIM is activated

  1. Your backend creates the subscription. The first bill is charged.
  2. No billing period opens: current_period_start and current_period_end are null, and the subscription is pending_activation.
  3. When the first SIM on the subscription comes into service, the first billing period opens at that moment, the subscription becomes active, and a subscription.updated event is sent carrying the new current_period_start and current_period_end (its previous_attributes show both periods as null and status as pending_activation).
  4. The second bill is charged one period after activation.

This option applies only when all of these hold. Otherwise the subscription behaves exactly as "At sign-up":

  • the subscription is billed by heliumOS itself (an account still billed directly by your payment provider always starts at sign-up);
  • the create request has no trial. A trial's end date is fixed at checkout, so its period starts at checkout too;
  • the create request does not send billing_start: "on_checkout". Sending it is a per-request override that always starts the period at checkout. Leaving billing_start out inherits the operator setting. (on_activation is reserved and currently rejected.)

See which option you're on, and change it

In the dashboard: Settings → Billing → First billing period starts. The selected option is the one in effect; "At sign-up" is marked as the default. An operator that has never saved this setting is on the default.

  • Every role can see it. Only owner and admin can change it.
  • It is one setting per operator, not per environment. Your sandbox and live environments belong to the same operator, so saving a change moves both at once. There is no way to try the option in sandbox first. To keep an environment on the old behaviour while you test, send billing_start: "on_checkout" on every POST /v1/subscriptions you make there (see above). That only works if every create path sends it, including re-subscribe and leaving-a-group flows, so check them all.
  • A change applies to subscriptions created after you save. Subscriptions that already exist keep the period they have, including ones still waiting for activation.
  • Each change is recorded, with who made it and the old and new value.

From the API, you can tell which option a new subscription got by reading it before activation: current_period_start is null only under "When the SIM is activated".

What your integration does, in order

The calls are the same under both options. What differs is which webhook tells you the renewal day.

  1. POST /v1/subscribers (once per person).
  2. Make sure the subscriber has a payment method on file, by calling POST /v1/subscribers/{id}/payment_methods before step 3. The first charge runs off-session and only sees cards heliumOS already has on record. A card saved directly with your payment provider whose webhook has not yet arrived reads as no card, and the charge is refused (see step 4 for what a refusal does).
  3. POST /v1/subscriptions with subscriber_id and plan_id, and an Idempotency-Key. Choose how the SIM is provisioned:
    • sim: "immediate" (the default) provisions a SIM with the subscription and starts carrier activation in the same request;
    • sim: "deferred" provisions none, and you attach one in step 5.
  4. Read charge_status on the response:
    • paid: the first bill is settled. Continue.
    • processing: the outcome isn't known yet; invoice is the open bill. Continue, and watch the invoice webhooks.
    • failed: the card was refused. What happens next depends on sim:
      • With sim: "deferred" and invoice.status of void, the sign-up was withdrawn: nothing was charged and the subscription is cancelled. Ask for another card and create again.
      • With sim: "immediate" (the default), the subscription stays and the invoice stays open on the automatic retry schedule. Do not create a second subscription: you would end up with two, the first still live with an open bill. Collect a new card on the existing subscriber and let the retry schedule settle the bill.
    • none: billing isn't configured for this environment.
  5. With sim: "deferred", attach the SIM: POST /v1/subscriptions/{id}/sims. For an eSIM, omit iccid and one is claimed for you; for a card the customer holds, pass its iccid. For a port-in, submit the port request instead (see Port-in / port-out).
  6. Handle sim.activated. Service has started and the subscription is now active.
  7. Learn the renewal day:
    • At sign-up: from the create response (step 3) or subscription.created. It does not change at step 6.
    • When the SIM is activated: from the subscription.updated event sent at step 6. Until then there is no renewal day. Don't show the customer a renewal date, and don't schedule anything (data resets, reminders) off one, before that event arrives.

The subscription.updated event sent when the period opens carries current_period_start and current_period_end, and its previous_attributes are { "status": "pending_activation", "current_period_start": null, "current_period_end": null }. The event has no billing_cycle_anchor, billing_anchor or next_renewal_at field: the first period's start is the anchor, and current_period_end is the next renewal. If you want those names, GET /v1/subscriptions/{id} returns billing_anchor and next_renewal_at once the period is open. Under "At sign-up" no event is sent at activation, because the period was already set at create.

Edge cases

SituationAt sign-upWhen the SIM is activated
Activation a few seconds after checkoutPeriod starts at checkoutPeriod starts seconds later. In practice the same as "At sign-up"
Activation hours or days late (port-in, physical SIM, eSIM installed later)The period has been running since checkout; the customer loses those daysThe period starts when service does
Activation after a whole period has passedThe second bill is charged as soon as the SIM activatesThe period starts at activation, as normal
Never activatedSubscription stays pending_activation, never renews, nothing refundedSame, with the period never opened
Port-inThe period has been running since checkout; the customer loses the days the port takesThe period starts when the port completes, not when you submit it. A port that stalls leaves the subscription waiting and nothing renews; a cancelled port leaves it waiting too. A port-in onto a SIM that is already in service moves nothing: the period opened at that SIM's first activation
Activation fails, a later attempt succeedsPeriod unchangedThe failed attempt starts nothing. The period starts at the activation that succeeds, whenever that is
Activation reported twice, or the SIM is reactivated laterIgnored: the period and renewal day are set onceIgnored after the first activation
A returning customer: a new subscription, with their existing SIM attachedPeriod starts at checkoutPOST /v1/subscriptions/{id}/sims with their iccid brings a SIM the carrier still has live back into service at once, and that opens the new subscription's period at that moment, with no separate activate call. Reactivating the SIM in place on the old, ended subscription is refused with 409 (sim_subscription_superseded or sim_subscription_ended) and would leave the new subscription waiting
Checkout abandoned before POST /v1/subscriptionsNothing is created or chargedSame
Card declined at checkout, sim: "deferred"charge_status: failed, bill voided, subscription cancelledSame
Card declined at checkout, sim: "immediate"charge_status: failed, subscription stays, bill stays open and is retried. Don't create againSame
Refund of the first billOnly when you issue oneSame
A group member joins (POST /v1/subscriptions/{id}/lines, also used for kids lines)Charged when they join, prorated to the owner's renewal date (during a free trial, the seat is billed when the trial ends instead). The member's own SIM activation changes nothingSame, unless the owner's own first period has not opened yet. Then the member is charged the full seat price, since the whole period is still ahead; the line reads "(starts when your SIM is activated)"
A recurring add-on before activationAttached and billed as normalRefused with 409 and code billing_period_not_started; retry once the SIM is activated. One-time add-ons are unaffected

Customers who pay and never activate

A physical SIM that is never activated leaves the subscription in pending_activation, with no renewal charge, under both options. The first bill is not refunded for you. In the dashboard, Subscriptions shows an "Activating" count with how many have been waiting more than 3 days, and the Status filter set to Pending activation lists them, paid or not. Reporting → Subscribers shows "Paid, not yet active": sign-ups that paid and never reached an active SIM.

Starting a period by hand

You can't. There is no endpoint or dashboard action that opens a billing period on demand, and on_activation is not accepted as a per-request value. The period opens when a SIM on the subscription comes into service through heliumOS: an activation, a port completing, or a live SIM being reactivated, restored or moved onto it. A line brought up outside heliumOS, for example directly with the carrier, leaves the subscription waiting. The only per-subscription control is billing_start: "on_checkout" at create.

Worked example

A customer pays for a monthly plan on March 3 at 10:00, and their SIM comes into service on March 10 at 18:00 (a port-in that took a week).

At sign-up

  1. March 3, 10:00: first bill charged. Period March 3 to April 3.
  2. March 10, 18:00: sim.activated. Subscription active. Period unchanged.
  3. April 3: second bill charged. Renewal day is the 3rd from now on.

The customer paid for a month and had service for 24 days of it.

When the SIM is activated

  1. March 3, 10:00: first bill charged. Period null. The invoice line reads "Unlimited (starts when your SIM is activated)".
  2. March 10, 18:00: sim.activated, then subscription.updated with period March 10 to April 10. Subscription active.
  3. April 10: second bill charged. Renewal day is the 10th from now on.

The customer paid for a month and had service for all of it.

If the SIM had come into service at 10:00:25 on March 3 instead, both options would produce the same period, give or take those 25 seconds.

Which should I pick

Keep "At sign-up" when nearly every customer is in service within a minute or two of paying, which is the case for an app that claims an eSIM right after checkout and has no port-ins or shipped cards. It is the simpler model: the renewal day is known the moment the customer pays, so you can show it on the receipt.

Choose "When the SIM is activated" when a meaningful share of customers wait for service after paying: port-ins, physical SIMs that ship, or an app flow where the customer installs the eSIM later. Those customers get the full month they paid for, and you avoid "I paid but my month started before I had service" support contacts. The cost is that your integration has to:

  • wait for subscription.updated before showing or using a renewal date;
  • not sell recurring add-ons before activation (or handle billing_period_not_started);
  • expect a group member who joins before activation to pay the full seat price.

Either way, decide what you do about customers who pay and never activate. heliumOS doesn't refund or cancel them for you.

Mapping an existing app flow onto this

A common app flow is: take payment, create the subscription with sim: "deferred", then immediately attach an eSIM claimed from inventory. In that flow the attach call typically lands shortly after checkout and the eSIM usually comes into service within a few seconds of it. For those customers the two options are indistinguishable, so switching to "When the SIM is activated" changes nothing for them.

It does change things for every customer whose SIM comes into service later than that, and in most apps that is not nobody:

  • Port-ins activate when the number transfer completes, often hours later.
  • Physical SIMs activate when the customer receives and inserts the card.
  • eSIMs the customer installs later, or an attach that fails and is retried, activate whenever that eventually happens.

Before switching, measure how long your own customers take from checkout to sim.activated. If your app later moves the attach step out of checkout (for example, to let customers install the eSIM at a time of their choosing), the gap grows for everyone, and "When the SIM is activated" is the option that keeps their first month whole.