Shipping Rates
Shipping rates describe the price of shipping presented to your customers and applied to a purchase. For more information, see Charge for shipping.
The Shipping Rate object
Attributes
- idstring
Unique identifier for the object.
- activeboolean
Whether the shipping rate can be used for new purchases. Defaults to
true
. - display_
namenullable string The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
- fixed_
amountnullable object Describes a fixed amount to charge for shipping. Must be present if type is
fixed_amount
. - 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.
- typeenum
The type of calculation to use on the shipping rate. Can only be
fixed_amount
for now.
More attributes
- objectstring
- createdtimestamp
- delivery_
estimatenullable object - livemodeboolean
- tax_
behaviornullable enum - tax_
codenullable stringExpandable
Create a shipping rate
Creates a new shipping rate object.
Parameters
- display_
namestringRequired The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
- fixed_
amountobject Describes a fixed amount to charge for shipping. Must be present if type is
fixed_amount
. - 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
. - typeenumRequired
The type of calculation to use on the shipping rate. Can only be
fixed_amount
for now.
More parameters
- delivery_
estimateobject - tax_
behaviorenum - tax_
codestring
Returns
Returns a shipping rate object if the call succeeded.
Update a shipping rate
Updates an existing shipping rate object.
Parameters
- activeboolean
Whether the shipping rate can be used for new purchases. Defaults to
true
. - fixed_
amountobject Describes a fixed amount to charge for shipping. Must be present if type is
fixed_amount
. - 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
.
More parameters
- tax_
behaviorenum
Returns
Returns the modified shipping rate object if the call succeeded.
Retrieve a shipping rate
Returns the shipping rate object with the given ID.
Parameters
No parameters.
Returns
Returns a shipping rate object if a valid identifier was provided.