Skip to content

checkout

checkout(input: CheckoutInput!): CheckoutResult!

Price a basket, mint the order, and — when money is owed — the PaymentIntent to pay for it. The single entry point that replaces registerForActivity, purchaseProduct, bookActivityTime, signUpTeam and signUpIndividual: one mutation, any mix of items, one order.

Two phases. This one writes a pending purchase and its lines, holding no capacity and spending no credits, and returns a CheckoutSession for the client to confirm with Stripe Elements. completePurchase (or the webhook backing it up) then fulfills it. A free or fully credit-funded basket skips Stripe entirely and comes back already completed, with a null checkoutSession — the same free-versus-paid contract the mutations it replaces had.

Works signed-out when the business allows guest checkout: pass buyer with the buyer's email and a bot-challenge token.

Arguments

Returns

CheckoutResult!

See CheckoutResult for the full shape.

Try it

Authentication
Example
Query
mutation Checkout($input: CheckoutInput!) {
  checkout(input: $input) {
    __typename
  }
}
Variables
{}
POST https://go.sessions.website/api/graphql