A coffee club with a grinder, a software plan with an onboarding package, a membership with a starter kit: buyers expect to pay for the subscription and the extras together. Stripe supports that inside a subscription: the one-time items ride on the first invoice, and the subscription renews without them. Where it stops is the cart around the subscription: shipping options work in payment mode only, and one Checkout Session can't start subscriptions on two different schedules.
If you would rather let buyers subscribe to any product in the cart and buy the rest once, in one payment, that is how Flint orders work.
Where to start
| What you sell | Your path |
|---|---|
| One plan plus a few one-time items, sold together once | One-time prices in subscription mode |
| You build checkout with Elements or the Subscriptions API | add_invoice_items |
| The cart ships, or subscribed items renew on different schedules | Pay once, then start the subscriptions |
| You want any product in the cart to be subscribe or buy once | Mixed carts on Flint |
Stripe Checkout: one-time prices in subscription mode
A Checkout Session's line_items take one-time or recurring prices. Stripe's rule for the mode is short: pass subscription if the session includes at least one recurring item. Then list the one-time prices beside the recurring ones:
# line_items[0] is the monthly coffee, line_items[1] a one-time grinder
curl https://api.stripe.com/v1/checkout/sessions \
-u "sk_test_...:" \
-d mode=subscription \
-d "line_items[0][price]=price_..." \
-d "line_items[0][quantity]=1" \
-d "line_items[1][price]=price_..." \
-d "line_items[1][quantity]=1" \
--data-urlencode "success_url=https://example.com/thanks?session_id={CHECKOUT_SESSION_ID}"Subscription mode allows up to 20 line items with recurring prices and 20 with one-time prices, and in Stripe's words, "Line items with one-time Prices will be on the initial invoice only." The buyer sees one total and pays one charge; the first renewal bills only the recurring prices. Every price on the subscription shares one currency.
Fulfill the one-time items from checkout.session.completed, since they exist only on that first payment, and fulfill renewals from invoice.paid with billing_reason set to subscription_cycle. The subscription shipping reference covers that handler, including delayed payment methods such as ACH Direct Debit.
The Subscriptions API: add_invoice_items
With Elements or your own form, you create the subscription yourself. add_invoice_items takes up to 20 prices and quantities and appends them to the subscription's next invoice. At creation, the next invoice is the first one, so the one-time item is paid with the signup. On an existing subscription, it rides on the next renewal:
# At signup: the one-time price lands on the first invoice
curl https://api.stripe.com/v1/subscriptions \
-u "sk_test_...:" \
-d customer=cus_... \
-d "items[0][price]=price_..." \
-d "add_invoice_items[0][price]=price_..." \
-d "add_invoice_items[0][quantity]=1" \
-d payment_behavior=default_incomplete
# Later: add a one-time item to the subscription's next renewal
curl https://api.stripe.com/v1/subscriptions/sub_... \
-u "sk_test_...:" \
-d "add_invoice_items[0][price]=price_..." \
-d "add_invoice_items[0][quantity]=1"With payment_behavior set to default_incomplete, Stripe creates the subscription incomplete without attempting payment, and your page confirms the first invoice's PaymentIntent with the buyer present.
Carts that ship or renew on different schedules
Both patterns above put everything on one subscription's invoice, and two Stripe limits follow from that. Stripe's shipping guide states the first: "Only Checkout Sessions in payment mode support shipping options." Its mixed interval guide states the second: "You currently can't create mixed interval subscriptions on Checkout Sessions." Through the API, a mixed interval subscription needs flexible billing mode and intervals that are multiples of the shortest, so a weekly item and a monthly item can't share one.
A cart with a grinder that ships, beans every two weeks, and filters every month falls outside both. The pattern that covers it sells the cart in payment mode, saves the card, and starts one subscription per cadence when the payment succeeds:
// 1. Sell the one-time cart in payment mode, which supports shipping options,
// and save the card for the subscriptions that follow.
const session = await stripe.checkout.sessions.create({
mode: "payment",
customer_creation: "always",
line_items: [{ price: grinderPriceId, quantity: 1 }],
shipping_address_collection: { allowed_countries: ["US"] },
shipping_options: [{ shipping_rate: groundRateId }, { shipping_rate: expressRateId }],
payment_intent_data: { setup_future_usage: "off_session" },
metadata: { cart_id: cart.id }, // your record of which items subscribe, and how often
success_url: "https://example.com/thanks?session_id={CHECKOUT_SESSION_ID}",
});// 2. On checkout.session.completed, start one subscription per cadence.
const session = event.data.object;
if (session.mode !== "payment" || session.payment_status !== "paid") return;
const paymentIntent = await stripe.paymentIntents.retrieve(session.payment_intent);
const cart = await carts.get(session.metadata.cart_id);
for (const group of cart.subscribedItemsByCadence()) {
await stripe.subscriptions.create(
{
customer: session.customer,
default_payment_method: paymentIntent.payment_method,
off_session: true,
items: group.items.map((item) => ({ price: item.priceId, quantity: item.quantity })),
},
{ idempotencyKey: `sub-${session.id}-${group.cadence}` },
);
}The buyer gets shipping options and every item they chose, at the cost of more than one charge: each subscription's first invoice is a payment of its own, after the Checkout payment. A first invoice that fails or needs authentication leaves its subscription incomplete, which is the default allow_incomplete behavior, so email the buyer a way to finish. Your database keeps which items subscribe and how often, since the payment mode session only knows about one-time prices.
Which Stripe pattern fits
| Pattern | Stripe API | Covers | Leaves out |
|---|---|---|---|
| One-time prices in subscription mode | Checkout Sessions | One cadence plus up to 20 one-time items, paid in one charge on the first invoice | Shipping options, and items on a second cadence |
| add_invoice_items | Subscriptions API | Up to 20 one-time items on the subscription's next invoice, at signup or before any renewal | A hosted page; you confirm the first invoice's payment yourself |
| Pay once, then start the subscriptions | Checkout in payment mode, then Subscriptions API | Shipping options, any number of one-time items, one subscription per cadence | One charge: each subscription's first invoice is a separate payment |
On Flint, one order holds both
Flint is a payments API with commerce built in, and its checkout collects an order. Any line on that order can be a one-time purchase or a subscription, on whatever cadence the buyer picked, and the order pays in one charge. Start with a subscribe-and-save offer: the products buyers can subscribe to, the cadences they choose from, and an optional discount on every shipment.
curl -X POST https://api.withflintpay.com/v1/subscription-offers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: offer-coffee-v1" \
-d '{
"name": "Subscribe and save",
"product_ids": ["prod_1kmn0aExample", "prod_1kmn0bExample"],
"billing_interval_options": [
{"billing_interval": "weekly", "billing_interval_count": 2},
{"billing_interval": "monthly", "billing_interval_count": 1}
],
"promotion_id": "promo_1kmn0aExample"
}'Offers cover physical, digital, and service products, so the same pattern sells a refill, a membership, or a monthly service beside one-time items. Then build the cart as an order. A line with subscription renews; a line without it is bought once:
curl -X POST https://api.withflintpay.com/v1/orders \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: cart-8841" \
-d '{
"line_items": [
{
"type": "variant",
"variant_id": "var_1kmn0aExample",
"quantity": 2,
"subscription": {
"subscription_offer_id": "soffer_1kmn0aExample",
"billing_interval": "weekly",
"billing_interval_count": 2
}
},
{
"type": "variant",
"variant_id": "var_1kmn0bExample",
"quantity": 1,
"subscription": {
"subscription_offer_id": "soffer_1kmn0aExample",
"billing_interval": "monthly",
"billing_interval_count": 1
}
},
{"type": "variant", "variant_id": "var_1kmn0cExample", "quantity": 1}
]
}'Open hosted checkout for the order:
curl -X POST https://api.withflintpay.com/v1/checkout-sessions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: checkout-cart-8841" \
-d '{
"type": "order",
"order_id": "ord_1kmn0aExample",
"redirects": {"success_url": "https://example.com/thanks"}
}'Checkout collects the address and shows your delivery methods with their prices, the same as any order. Buyers can switch a line between one-time and subscribed right in checkout, so a store that only links to checkout still offers the choice. When the order is paid, Flint starts one subscription per cadence: here, one for the beans every two weeks and one for the filters every month, sharing the delivery chosen at checkout. Each subscribed line reports the subscription it started, abbreviated:
{
"order_id": "ord_1kmn0aExample",
"payment_status": "paid",
"line_items": [
{
"order_line_item_id": "li_1kmn0aExample",
"name": "House blend, 12 oz",
"quantity": 2,
"subscription": {
"subscription_offer_id": "soffer_1kmn0aExample",
"billing_interval": "weekly",
"billing_interval_count": 2,
"recurring_amount_money": {"amount": 3060, "currency": "USD"}
},
"subscription_id": "sub_1kmn0aExample"
},
{
"order_line_item_id": "li_1kmn0bExample",
"name": "Paper filters, 100 pack",
"quantity": 1,
"subscription": {
"subscription_offer_id": "soffer_1kmn0aExample",
"billing_interval": "monthly",
"billing_interval_count": 1,
"recurring_amount_money": {"amount": 680, "currency": "USD"}
},
"subscription_id": "sub_1kmn0bExample"
},
{
"order_line_item_id": "li_1kmn0cExample",
"name": "Burr grinder",
"quantity": 1
}
]
}recurring_amount_money is what that line costs at its first renewal, with the offer's discount applied. The order sends order.paid once, so one fulfillment handler ships the grinder and the first beans and filters together. Each new subscription sends subscription.created and subscription.activated, and every renewal arrives as its own order with order.paid, so the same handler ships those too.
On a product page, look up the offer for the variant the buyer is viewing with GET /v1/subscription-offers?variant_id= and show "One-time" beside the offer's cadences. A one-time line on an order also carries subscription_offer when an active offer covers it, which is everything you need to show "Subscribe and save" in your own cart.
Plans with a setup fee
When the one-time charge belongs to the plan itself, such as an activation fee or a starter kit every member gets, put it on the plan as setup_fee_money. Flint charges it with the first payment of each new subscription:
curl -X POST https://api.withflintpay.com/v1/subscription-plans \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: plan-studio-v1" \
-d '{
"name": "Studio membership",
"billing_interval": "monthly",
"billing_interval_count": 1,
"currency": "USD",
"line_items": [
{
"type": "custom",
"name": "Studio membership",
"unit_price_money": {"amount": 4900, "currency": "USD"}
}
],
"setup_fee_money": {"amount": 2500, "currency": "USD"}
}'