Skip to Content
Subscriptions

Trials

Sell a plan with nothing due today. Checkout stores a reusable payment method and Altruon collects the first invoice when the trial ends.

A trial lets a shopper subscribe with nothing due today. Checkout collects a reusable payment method without charging it, and Altruon bills it automatically when the trial ends. Trials work with all four billing platforms: Stripe Billing, Chargebee, Recurly and Frisbii.

A trial, from signup to first charge
Billing platformAltruonAcquirer01 Estimate the cart02 trialEnd, amountDueNow03 Zero-amount setup04 Reusable payment method05 Create subscription in trial06 Trial ends: invoice due07 Charge the stored method08 Record the payment
A payment method is always required at signup, so the first charge runs without any action from the customer.

How a trial works

  1. Estimate. Your billing platform returns the trial data for the cart: trialEnd and amountDueNow. Altruon uses it to show that nothing is due today and to schedule mandates.

  2. Acquirer setup. The acquirer runs a zero-amount flow instead of a charge. The flow depends on the payment method:

    Collection modeWhat happens at signup
    SETUPThe card is tokenized.
    CONSENTThe shopper gives a Pix or UPI consent.
    MANDATEThe shopper sets up an open banking mandate.
  3. Subscription created. Altruon creates the subscription in trial status, with trial_start, trial_end, and nextBillingDate set to trial_end.

  4. Trial end. The billing platform moves the subscription to active and generates a payment-due invoice. Altruon collects it as a merchant-initiated transaction (MIT) with the credentials stored at signup.

A payment method is always required at trial signup. That is what lets the first charge run without the customer.

Before you start

  • A billing platform is connectedStripe Billing, Chargebee, Recurly or Frisbii. See Billing platforms.
  • A plan to sellEither a plan with a trial configured in your billing catalog, or any paid recurring plan if you set the trial length at checkout.
  • A routing entry that supports trialsThe acquirer and payment method must be one of the supported pairs.

Where the trial length comes from

By default, the trial length comes from your billing catalog, for example trial_period_days on a Stripe Price or the trial on a Chargebee item. This works on every checkout: hosted pages, dynamic hosted checkout and Altruon.js.

To decide the trial length for each checkout instead, override it when you create the session.

Override trial length per checkout

Set billingData.forceTrialPeriodDays on Create Session to set the trial length at checkout time instead of on the plan in your billing catalog.

FieldbillingData.forceTrialPeriodDays (integer, days)
Range1 to 730
EffectStarts a subscription trial of that many days with nothing due for the subscription. Overrides any trial configured on the plan.
Due todayThe subscription portion is zero. One-time lineItems with type: "charge" are still charged today if present.
Billing platformsStripe Billing, Chargebee, Recurly, Frisbii
Not supportedHosted pages (hostedPageConfigId, /checkout/p/)

Add the field to the session request

Put the field inside billingData, not at the root of the request body. Use the ID of a paid recurring plan or price: the plan does not need a trial in your catalog.

{
  "hostedCheckout": true,
  "paymentData": { "currency": "USD" },
  "billingData": {
    "billingPlatformId": "3287b8c7-ce43-41fd-9d58-f510e610b8f3",
    "forceTrialPeriodDays": 30,
    "lineItems": [
      { "type": "plan", "id": "price_1SMtJj4hYau76GhIakR22BKu", "quantity": 1 }
    ]
  },
  "customerData": { "email": "shopper@example.com" },
  "redirectUrl": "https://your-site.com/success"
}

A top-level forceTrialPeriodDays is ignored

The field must be a property of billingData. If you send it next to paymentData, customerData or hostedCheckout, Altruon ignores it.

Check the trial in the response

The Create Session response includes a trial object that reflects the override:

{
  "trial": {
    "inTrial": true,
    "trialStart": "2026-06-25T12:00:00Z",
    "trialEnd": "2026-07-25T12:00:00Z",
    "amountDueNow": "0",
    "nextInvoiceDate": "2026-07-25T12:00:00Z"
  }
}

