Stripe: List all shipping rates
Stripe shippingRates.getShippingRates: arguments, response, policy and SDK examples.
← Shipping rates operations · Get started
Operation stripe.getshippingrates
Provider route: GET /v1/shipping_rates. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["shippingRates"]["getShippingRates"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.shippingRates.getShippingRates(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_stripe import StripeIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.shipping_rates.get_shipping_rates(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.active | boolean | Optional | |
query.created | JSON | Optional | |
query.created (anyOf 1) | object | Alternative | |
query.created (anyOf 1).gt | integer | Optional | |
query.created (anyOf 1).gte | integer | Optional | |
query.created (anyOf 1).lt | integer | Optional | |
query.created (anyOf 1).lte | integer | Optional | |
query.created (anyOf 2) | integer | Alternative | |
query.currency | string | Optional | Format: currency |
query.ending_before | string | Optional | Maximum length: 5000 |
query.expand | array | Optional | |
query.expand[] | string | Each item | Maximum length: 5000 |
query.limit | integer | Optional | |
query.starting_after | string | Optional | Maximum length: 5000 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Create a shipping rate — response body |
has_more | boolean | Required within parent | True if this list has another page of items after this one that can be fetched. |
object | string | Required within parent | String representing the object’s type. Objects of the same type share the same value. Always has the value `list`. Known values: list |
url | string | Required within parent | The URL where this list can be accessed. Maximum length: 5000 Pattern: ^/v1/shipping_rates |
Referenced models: Create a shipping rate — response body
Schemas
Section titled “Schemas”Create a shipping rate — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Shipping rates describe the price of shipping presented to your customers and applied to a purchase. For more information, see [Charge for shipping](https://docs.stripe.com/payments/during-payment/charge-shipping). |
active | boolean | Required within parent | Whether the shipping rate can be used for new purchases. Defaults to `true`. |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
delivery_estimate | JSON | Optional | |
delivery_estimate (anyOf 1) | JSON | Alternative | The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. |
delivery_estimate (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a shipping rate — response body — delivery estimate value maximum, minimum |
delivery_estimate (anyOf 2) | null | Alternative | |
display_name | JSON | Optional | |
display_name (anyOf 1) | string | Alternative | The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. Maximum length: 5000 |
display_name (anyOf 2) | null | Alternative | |
fixed_amount | Model | Optional | Expand Create a shipping rate — response body — fixed amount |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Required within parent | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Additional keys: see wildcard field |
metadata.* | string | Additional keys | Maximum length: 500 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: shipping_rate |
tax_behavior | JSON | Optional | |
tax_behavior (anyOf 1) | string | Alternative | Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Known values: exclusive, inclusive, unspecified |
tax_behavior (anyOf 2) | null | Alternative | |
tax_code | JSON | Optional | |
tax_code (anyOf 1) | JSON | Alternative | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. |
tax_code (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
tax_code (anyOf 1) (anyOf 2) | Model | Alternative | Expand Retrieve a tax code — response body |
tax_code (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of calculation to use on the shipping rate. Known values: fixed_amount |
Referenced models: Create a shipping rate — response body — delivery estimate value maximum, minimum, Create a shipping rate — response body — fixed amount, Retrieve a tax code — response body
Create a shipping rate — response body — delivery estimate value maximum, minimum
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
maximum | JSON | Optional | |
maximum (anyOf 1) | JSON | Alternative | The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. |
maximum (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a shipping rate — response body — delivery_estimate / value / maximum, minimum / maximum / value / unit: business day, day, hour, month, week |
maximum (anyOf 2) | null | Alternative | |
minimum | JSON | Optional | |
minimum (anyOf 1) | JSON | Alternative | The lower bound of the estimated range. If empty, represents no lower bound. |
minimum (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a shipping rate — response body — delivery_estimate / value / maximum, minimum / maximum / value / unit: business day, day, hour, month, week |
minimum (anyOf 2) | null | Alternative |
Referenced models: Create a shipping rate — response body — delivery_estimate / value / maximum, minimum / maximum / value / unit: business day, day, hour, month, week
Create a shipping rate — response body — fixed amount
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | A non-negative integer in cents representing how much to charge. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
currency | string | Required within parent | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Format: currency |
currency_options | object | Optional | Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). Additional keys: see wildcard field |
currency_options.* | Model | Additional keys | Expand Create a shipping rate — response body — fixed amount currency options value |
Referenced models: Create a shipping rate — response body — fixed amount currency options value
Retrieve a tax code — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. |
description | string | Required within parent | A detailed description of which types of products the tax code represents. Maximum length: 5000 |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
name | string | Required within parent | A short name for the tax code. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: tax_code |
requirements | JSON | Optional | |
requirements (anyOf 1) | JSON | Alternative | An object that describes more information about the tax location required for this tax code. Some tax codes require a [performance location](/tax/location-sales#required-versus-optional-performance-locations) to calculate tax correctly. |
requirements (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a tax code — response body — requirements / value / performance_location: optional, required |
requirements (anyOf 2) | null | Alternative |
Referenced models: Retrieve a tax code — response body — requirements / value / performance_location: optional, required
Create a shipping rate — response body — delivery_estimate / value / maximum, minimum / maximum / value / unit: business day, day, hour, month, week
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
unit | string | Required within parent | A unit of time. Known values: business_day, day, hour, month, week |
value | JSON | Required within parent | |
value (anyOf 1) | integer | Alternative | Must be greater than 0. |
value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create a shipping rate — response body — fixed amount currency options value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | JSON | Required within parent | |
amount (anyOf 1) | integer | Alternative | A non-negative integer in cents representing how much to charge. |
amount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
tax_behavior | string | Required within parent | Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Known values: exclusive, inclusive, unspecified |
Retrieve a tax code — response body — requirements / value / performance_location: optional, required
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
performance_location | string | Required within parent | Describes whether a performance location is required for a successful tax calculation with a tax code. Known values: optional, required |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: stripe.getshippingrates. Catalog operation: GetShippingRates. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Stripe-Version": "2026-09-30.endive"}