Sample - Stripe API
GET/v1/shipping_rates/{shipping_rate_token}

Retrieve a shipping rate

Retrieves a shipping rate by its identifier. Use expand when you need selected response fields included inline. The response describes the rate's availability, customer-facing name, fixed charge, delivery estimate, and tax treatment.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
shipping_rate_tokenstringrequired
The unique identifier of the shipping rate to retrieve; must not exceed 5,000 characters.
expandarray<string>optional
Fields to expand in the response; each field name must not exceed 5,000 characters.

2 status codes
200Returns the shipping-rate object with its identifier, active state, display name, delivery estimate, fixed amount, tax behavior, tax code, and metadata.
activebooleanrequired
Whether the shipping rate can be used for new purchases. Defaults to `true`.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
delivery_estimateobjectoptional
The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
display_namestringoptional
The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
fixed_amountobjectoptional
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectrequired
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.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:shipping_rate
tax_behaviorstringoptional
Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
Allowed:exclusiveinclusiveunspecified
tax_codestringoptional
A [tax code](https://docs.stripe.com/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
typestringrequired
The type of calculation to use on the shipping rate.
Allowed:fixed_amount
defaultError response.
errorobjectrequired

Error handling

shipping_rate_token must be a string of no more than 5,000 characters identifying the shipping rate to retrieve. Each value in expand must also be a string of no more than 5,000 characters when supplied.