Skip to content

registerForActivity

registerForActivity(activitySession: EntityRef!, productPurchase: EntityRef, spot: EntityRef, spotHolderKey: String, seatSection: EntityRef, formData: [RegistrationDataInput!], guest: GuestRegistrationInput, familyMember: EntityRef, buyer: BuyerInput, discountCode: String, giftCardCode: String, paymentMethod: String, savePaymentMethod: Boolean, taxCalculationId: String, tipAmount: Int, emailMarketingConsent: Boolean, emailMarketingConsentDisclosureVersion: ID, attribution: AttributionInput, idempotencyKey: String): RegisterForActivityResult!

Register for an individual activity session. Use productPurchase to pay with an existing pass/membership, or omit it for direct purchase. Pass guest to register on behalf of someone else; the caller is recorded as the booker and pays. The activity's participant policy must allow guest registrations.

Pass buyer when the caller is not signed in to perform guest checkout. Requires the business's guestCheckoutEnabled setting.

Arguments

activitySessionEntityRef!
productPurchaseEntityRef

The reserved spot being bought, for a session selling against a spot map. The caller must already hold it — pass the same holderKey given to holdSpots, or the registration is refused as a lost race.

spotHolderKeyString

The checkout key the spot holds were taken under. Required with spot.

seatSectionEntityRef

The general-admission section being bought into, for a spot map whose section sells as a capacity pool rather than assigned spots. Mutually exclusive with spot.

Register someone else, with the caller as the booker. Requires a signed-in caller. Omit guest.email to book without notifying the attendee — see GuestRegistrationInput.

familyMemberEntityRef

Register one of the signed-in viewer's managed children (a FamilyMember with role child). The viewer must be a manager or guardian sharing a family with the member; the booking is recorded with the viewer as the booker and the child as the participant. Mutually exclusive with guest.

discountCodeString

Optional discount code typed by the customer. Validated server-side against the activity's business; an invalid or unmet code returns a per-field error rather than registering at full price.

giftCardCodeString

Optional gift-card code to apply against the registration price. The card's remaining balance covers up to the post-discount line; any remainder is charged via Stripe.

paymentMethodString

Stripe PaymentMethod ID captured via SetupIntent for paid card waitlists. Required when the registration falls onto the waitlist for a card-paid activity (no productPurchase); used to charge the customer off-session if their spot is later promoted.

savePaymentMethodBoolean

When true for a signed-in card checkout, attach the newly-entered card to the buyer's Stripe Customer for future purchases. Ignored for guest checkout and saved-card waitlist reservations.

taxCalculationIdString

Stripe Tax calculation ID returned by a recent quoteTax query. When provided, the server reuses that calculation. Ignored when the seller has tax disabled.

tipAmountInt

Optional gratuity in cents. On a paid registration it rides the same charge, added after tax; on a pass/membership-covered one it mints a tip-only checkout instead of confirming immediately — the registration (and the pass debit) then commits only once the tip payment succeeds, so an abandoned checkout registers nothing. A tip is always excluded from both the tax base and the platform-fee base, and ignored for a waitlist join or a registration with no session. Tipping is per-activity: an activity that does not accept tips rejects a non-zero tipAmount outright. Classes, sessions, leagues and tournaments default to not accepting tips; bookings default to accepting them.

emailMarketingConsentBoolean

Email-marketing opt-in captured on the registration form. true records an affirmative consent for this participant against the activity's business; only honored when the business has consent collection enabled. Sessions never sends marketing email itself — consent lets the business email the participant through its own provider.

emailMarketingConsentDisclosureVersionID

Version of the consent disclosure the buyer was shown. Frozen with the consent record so the proof reflects exactly what they agreed to.

attributionAttributionInput

Marketing attribution captured client-side (UTM parameters, referrer host, landing path). First-touch is stamped onto a newly created participant; last-touch onto the registration. The server classifies the trustworthy origin — a client-claimed marketplace origin is never trusted.

idempotencyKeyString

Opaque client-generated idempotency token, stable for one checkout attempt (e.g. a single crypto.randomUUID() minted when the payment step mounts, NOT regenerated per click). When provided, it is used as the Stripe idempotencyKey on the saved-card off-session charge so a double-submit / client retry deduplicates to a single live charge instead of charging twice. Omit it to keep the legacy behaviour.

Returns

RegisterForActivityResult!

See RegisterForActivityResult for the full shape.

Try it

Authentication
Example
Query
mutation RegisterForActivity($activitySession: EntityRef!, $productPurchase: EntityRef, $spot: EntityRef, $spotHolderKey: String, $seatSection: EntityRef, $formData: [RegistrationDataInput!], $guest: GuestRegistrationInput, $familyMember: EntityRef, $buyer: BuyerInput, $discountCode: String, $giftCardCode: String, $paymentMethod: String, $savePaymentMethod: Boolean, $taxCalculationId: String, $tipAmount: Int, $emailMarketingConsent: Boolean, $emailMarketingConsentDisclosureVersion: ID, $attribution: AttributionInput, $idempotencyKey: String) {
  registerForActivity(activitySession: $activitySession, productPurchase: $productPurchase, spot: $spot, spotHolderKey: $spotHolderKey, seatSection: $seatSection, formData: $formData, guest: $guest, familyMember: $familyMember, buyer: $buyer, discountCode: $discountCode, giftCardCode: $giftCardCode, paymentMethod: $paymentMethod, savePaymentMethod: $savePaymentMethod, taxCalculationId: $taxCalculationId, tipAmount: $tipAmount, emailMarketingConsent: $emailMarketingConsent, emailMarketingConsentDisclosureVersion: $emailMarketingConsentDisclosureVersion, attribution: $attribution, idempotencyKey: $idempotencyKey) {
    __typename
  }
}
Variables
{}
POST https://go.sessions.website/api/graphql