Request Retirement
Retire credits by the gram and automatically top-up inventory if required
Thallo removes the necessity for you to manually manage your carbon credit inventory, the Thallo system will take care of this for you.
Calling this endpoint with a sell_order_id
can cause carbon credits to be purchased from the market. These purchases are final and will be added to your monthly invoice. Use caution when building your logic and ensure accidental purchases cannot happen.
Retirement requests cannot be undone.
Example cURL Request
Endpoint Specification
Retire credits by the gram and automatically top-up inventory if required
POST
/api/caas/request-retirement
Earmark credits for retirement by the gram. Optionally include a sell_order_id
and Thallo will automatically purchase the minimum amount of credits required to fulfil the retirement request, rounded up to the nearest whole tonne.
Headers
Request Body
422: Unprocessable Entity error
types
error
typesLocation Codes:
Purchases
Thallo will purchase carbon credits from the specified sell_order_id
when there are not enough credits remaining in your CaaS carbon credit inventory for the specified vintage_id
.
This removes the necessity for you to manually manage your inventory, the Thallo system will take care of this for you.
This is an example flow of 2 retirement requests made against the same vintage_id
:
Retirement request made with the following parameters:
You currently have zero credits for the project/vintage in your CaaS inventory and so Thallo will purchase one whole tonne from the specified
sell_order_id
.The purchase is added to your monthly invoice and the credit is added to your CaaS inventory.
Now you have
1,000,000
grams for this vintage (1 tonne);20
grams are added to your retirement request for this vintage for this month. Leaving you with999,980
grams that can be used in future retirement requests for this vintage.The retirement request id for this vintage for this month is returned.
You make a new retirement request for the same vintage:
You currently have
999,980
grams in your Caas inventory for this vintage - enough to fulfil the retirement request so no purchase is required. Thesell_order_id
andexpected_price_cents
are effectively ignored.42
grams are added to your retirement request for this vintage for this month. Leaving you with999,938
grams that can be used in future retirement requests for this vintage.
Anti Slippage
It is possible that the price on the sell order changes between you reading the data from the Market and making the retirement request. By supplying the expected price this ensures you will pay the price you expect to pay for the credits. An error will be thrown if the expected price and the price on the sell order do not match.
Invoicing
All purchases are final and will be added to your monthly invoice.
Processing Retirement Requests
Retirement requests are processed once the invoice is settled for a given month. The retirements will then be processed by the Thallo Two-Way Bridge so the retirement is reflected on the blockchain as well as the underlying registry.
Due to limitations on the underlying registries, retirements can only be processed on whole tonnes. Any remaining grams will be rolled over to next month's retirement request for this project/vintage.
Last updated