Sweet Spot API

Command Palette

Search for a command to run...

POST/v1/checkouts

Creates a new checkout with a selected product variant and lease term. Use this endpoint when a customer initiates a lease for a product. If an optional customer object is provided, the system will lookup an existing customer by email or create a new customer. If no customer information is provided, the checkout is created for the authenticated user. Creates a checkout in Unpaid state. If a checkout already exists for this user/product/term combination, returns the existing checkout instead of creating a duplicate. When customer information is provided, requires CheckoutCreateWithCustomer permission; otherwise requires CheckoutWrite permission.

Request Body
Fields in the request body
NameTypeRequiredDescription
arbitraryFees
OptionalOptional arbitrary fees to apply to this checkout
cancelUrl
string
OptionalURL to redirect to when checkout is cancelled
customer
Optional-
failureUrl
string
OptionalURL to redirect to when checkout fails
productVariantId
ProductVariantPubId
RequiredPublic ID of the product variant to include in the checkout
selectedTermInMonths
LeaseTermPubId
Optional-
successUrl
string
OptionalURL to redirect to on successful checkout completion
Response Data
Fields returned in the response
NameTypeRequiredDescription
arbitraryFees
OptionalArbitrary fees applied to this checkout
cancelUrl
string
OptionalURL to redirect to when checkout is cancelled
checkoutFlowState
string
OptionalCurrent state in the checkout flow state machine
checkoutSessionId
string
RequiredStripe checkout session ID for payment processing
createdAt
string (date-time)
RequiredTimestamp when the checkout was created
depositInvoiceId
string
OptionalStripe invoice ID for the deposit payment
depositTimestamp
string
OptionalTimestamp when the deposit was paid
externalOrderId
string
OptionalExternal order ID from integrated systems
failureUrl
string
OptionalURL to redirect to when checkout fails
id
CheckoutPubId
RequiredPublic-facing unique identifier for the checkout
insuranceStatus
RequiredStatus of insurance approval (pending, approved, denied)
lastPaymentError
string
OptionalLast payment error message (if payment failed)
lastPaymentErrorAt
string
OptionalTimestamp of last payment error
lastPaymentErrorCode
string
OptionalLast payment error code (if payment failed)
leaseDocumentId
string
OptionalID of the lease document in PandaDoc
leaseEndDate
string
OptionalEnd date of the lease term
leaseStartDate
string
OptionalStart date of the lease term
leaseTermId
LeaseTermId
Optional-
offtakePartnerId
OftakePartnerId
RequiredOfftake partner handling this checkout
paymentFailureCount
integer (int32)
RequiredCount of payment failures
pickupLocationId
integer
OptionalID of the pickup location (if using pickup instead of shipping)
recurringPaymentStatus
RequiredStatus of recurring payments (pending, active, cancelled)
shippingAddress
Optional-
state
RequiredCurrent state of the checkout (unpaid, pendingDeposit, waitlisted, deposited, fulfilled)
stripeSubscriptionId
string
OptionalStripe subscription ID for recurring payments
successUrl
string
OptionalURL to redirect to on successful checkout completion
updatedAt
string (date-time)
RequiredTimestamp when the checkout was last updated
checkoutUrl
string
RequiredURL to access the checkout page
customerId
UserPubId
RequiredPublic ID of the customer (resolved from internal customer_id)