Billing

Usage Billing Top Up

In V1, create a hosted Stripe Checkout session to top up the authenticated user's personal Automations wallet.

A wallet whose usage is billed on the user's Pro subscription needs a personal Stripe customer and an active personal Todoist Pro subscription. A wallet on its own compute subscription needs Pro of any kind, including Pro gifted by a Business workspace, but not Pro paid only through an app store. A user with no Stripe customer gets one before Checkout opens, unless they only have a legacy one.

A refused top-up returns HTTP 400 with one of these error tags:

  • USAGE_BILLING_PLAN_REQUIRED (code 615): the user doesn't have Pro.
  • USAGE_BILLING_CURRENCY_MISMATCH (code 616): the currency isn't the one the user pays in, including an unsupported one.
  • USAGE_BILLING_TOP_UP_BELOW_MINIMUM (code 617): the amount is below the minimum.
  • USAGE_BILLING_TOP_UP_UNAVAILABLE (code 605): any other unmet prerequisite, such as a user with only a legacy Stripe customer.
post/api/v1/usage_billing/top_up

Request

  • Base URL
    https://api.todoist.com
  • URL
    https://api.todoist.com/api/v1/usage_billing/top_up
  • Auth
    none declared

Request body

amountinteger required

Amount to buy, in the currency's minor unit (1000 = $10.00).

currencystring required

ISO currency code.

return_urlstring required

URL Checkout returns the user to.

Example request

{
  "amount": 1000,
  "currency": "usd",
  "return_url": "https://todoist.com/app/settings/automations"
}

Response

Successful Response

session_idstring required

The created Stripe Checkout session id.

checkout_urlstring required

Hosted Stripe Checkout URL to redirect the user to for payment.

Example response

{
  "session_id": "cs_live_a1b2c3",
  "checkout_url": "https://checkout.stripe.com/c/pay/cs_live_a1b2c3"
}

Changes

No recorded changes to this operation across all 34 revisions of this API.