MerchantsSell

Subscriptions

Sell a recurring price, follow renewals and past-due subscriptions, and cancel a subscription from the dashboard, knowing what a cancel does not do.

6 min read

A subscription charges a payer's wallet every 30 days or every 365 days, at the price they subscribed to. Subscriptions lists them, under a count of those "active or past due" and "How renewals work", and each subscription's page shows its status and its periods, with a Cancel subscription button. A recurring price is sold by a checkout session your server creates, by a payment link or by your shop; no page of the dashboard starts a subscription for a payer. A subscription paid by card is described in Card subscriptions.

When Fianto retries a renewal
When Fianto retries a renewal and what counted failures doperiod endsattempt 1+2 minutesattempt 2+1 hourattempt 3+6 hoursattempt 4+24 hours0times from the period end, not to scale1st counted failurePAST_DUEretries continue4th counted failureENDEDPAYMENT_FAILEDany successful charge→ ACTIVEcounted failuresINSUFFICIENT_FUNDSDELEGATION_REVOKEDACCOUNT_FROZENACCOUNT_CLOSEDany other failurenot countedretried every 5 minutesmissed periods are never billed

Scroll sideways to see the whole diagram →

Show as text
  1. Fianto's charging key tries each renewal 2 minutes after the period ends, then 1 hour after, 6 hours after and 24 hours after, measured from the period end when nothing delays them. After a delay not caused by the payer, each retry keeps its gap from the last failure.
  2. Counted failures are `INSUFFICIENT_FUNDS`, `DELEGATION_REVOKED`, `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`. Each one sends `subscription.payment_failed`.
  3. The first counted failure moves the subscription to `PAST_DUE` and sends `subscription.past_due` once.
  4. Any other failure is not counted: Fianto retries it every 5 minutes.
  5. A successful charge moves the subscription back to `ACTIVE`.
  6. The 4th counted failure ends it: `ENDED` with reason `PAYMENT_FAILED`.
  7. No back-billing: missed periods are never billed.
The Subscriptions list.

Before you start

Steps

Sell the recurring price

Your server creates a checkout session with mode: subscription and the recurring price's fian_price_… id, and sends the payer to it; the developer guide is Subscriptions. Without a server, make a payment link for the price, or sell it as a product of your shop: each opens the same kind of subscription checkout.

The first such session for a price also creates its plan on Solana. The price's Plan on chain column on the product page says "Creating" and then "Active"; payers can pay once it is active. Fianto signs and pays for the plan.

Follow the subscription

When the payer's subscribe transaction finalizes, the subscription appears with the status "Active". The first period is paid inside that transaction; the Periods table lists the 24 most recent periods, each with its dates, status, tries and next try. On the Subscriptions list, the chips "All", "Active", "Past due", "Ending" (a cancel is booked for the period end) and "Ended" filter by status.

The subscription's page shows, under Subscription, the price, "Fianto fee, paid by the customer", "Network fee, paid by the customer" when there is one, and Customer approves up to, the total each period can take; under On chain, the customer's wallet, the subscription account, the plan and its status.

Fianto charges each renewal itself: the payer does not sign again, and Fianto pays the Solana network fee for renewals, as it does for every transaction the payer signs.

An ended subscription's page: why it ended, the price, the Fianto fee, what the customer approves, IDs, and its on-chain accounts.

Watch for past-due subscriptions

A renewal can fail for a reason the payer can fix: not enough USDC, the approval removed, or the USDC account frozen or closed. Those failures are counted. The first one makes the subscription "Past due", and it appears under Needs attention. A later successful charge makes it "Active" again. The 4th counted failure ends it, with the reason "Four charges failed". Other failures never count and are retried automatically, usually after 5 minutes, but up to an hour apart for a repeated unexpected error or a receiving USDC account that is missing or frozen. The exception is a renewal refused because the payer already cancelled on Solana: Fianto records that as the payer's cancel instead. Missed periods are never billed later. A card renewal has its own failures and retry times: see Card subscriptions.

Cancel a subscription, if you need to

