Create a shipping rate

Changed on

Creates a new shipping rate object.

post/v1/shipping_rates

Request

  • Base URL: https://api.stripe.com
  • URL: https://api.stripe.com/v1/shipping_rates
  • Auth: one of:
    • HTTP basic
    • HTTP bearer

Request body application/x-www-form-urlencoded

display_namestring required

The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.

expandstring[]

Specifies which fields in the response should be expanded.

metadataobject

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'exclusive' | 'inclusive' | 'unspecified'

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified.

tax_codestring

A tax code ID. The Shipping tax code is txcd_92010001.

type'fixed_amount'

The type of calculation to use on the shipping rate.

Response

Successful response.

activeboolean required

Whether the shipping rate can be used for new purchases. Defaults to true.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

display_namestring nullable

The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.

idstring required

Unique identifier for the object.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject required

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.

object'shipping_rate' required

String representing the object's type. Objects of the same type share the same value.

tax_behavior'exclusive' | 'inclusive' | 'unspecified' nullable

Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified.

type'fixed_amount' required

The type of calculation to use on the shipping rate.

Changes

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////////// to the response with the status

Some revisions have not been checked yet.