Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

The Shipping Rate object


The Shipping Rate object

Attributes

  • id string Unique identifier for the object.
  • active boolean Whether the shipping rate can be used for new purchases. Defaults to true.
  • display _ name nullable string The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
  • fixed _ amount nullable object Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.
  • metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
  • tax _ behavior nullable enum Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Possible enum values exclusive inclusive unspecified
  • tax _ code nullable string Expandable A tax code ID. The Shipping tax code is txcd_92010001.
  • type enum The type of calculation to use on the shipping rate. Possible enum values fixed_amount The shipping rate is a fixed amount.

More attributes

  • object string, value is "shipping_rate"
  • created timestamp
  • delivery _ estimate nullable object
  • livemode boolean

The Shipping Rate object

{ "id": "shr_1MrRx2LkdIwHu7ixikgEA6Wd", "object": "shipping_rate", "active": true, "created": 1680207604, "delivery_estimate": null, "display_name": "Ground shipping", "fixed_amount": { "amount": 500, "currency": "usd" }, "livemode": false, "metadata": {}, "tax_behavior": "unspecified", "tax_code": null, "type": "fixed_amount"}

Create a shipping rate

POST / v1 / shipping_rates

Creates a new shipping rate object.

Parameters

  • display _ name string Required The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. The maximum length is 100 characters.
  • fixed _ amount object Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.
  • metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
  • tax _ behavior enum Recommended if calculating taxes Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Possible enum values exclusive inclusive unspecified
  • tax _ code string Recommended if calculating taxes A tax code ID. The Shipping tax code is txcd_92010001.
  • type enum Required The type of calculation to use on the shipping rate. Possible enum values fixed_amount The shipping rate is a fixed amount.

More parameters

  • delivery _ estimate object

Returns

Returns a shipping rate object if the call succeeded.

Response

{ "id": "shr_1MrRx2LkdIwHu7ixikgEA6Wd", "object": "shipping_rate", "active": true, "created": 1680207604, "delivery_estimate": null, "display_name": "Ground shipping", "fixed_amount": { "amount": 500, "currency": "usd" }, "livemode": false, "metadata": {}, "tax_behavior": "unspecified", "tax_code": null, "type": "fixed_amount"}

Update a shipping rate

POST / v1 / shipping_rates /:id

Updates an existing shipping rate object.

Parameters

  • active boolean Whether the shipping rate can be used for new purchases. Defaults to true.
  • fixed _ amount object Describes a fixed amount to charge for shipping. Must be present if type is fixed_amount.
  • metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
  • tax _ behavior enum Recommended if calculating taxes Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Possible enum values exclusive inclusive unspecified

Returns

Returns the modified shipping rate object if the call succeeded.

Response

{ "id": "shr_1MrRx2LkdIwHu7ixikgEA6Wd", "object": "shipping_rate", "active": true, "created": 1680207604, "delivery_estimate": null, "display_name": "Ground shipping", "fixed_amount": { "amount": 500, "currency": "usd" }, "livemode": false, "metadata": { "order_id": "6735" }, "tax_behavior": "unspecified", "tax_code": null, "type": "fixed_amount"}
Last verified 2026-09-24

Is this helpful?