Add order bump to checkout page

Offers one of your products as an order bump on the specified checkout page. It is added last and enabled unless enabled is false. An archived checkout page must be unarchived first.

POST/v1/checkout-pages/:pageId/order-bumps

Authorization

api_key_auth
AuthorizationBearer <token>

API key authentication. Use "Bearer YOUR_API_KEY" format.

In: header

Path Parameters

pageIdstringrequired

The ID of the checkout page or event.

^[0-9a-fA-F]{24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

  • productIdstringrequired

    ID of any of your products (find one with list_products, or create one made only for this with create_product). Its default price must be a one-time price in the page currency. Without a default price, the first enabled price is used. The product must not be archived, sold on this page or already offered on it. A product that generates license keys, has bulk discounts, or has variants that are required or have their own price, stock or files cannot be offered yet.

    ^[0-9a-fA-F]{24}$

  • enabledboolean

    Whether the order bump is offered. A disabled order bump stays on the page but is not shown.

  • preselectedboolean

    Whether the order bump is ticked when the page loads.

  • hiddenboolean

    Hide the order bump unless the page URL reveals it with ?show_order_bumps= and the product price reference.

  • Rule that shows the order bump only for some selections. Sent whole: it replaces the stored rule.

  • allowQuantityboolean

    Let the customer pick a quantity. Off, the order bump is bought once.

  • shortenDescriptionboolean

    Clamp a long description behind a Show more toggle.

Returns

Order bump added successfully

    • productIdstring

      ID of the product offered as an order bump.

    • addedAtstring, nullable

      ISO 8601 timestamp when the order bump was added to this page.

    • enabledboolean

      Whether the order bump is offered.

    • preselectedboolean

      Whether it is ticked when the page loads.

    • hiddenboolean

      Whether it is hidden unless the page URL reveals it with ?show_order_bumps=.

    • Rule that shows the order bump only for some selections.

    • allowQuantityboolean

      Whether the customer can pick a quantity.

    • shortenDescriptionboolean

      Whether a long description is clamped behind a Show more toggle.

    • Summary of the product. Read the full product with get_product.

    • The price the order bump is offered at. Null when it is unavailable, including when its price is disabled.

    • unavailableReasonstring, nullable

      Why the order bump cannot be offered on this page right now (e.g. a currency mismatch or a deleted product), or null when it can. An unavailable order bump stays on the page until removed.

    • usedOnPageCountnumber

      How many of your pages offer this product as an order bump.

    • hasPurchasesboolean

      Whether the product has been bought. A bought product cannot be deleted.

Bad request - the product cannot be offered as an order bump on this page

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Unauthorized - Missing or invalid API key

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Forbidden - Insufficient permissions or validation error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

checkout page not found

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Rate Limit Exceeded - Please try again later.

  • messagestring

    Human-readable error message.

Internal server error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

import { createCheckoutPageClient } from '@checkoutpage/sdk';const checkoutpage = createCheckoutPageClient({  apiKey: process.env.CHECKOUTPAGE_API_KEY!,});const response = await checkoutpage.checkoutPages.orderBumps.create('65f4a1c2e4a9f3d2b1c0a9e8', {  productId: '65f4a1c2e4a9f3d2b1c0a9e8',});
{
  "data": {
    "productId": "string",
    "addedAt": "string",
    "enabled": true,
    "preselected": true,
    "hidden": true,
    "showHideLogic": {
      "enabled": true,
      "subject": "price",
      "comparison": "is",
      "priceIds": [
        "string"
      ],
      "ticketTypeIds": [
        "string"
      ],
      "orderBumpProductIds": [
        "string"
      ]
    },
    "allowQuantity": true,
    "shortenDescription": true,
    "product": {
      "id": "string",
      "title": "string",
      "currency": "string",
      "imageUrl": "string"
    },
    "price": {
      "amount": 0,
      "currency": "string",
      "billingType": "one_time",
      "interval": "string",
      "intervalCount": 0
    },
    "unavailableReason": "string",
    "usedOnPageCount": 0,
    "hasPurchases": true
  }
}
{
  "status": "error",
  "type": "error",
  "message": "Bad request - the product cannot be offered as an order bump on this page"
}
{
  "status": "error",
  "type": "error",
  "message": "Missing or invalid API key"
}
{
  "status": "error",
  "type": "error",
  "message": "Insufficient permissions requires: BOOKINGS_WRITE"
}
{
  "status": "error",
  "type": "error",
  "message": "Page not found"
}
{
  "message": "API key rate limit exceeded. Please try again later."
}
{
  "status": "error",
  "type": "error",
  "message": "Internal server error"
}