Skip to main content

One-Click Checkout

Pre-release documentation

Direct Checkout and One-Click Checkout functionality is currently not available for general release. While you can reference this guide to begin your integration with early access, please be aware that it is not enabled for all clients yet. If you are working with a client and are building direct and one-click checkout flows, please get in touch with support@spektrix.com to ask us to enable this functionality for the client.

Overview

One-Click Checkout is a high-speed checkout flow that allows customers to complete a purchase instantly via Apple Pay. This flow minimizes friction by retrieving customer identity, billing information, and payment data directly from the Apple Pay wallet, eliminating the need for manual form entry or traditional login processes.

Like Direct Checkout, this flow automatically handles customer identification based on the email address returned by Apple. However, One-Click Checkout is available for both guest and logged-in customers.

Customer Record Logic

Spektrix manages customer identification differently depending on the user's authentication status:

Non-Logged In Customers (Guests)

  • Identification: Spektrix uses the email address provided by the Apple Pay sheet to look up existing records.
  • Existing Records: If a match is found, the order is attached to that customer. Existing record details (Name/Address) are not updated.
  • New Records: If no match is found, a new customer record is created using the details from Apple. No "New Account" email is sent.

Logged-In Customers

  • Identification: The email address of the currently authenticated Spektrix account is used.
  • Data Handling: The name and email from Apple Pay are ignored to preserve the integrity of the logged-in account. The billing address from Apple is used strictly for payment authorization (AVS) and does not update the customer's stored address.

Integration Steps

1. Validate Eligibility

Before rendering the Apple Pay button, you must verify if the basket is eligible for One-Click Checkout.

Endpoint:

Web / Public modeSystem Owner mode
GET /v3/basket/checkout-optionsGET /v3/baskets/{id}/checkout-options

Response Example:

{
"checkoutTypes": {
"oneClick": {
"available": false,
"reason": "MembershipOnBasket"
},
"direct": {
"available": false,
"reason": "MembershipOnBasket"
}
}
}

Reason Codes

If available is false, one of the following codes will be returned:

Reason CodeExplanation
SpektrixPaymentsNotConfiguredAdyen must be configured as the primary payment service for the Web Payment Channel.
BasketHasPendingPaymentThe basket has a pending payment which must be completed or cancelled.
MembershipOnBasketA membership item is present in the basket.
NoOutstandingBalanceThe basket total is zero.
CustomerEmailDeliveryOnGiftVoucherThe delivery method for a gift voucher has been set to Customer Email.
NotAllowedForEventInstanceInBasketAn event instance in the basket has been set in the Admin interface to disallow One-Click Checkout.
NotAllowedForStockItemInBasketA merchandise item in the basket has been set in the Admin interface to disallow One-Click Checkout.
NotAllowedForFundInBasketA fund in the basket has been set in the Admin interface to disallow One-Click Checkout.

2. Set Delivery Method

A delivery method must be set for the transaction to be confirmed. This can happen before or after the ApplePay button is rendered.

Endpoint:

Web / Public modeSystem Owner mode
PATCH /v3/basketPATCH /v3/baskets/{id}

Constraint: Only cobo (Type 1) and PrintAtHome (Type 2) are supported.

3. Initiate Payment

Call this endpoint to generate a secure transaction token specifically for the One-Click flow.

Endpoint:

Web / Public modeSystem Owner mode
POST /v3/basket/initiate-one-click-paymentPOST /v3/baskets/{id}/initiate-one-click-payment

Response: Returns a paymentToken string. This token is short-lived and specific to the current basket state.

Basket State Persistence: If any change is made to the basket (adding items, changing delivery) after getting a token, you must call this endpoint again to retrieve a new paymentToken.

4. Implement Web Component

Once you have the payment token, render the <spektrix-one-click-payments> web component.

  • Domain Verification: Ensure your domain is verified for Apple Pay.
  • Events: Listen for success/failure events to direct the customer to your confirmation page.

Constraints and Considerations

Feature Support

FeatureStatusNote
Digital WalletsApple Pay OnlyGoogle Pay is not supported in the current phase.
MembershipsCannot be Supported for non-logged in customersMemberships cannot be purchased; benefits cannot be applied for guest checkouts.
SubscriptionsCannot be Supported for non-logged in customersRequires an authenticated customer in the basket.
Gift AidNot SupportedDeclarations cannot be captured in the Apple sheet.
Ticket VouchersNot Supported for non-logged in customersCannot be redeemed during the One-Click flow.
Order AttributesPre-collectedOnly supported if collected prior to clicking Apple Pay. An order can be confirmed without required order attributes being provided
Zero-Value BasketsNot SupportedApple Pay requires an outstanding balance.

Customer Eligibility (Guest Flow)

Because guest customers are not authenticated until the payment is processed, Spektrix cannot verify the following during the checkout journey:

  • Customer-specific offer limits (e.g., Per Customer, Per Membership Period)
  • Priority booking periods
  • Lock Types
  • Waiving Commissions
  • Inactive customer status (Inactive customers can currently complete One-Click checkouts)