One-Click Checkout
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 mode | System Owner mode |
|---|---|
GET /v3/basket/checkout-options | GET /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 Code | Explanation |
|---|---|
| SpektrixPaymentsNotConfigured | Adyen must be configured as the primary payment service for the Web Payment Channel. |
| BasketHasPendingPayment | The basket has a pending payment which must be completed or cancelled. |
| MembershipOnBasket | A membership item is present in the basket. |
| NoOutstandingBalance | The basket total is zero. |
| CustomerEmailDeliveryOnGiftVoucher | The delivery method for a gift voucher has been set to Customer Email. |
| NotAllowedForEventInstanceInBasket | An event instance in the basket has been set in the Admin interface to disallow One-Click Checkout. |
| NotAllowedForStockItemInBasket | A merchandise item in the basket has been set in the Admin interface to disallow One-Click Checkout. |
| NotAllowedForFundInBasket | A 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 mode | System Owner mode |
|---|---|
PATCH /v3/basket | PATCH /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 mode | System Owner mode |
|---|---|
POST /v3/basket/initiate-one-click-payment | POST /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
| Feature | Status | Note |
|---|---|---|
| Digital Wallets | Apple Pay Only | Google Pay is not supported in the current phase. |
| Memberships | Cannot be Supported for non-logged in customers | Memberships cannot be purchased; benefits cannot be applied for guest checkouts. |
| Subscriptions | Cannot be Supported for non-logged in customers | Requires an authenticated customer in the basket. |
| Gift Aid | Not Supported | Declarations cannot be captured in the Apple sheet. |
| Ticket Vouchers | Not Supported for non-logged in customers | Cannot be redeemed during the One-Click flow. |
| Order Attributes | Pre-collected | Only supported if collected prior to clicking Apple Pay. An order can be confirmed without required order attributes being provided |
| Zero-Value Baskets | Not Supported | Apple 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)