v1

latestOpenAPI 3.1.0AGPL-3.0-only2026-07-1773264353.7 KB
Checkout Sessions

Create a checkout session

post/api/v1/checkout-sessions

Request body

auto_advance_invoicesboolean nullable

If false, invoices will stay in Draft until manually reviewed and finalized. Default is true.

billing_day_anchorinteger nullable
billing_start_datestring date nullable
charge_automaticallyboolean nullable

Automatically try to charge the customer's configured payment method on finalize. Default is true.

coupon_codestring nullable
coupon_idsCouponId[]
customer_idstring CustomerId or customer alias required

Customer ID or alias

end_datestring date nullable
expires_in_hoursinteger nullable

Session expiry time in hours. Default is 1 hour for self-serve checkout.

invoice_memostring nullable
invoice_thresholdstring decimal nullable
{"stackTrail":"components:schemas:CreateCheckoutSessionRequest:properties:metadata","oasType":"schema","type":"unknown"}
net_termsinteger nullable
plan_version_idstring MeteroidId required
purchase_orderstring nullable
trial_duration_daysinteger nullable

Example request

{
  "add_ons": [
    {
      "add_on_id": "add_7n42DGM5Tflk9n8mt7Fhc7",
      "customization": {
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    }
  ],
  "components": {
    "extra_components": [
      {
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        },
        "product_ref": {
          "id": "prd_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    ],
    "overridden_components": [
      {
        "component_id": "price_7n42DGM5Tflk9n8mt7Fhc7",
        "price_entry": {
          "id": "pri_7n42DGM5Tflk9n8mt7Fhc7"
        }
      }
    ],
    "parameterized_components": [
      {
        "component_id": "price_7n42DGM5Tflk9n8mt7Fhc7"
      }
    ],
    "remove_components": [
      "price_7n42DGM5Tflk9n8mt7Fhc7"
    ]
  },
  "coupon_ids": [
    "cou_7n42DGM5Tflk9n8mt7Fhc7"
  ],
  "payment_methods_config": {
    "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
  },
  "plan_version_id": "plv_7n42DGM5Tflk9n8mt7Fhc7"
}

Response

Checkout session created

Example response

{
  "session": {
    "customer_id": "cus_7n42DGM5Tflk9n8mt7Fhc7",
    "id": "che_7n42DGM5Tflk9n8mt7Fhc7",
    "payment_methods_config": {
      "account_id": "ba_7n42DGM5Tflk9n8mt7Fhc7"
    },
    "plan_version_id": "plv_7n42DGM5Tflk9n8mt7Fhc7",
    "subscription_id": "sub_7n42DGM5Tflk9n8mt7Fhc7"
  }
}