Open the subscription and click Cancel subscription. The dialog, "Cancel" with the subscription's number (such as "Cancel SUB-12?"), says who pays what for which product, and offers:

  • At the end of this period (preselected): the subscription keeps access until the period ends, and no further periods are charged. An active subscription is then tagged "Ends on" and the day, the page says "Cancellation scheduled by you" and the end date, and Fianto sends subscription.cancel_scheduled. A past-due subscription keeps its status, and Fianto will not retry the failed charge. The dialog then says "Scheduled." and when the subscription ends.
  • Now: "Ends today. The current period is not refunded; any refund is a transfer from your wallet. A renewal charge already on its way to Solana can still land." The dialog then says "Cancelled. The subscription has ended." and Fianto sends subscription.ended.

Confirm with Cancel subscription, or close the dialog with Keep subscription. "A cancellation cannot be undone. The customer would subscribe again from a new checkout." After the answer, Done closes the dialog. When your own cancel at the period end is already scheduled, the button reads Cancel now and offers only Now.

Cancelling needs no password or code. Your server can do the same with POST /v1/subscriptions/{id}/cancel; the rules below are the same either way.

A cancel changes nothing on Solana and cannot be undone

Cancelling only stops Fianto from starting new charges. Nothing is signed on Solana, so the payer's subscription there stays live. A cancel cannot be reversed. With Cancel now, a renewal charge already on its way to Solana can still land: the period then shows as paid.

Refunds are yours to send

A cancel refunds nothing. To refund a crypto payer, send the USDC back from your own wallet. Each crypto charge is the price plus, when they are above zero, the service fee and the plan's network fee, which the payer pays on top.

What ending a plan does to its subscribers

Ending a recurring price in Products ends its plan, and that cancels every active subscriber on it at the end of the period they have paid for. Fianto sends one subscription.cancel_scheduled webhook for each, with cancel_reason MERCHANT_CANCELED, and starts no renewal after the End. A payment already on its way to Solana can still complete. A checkout that was open when you ended the plan can no longer be paid. Fianto then ends the plan on Solana (usually within minutes): it sets it to Sunset with an end date and removes every charging key, and pays the Solana network fee for that. The payer has nothing to do: the portal shows "The shop cancelled this subscription.", offers no cancel, and Fianto sends the payer no email. Ending cannot be undone. See Products and prices.

What your cancel means for the payer

Because the payer's subscription stays live on Solana, the same wallet cannot subscribe to the same plan again until the payer uses Cancel on Solana in the Fianto payer portal and that period on Solana has ended; Fianto then closes the subscription's account itself. While your cancel at period end is pending, the portal still offers the payer Cancel on Solana, which ends the subscription's record on Solana as well.

When the payer cancels first, the subscription page says "Cancellation scheduled by the customer". The payer can still withdraw their cancel from a wallet app that supports it. To make sure it ends, cancel at the end of the period too: it then ends even if the payer withdraws theirs.

When your wallet or the fee changes

A subscription is set up on Solana to pay one wallet, with one fee. After your receiving wallet changes, or the fee changes, Fianto creates a new plan the next time your server creates a subscription session for the price. New subscribers get the new wallet and fee; existing subscribers keep paying the old wallet, with the old fee. Keep the old wallet safe until those subscriptions have ended.

Check it worked

A new subscription is listed as "Active". After a cancel At the end of this period, it is tagged "Ends on" and the day; it becomes "Ended" with the reason "Cancelled by you" after the period ends. After a cancel Now, it is "Ended" at once.

Troubleshooting

You seeWhyFix
"Another update to this subscription was in progress, so nothing was changed. Try again in a moment."Something else was changing the subscription at the same time.Try again in a moment.
"Too many changes in a short time. Wait a minute and try again."Too many requests in a short time.Wait a minute.
"Something went wrong, and we can't tell whether the cancellation went through."The dashboard did not get an answer.Refresh the page to see the subscription's current state before trying again.
A payer cannot subscribe again after your cancelTheir subscription is still live on Solana.Ask them to use Cancel on Solana in the payer portal. Once that period on Solana has ended, Fianto closes the old subscription and they can subscribe again.
The Plan on chain column says "Creating"Fianto is creating the plan on Solana after the first subscription session.Wait. Payers can pay once it is active.
The checkout page cannot start the subscription, and the Plan on chain column is back to "at first subscriber"Creating the plan on Solana failed after every retry.Have your server create a new subscription checkout session for the price: it starts a new attempt. If that fails too, write to support@fianto.xyz.
The checkout page cannot start the subscription, and the price shows "Ended"You ended the price (its plan) while the checkout was open.Sell an active recurring price instead.

See also

Was this page helpful? Tell us

fianto.xyz

On this page