Create Checkout Session
Creates a Checkout Session that, when completed, will result in an order for the specified amount of carbon credits (in kilograms). The total price must be at least $0.50 (the corresponding amount will depend on the per kg price of the specified portfolio). The Quotes API can be used to check the price before attempting to create a session.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
If present, scopes the operation to the subaccount with given id. See Subaccounts for more info.
Body
Amount of carbon credits to be purchased upon checkout completion, in kilograms
The URL the customer will be directed to if they decide to cancel payment and return to your website
The URL the customer will be redirected to after the payment is completed. The {CHECKOUT_SESSION_ID}
template can be used to include the session id in a query parameter. Make sure to include the template
exactly as {CHECKOUT_SESSION_ID}
(i.e. do not replace it with the actual session id).
Optional public description for the order that will be shown on the certificate, as provided when order was placed
512
Optional configuration for a callback url to invoke with updates when the status of an order changes.
Optional id of the portfolio to use for fulfilling the order resulting from the Checkout Session. If not specified, the user or subaccount's default portfolio will be used (depending on if a subaccount is provided).
Response
Amount of carbon credits to be purchased upon checkout completion, in kilograms
URL the customer will be redirected to if they click the "back" button in Checkout.
URL to the Checkout Session. Redirect the customer to this URL to take them to Checkout.
Timestamp of when the session was completed. Null if session has not been completed.
Timestamp of when the session will expire.
Identifier that can be used to retrieve the Checkout Session
Description to be associated with the order created from this session.
Webhook URL for updates to the order created from this session.
Id of the portfolio the customer will purchase from when completing Checkout.
Total price to be charged upon checkout completion, in USD cents
The status of the Checkout Session, one of open
, complete
, or expired
.
open
- The checkout session is still in progress. Payment processing has not started.complete
- The checkout session is complete. Payment processing may still be in progress.expired
- The checkout session has expired. No further processing will occur.
Id of the subaccount associated with the customer
URL the customer will be redirected to after they complete Checkout.