v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Checkout

Get checkout cost preview

Returns a cost preview for a potential checkout without creating an order or charging the member. Provide either memberships/fees or a booking, but not both. A discount code can be included to see its effect on pricing.

Memberships/Fees flow: Calculates the order total based on the selected plans, fees, and the member's billing context (billing flow, currency, tax settings). Returns line items, subtotal, total, tax breakdown, and any applicable processing fees or discounts.

Booking flow: Returns a summary of the booking request including resource availability pricing, per-date fee breakdown with credits and coins applied, and the cancellation policy that would apply to the booking.

Required scopes: flex.billing.checkout.create

post/api/v2/organizations/{orgSlug}/checkout/summary

Path parameters

orgSlugstring required

organization slug

Query parameters

enforceBookingPolicyboolean
Example:true

Whether to enforce the booking policy and member validation rules when the request contains a booking. If true, member validations and booking-policy-driven tentative/approval flagging are applied to the booking checkout, and reflected in the checkout summary preview (note: policy-violation rejection is only applied at checkout, not in the summary preview). If false or not passed at all, the request behaves as it does today. Has no effect on memberships/fees checkouts.

Request body

memberstring required

The _id of the member. Used to resolve the member's billing context including billing flow, currency, and company. Required for memberships/fees summaries.

locationstring

Overrides the location for the order. If omitted, resolved from the member's assigned location.

discountCodestring

A discount code to apply to see its effect on pricing.

cardTypestring

The card brand (e.g., "visa", "mastercard"). Used to calculate any card-specific processing fees in the summary.

paymentMethod'card' | 'ach'

The payment method type. Used to calculate any method-specific processing fees in the summary.

Example request

{
  "member": "507f1f77bcf86cd799439011",
  "location": "507f1f77bcf86cd799439012",
  "memberships": [
    {
      "plan": "507f1f77bcf86cd799439011",
      "startDate": "2026-03-01",
      "location": "507f1f77bcf86cd799439012",
      "name": "Hot Desk Monthly",
      "price": 100,
      "addOns": [
        "507f1f77bcf86cd799439013"
      ]
    }
  ],
  "fees": [
    {
      "plan": "507f1f77bcf86cd799439011",
      "date": "2026-03-01",
      "location": "507f1f77bcf86cd799439012"
    }
  ],
  "booking": {
    "start": "2026-03-01T09:00:00.000Z",
    "end": "2026-03-01T10:00:00.000Z",
    "resource": "507f1f77bcf86cd799439011",
    "member": "507f1f77bcf86cd799439012",
    "company": "507f1f77bcf86cd799439013",
    "price": 50,
    "extras": [
      {
        "_id": "507f1f77bcf86cd799439011",
        "count": 2
      }
    ]
  },
  "discountCode": "DISCOUNT10",
  "cardType": "visa"
}

Response

Example response

{
  "stats": {
    "lines": [
      {
        "description": "Hot Desk Monthly",
        "unitAmount": 200,
        "quantity": 1,
        "amount": 200,
        "startDate": "2026-03-01T09:00:00.000Z",
        "endDate": "2026-03-01T10:00:00.000Z",
        "taxRate": "20",
        "taxPercent": 20,
        "taxAmount": 40,
        "discount": 0,
        "unitDiscount": 0
      }
    ],
    "subtotal": 200,
    "total": 240,
    "processingFeeLine": {
      "taxPercent": 12,
      "taxAmount": 15,
      "price": 60,
      "discountAmount": 10,
      "unitPrice": 30,
      "baseUnitPrice": 70,
      "subTotal": 60,
      "baseTotal": 60,
      "total": 60,
      "convertedAmounts": {
        "taxPercent": 12,
        "taxAmount": 15,
        "price": 60,
        "discountAmount": 10,
        "unitPrice": 30,
        "baseUnitPrice": 70,
        "subTotal": 60,
        "baseTotal": 60,
        "total": 60
      },
      "description": "Membership fee",
      "account": "6780f1ba5e6f7a8b9c0d1e2f",
      "plan": "6780f1ba6f7a8b9c0d1e2f3a",
      "fee": "6780f1ba7a8b9c0d1e2f3a4b",
      "location": "6780f1ba4d5e6f7a8b9c0d1e",
      "membership": "6780f1ba9c0d1e2f3a4b5c6d",
      "taxRate": "6780f1ba1e2f3a4b5c6d7e8f",
      "discount": 10,
      "unitDiscount": 5,
      "quantity": 2,
      "startDate": "2023-01-01T00:00:00.000Z",
      "endDate": "2023-01-01T00:00:00.000Z",
      "addOns": {
        "name": "Basic addon",
        "unitPrice": 10,
        "description": "Addon description"
      },
      "fees": [
        "6780f1ba7a8b9c0d1e2f3a4b",
        "6780f1ba8b9c0d1e2f3a4b5c"
      ],
      "memberships": [
        "6780f1ba9c0d1e2f3a4b5c6d",
        "6780f1ba0d1e2f3a4b5c6d7e"
      ]
    },
    "taxType": "excluded",
    "taxAmounts": [
      {
        "percent": 20,
        "total": 40,
        "taxRate": "507f1f77bcf86cd799439020"
      }
    ],
    "discountPercent": 10,
    "totalDiscount": 20,
    "paymentMethod": "Credit Card",
    "location": "507f1f77bcf86cd799439011",
    "baseTotal": 200
  }
}