No-cost orders
Accept orders for no-cost line items or apply 100% off discounts for one-off payments.
You can process no-cost orders for one-off payments with no-cost line items or discounts for 100% off with coupons and customer-facing promotion codes.
Note
You must be on API version 2023-08-16 or later to process no-cost orders using the Checkout Sessions API.
Create a Checkout Session with no-cost line items
Create a Price with a unit_amount of 0, and pass it into the line items array of the Checkout Session. See Products and prices for more information on creating prices.
You can also use the price_data parameter of the line_
array to pass in a free price.
If the total amount is 0, Checkout doesn’t collect a payment method from the customer.
If the customer
property isn’t set, the Checkout Session automatically creates a new Customer object. This means guest customers aren’t supported.
Create a discount
Alternatively, create a coupon and a promotion code to allow customers to complete orders for free.
Create a coupon
Create a Coupon that makes your Checkout Session free. For example, you can create a 100% off coupon.
To create a session with an applied discount, pass the coupon ID in the coupon
parameter of the discounts array.
You can also create a free Checkout Session by applying a coupon for an amount equal to or exceeding the Checkout Session total.
Create a promotion code
Promotion codes are customer-facing codes created on top of coupons. You can share these codes with customers who can enter them into Checkout to apply a discount. Create a promotion code from a 100% off coupon to allow customers to create orders for free.
Enable user-redeemable promotion codes using the allow_promotion_codes parameter in a Checkout Session. This enables a field in Checkout to allow users to enter promotion codes.
Customers can also check out for free if they apply a promotion code for an amount equal to or exceeding the Checkout Session total. For more ways to apply discounts, see Add discounts.
Handle completed orders
After the Checkout Session completes, you can make a request for the finalised line items and their quantities. If your customer removes a line item, it also removes it from the line items response. See the Fulfilment guide to learn how to create an event handler to handle completed Checkout Sessions.
Common mistake
To fulfil no-cost orders, make sure to handle the checkout.
event rather than PaymentIntent events. Completed Checkout Sessions that are free won’t have an associated PaymentIntent.
You can see your completed no-cost orders in the Dashboard. The no-cost orders tab only appears if you have at least one completed no-cost order.
OptionalPayment links and pricing tables
Payment links and pricing tables support no-cost orders by default when your account is created after 17 August 2023. For accounts created before 17 August 2023, you can enable no-cost orders for your Payment links and pricing tables by visiting your Checkout settings in the Dashboard.
Caution
When you enable this feature, it has a 3-day grace period in which you can turn it off. After 3 days, you can’t disable it. Before you enable it for your live payment links and pricing tables, test it with your fulfilment flow in a sandbox.
To use no-cost orders with a payment link in a sandbox, specify a prefilled_
URL parameter with an email whose local part includes the suffix +no_
. For example, j.
. The resulting checkout session lets you apply a discount that reduces the order total to zero.
To use no-cost orders with a pricing table in a sandbox, set the pricing table’s customer-email
property to an email address whose local part includes the suffix +no_
. For example, j.
. The resulting checkout session lets you apply a discount that reduces the order total to zero.