The trial object is output only. Do not send forceTrialPeriodDays inside it. With a one-time charge line item, amountDueNow is the total of the charges, and the subscription portion stays at zero.

Send the shopper to checkout

Redirect the shopper to checkout_url, or pass the session to Altruon.js. Checkout runs the zero-amount flow and the subscription starts in trial.

How the override combines with the catalog

ScenarioTrial length
The plan has a 7-day trial in the catalog, and you send billingData.forceTrialPeriodDays: 3030 days
The plan has no trial, and you send billingData.forceTrialPeriodDays: 3030 days
You do not send billingData.forceTrialPeriodDaysThe catalog trial only

Validation

RuleResult
forceTrialPeriodDays is outside 1 to 730400
forceTrialPeriodDays is combined with hostedPageConfigId (a hosted page)400
Nothing is due today and the acquirer and payment method pair does not support trialsAn unsupported error when the session is created

Supported acquirers and payment methods

A trial with nothing due today works with these pairs:

AcquirerPayment methodsCollection mode
PagBrasilcard, pixSETUP for card, CONSENT for Pix
AdyencardSETUP
NuveicardSETUP
Checkout.comcard, applepay, kakaopaySETUP
dLocalcard, pix, upiSETUP for card, CONSENT for Pix and UPI
TrustlyopenbankingMANDATE

Any other combination returns an unsupported error at session creation when the plan is in trial with nothing due today.

What the shopper sees

  • The order summary shows "Free until" with the trial end date, or an equivalent, when amountDueNow is zero.
  • Hosted checkout hides the payment methods that are not in the table above.
  • A PagBrasil Pix trial uses a consent-only flow. There is no charge today, and the first debit is scheduled from trialEnd (PagBrasil's pix_rec_first_recurrence).

The trial object

Session and estimate responses include a trial object when the cart is in trial, whether the trial comes from the catalog or from billingData.forceTrialPeriodDays.

FieldDescription
inTrialWhether the cart is in a trial period
trialStartISO 8601 instant when the trial starts
trialEndISO 8601 instant when the trial ends
amountDueNowAmount charged at signup, typically 0 for a pure trial
nextInvoiceDateDate of the first invoice after the trial

Pending payment responses from the acquirer may include paymentCollectionMode (SETUP, CONSENT, MANDATE or CHARGE) as a hint for your frontend.

Trial with an amount due today

If the estimate returns an amountDueNow greater than zero, for example a trial with a setup fee, a one-time charge or a discounted first period, Altruon runs a normal CHARGE flow for today's amount. The payment method is still stored for the renewal.

When the trial ends

At trialEnd, the billing platform activates the subscription and issues a payment-due invoice. Altruon collects it with the payment method stored at signup.

If the collection fails, your retry rules apply. Altruon cancels the subscription only if you configured that as the end of the retries, never preemptively at trial end. See Retries and dunning.

Test it

  1. Use sandbox plans with a trial period configured on your billing platform, or send billingData.forceTrialPeriodDays.
  2. Check that the estimate returns trialEnd before the payment: the session response carries the trial object.
  3. Complete the checkout, then confirm that the subscription is in trial status in Altruon.
  4. Confirm that the subscription becomes active once the trial end webhooks from your billing platform arrive.
  5. Run a checkout without a trial and one with an amount due today, and confirm that both still charge as before.

See Testing for sandbox test cards.

Limits

  • Hosted pages. billingData.forceTrialPeriodDays is not supported on hosted pages. A trial configured on the plan still works there.
  • Days only. The override is an integer number of days from 1 to 730. Convert months to days on your server.
  • Plan level only. The override applies to the plan. You cannot force a trial per add-on.
  • Stripe trial offers. Stripe Product trial offers (IDs that start with to_) are not supported. Use a paid recurring price ID.
  • Unsupported pairs. Acquirer and payment method pairs outside the supported list are rejected at session creation when nothing is due today.

Next steps