ApplePayGateway

class ApplePayGateway(config: ApplePayConfig = ApplePayConfig()) : WalletGateway(source)

Apple Pay, through PassKit directly — there is no Apple Pay SDK to depend on, PKPaymentRequest and PKPaymentAuthorizationController are the integration.

Apple Pay does not settle money. It returns an encrypted WalletToken that a PSP with the matching payment-processing certificate decrypts and charges, which is why this sits behind the same prepare/pay split as every card gateway: the backend still creates the order, and a client-side success here is still only a hint.

Ships GatewayStatus.KYC_GATED and reports WalletAvailability.NOT_CONFIGURED until a real merchant.* identifier replaces APPLE_MERCHANT_ID_SENTINEL. A merchant id needs an Apple Developer Program membership, so there is no solo-runnable sandbox to pretend otherwise about.

docs: https://developer.apple.com/documentation/passkit/pkpaymentauthorizationcontroller

Constructors

Link copied to clipboard
constructor(config: ApplePayConfig = ApplePayConfig())

Properties

Link copied to clipboard
open override val id: GatewayId
Link copied to clipboard
Link copied to clipboard
open override val meta: GatewayMeta

Functions

Link copied to clipboard
open suspend override fun availability(host: PaymentHost): WalletAvailability

Whether the sheet can be presented, asked before anything is drawn.

Link copied to clipboard
open suspend override fun pay(host: PaymentHost, prepared: PreparedPayment): PaymentResult
Link copied to clipboard
open suspend override fun prepare(created: CreatedOrder): PreparedPayment