Charge for shipping
Create different shipping rates for your customers.
Shipping rates let you display various shipping options—like standard, express, and overnight—with more accurate delivery estimates. Charge your customer for shipping using different Stripe products. Before you create a shipping rate, learn how to collect billing and shipping addresses.
Create a shipping rate Dashboard Server-side
Shipping rates only support fixed amount values for the entire order. You can’t adjust the shipping rate based on the number of items in the order.
To add a shipping rate using the Dashboard:
- Click Create shipping rate .
- Enter an amount, a description, and an optional delivery estimate.
- Click Save , and copy the shipping rate ID ( shr _ 123456 ).
Enter your shipping rate details
Update a shipping rate
You can’t update an amount of a currency that’s already been set on a shipping rate. After you set a currency and amount on a shipping rate, it can only be updated to include new currencies. To update a shipping rate in the Dashboard, you must archive the shipping rate and then create a new one.
Archive a shipping rate
To archive a shipping rate:
- On the Shipping rates tab, select the applicable shipping rate.
- Click the overflow menu , and select Archive .
To unarchive the shipping rate, click the overflow menu, and select Unarchive shipping rate.
Create a Checkout Session Server-side
To create a Checkout Session that includes your shipping rate, pass in the generated shipping rate ID to the shipping_options parameter. If you want to create the shipping rate at the same time as a Checkout Session, use the shipping_rate_data parameter with shipping_options. Only Checkout Sessions in payment mode support shipping options.
The following code sample adds two shipping options to the Checkout Session:
- Free shipping, with an estimated delivery of 5-7 business days.
- Next day air, at a cost of 15.00 USD, with an estimated delivery of exactly 1 business day.
In this example, the first option in the shipping_options array is pre-selected for the customer on the checkout page. However, customers can choose either option.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
If successful, the shipping selector appears in your checkout flow:
The shipping selector in the checkout flow
