Apple Pay
Staccato supports Apple Pay for contactless payment at checkout.
Requirements
- iOS device with Apple Pay support
- At least one card added to Apple Wallet
- Merchant ID:
merchant.com.staccato.coffee
Supported Networks
- Visa
- Mastercard
- American Express
- Discover
How It Works
- At checkout, customer selects Apple Pay as payment method
ApplePayService.createPaymentRequest()builds the payment request with:- Itemized summary (subtotal, tax, tip)
- Merchant identifier
- Currency: USD, Country: US
- System presents the Apple Pay sheet
- Customer authenticates with Face ID or Touch ID
- Payment token is sent to
SquarePaymentService.processApplePayPayment() - Token is base64-encoded and sent to the
process-paymentEdge Function - Square processes the payment
- Order is created on success
Device Check
var isApplePayAvailable: Bool {
// Checks PKPaymentAuthorizationController.canMakePayments()
return true
}Debug Mode
When Square is not configured (sandbox mode), Apple Pay simulates a successful payment with a 500ms delay and returns a debug payment ID. This allows testing the full checkout flow without real payment processing.
Setup for Developers
See the Apple Pay Setup guide for:
- Creating the merchant ID in Apple Developer Portal
- Generating payment processing certificates
- Uploading certificates to Square Dashboard
- Configuring the Xcode entitlement