Climate Order
Orders represent your intent to purchase a particular Climate product. When you create an order, the payment is deducted from your merchant balance.
The Climate order object
Attributes
- idstring
Unique identifier for the object.
- objectstring
String representing the object’s type. Objects of the same type share the same value.
- amount_
feesinteger Total amount of Frontier’s service fees in the currency’s smallest unit.
- amount_
subtotalinteger Total amount of the carbon removal in the currency’s smallest unit.
- amount_
totalinteger Total amount of the order including fees in the currency’s smallest unit.
- beneficiarynullable object
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
- canceled_
atnullable timestamp Time at which the order was canceled. Measured in seconds since the Unix epoch.
- cancellation_
reasonnullable enum Reason for the cancellation of this order.
- certificatenullable string
For delivered orders, a URL to a delivery certificate for the order.
- confirmed_
atnullable timestamp Time at which the order was confirmed. Measured in seconds since the Unix epoch.
- createdtimestamp
Time at which the object was created. Measured in seconds since the Unix epoch.
- currencystring
Three-letter ISO currency code, in lowercase, representing the currency for this order.
- delayed_
atnullable timestamp Time at which the order’s expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
- delivered_
atnullable timestamp Time at which the order was delivered. Measured in seconds since the Unix epoch.
- delivery_
detailsarray of objects Details about the delivery of carbon removal for this order.
- expected_
delivery_ yearinteger The year this order is expected to be delivered.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - 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.
- metric_
tonsdecimal string Quantity of carbon removal that is included in this order.
- productstringExpandable
Unique ID for the Climate
Product
this order is purchasing. - product_
substituted_ atnullable timestamp Time at which the order’s product was substituted for a different product. Measured in seconds since the Unix epoch.
- statusenum
The current status of this order.
Create an order
Creates a Climate order object for a given Climate product. The order will be processed immediately after creation and payment will be deducted your Stripe balance.
Parameters
- productstringRequired
Unique identifier of the Climate product.
- amountinteger
Requested amount of carbon removal units. Either this or
metric_tons
must be specified. - beneficiaryobject
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
- currencystring
Request currency for the order as a three-letter ISO currency code, in lowercase. Must be a supported settlement currency for your account. If omitted, the account’s default currency will be used.
- 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
. - metric_
tonsstring Requested number of tons for the order. Either this or
amount
must be specified.
Returns
The new Climate order object.
Update an order
Updates the specified order by setting the values of the parameters passed.
Parameters
- orderstringRequired
Unique identifier of the order.
- beneficiaryobject
Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
- 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
.
Returns
The updated Climate order object.
Retrieve an order
Retrieves the details of a Climate order object with the given ID.
Parameters
- orderstringRequired
Unique identifier of the order.
Returns
Returns a Climate order object if a valid identifier was provided. Throws an error otherwise.