Presents the Apple Pay sheet and resolves with a payment token upon user authorization. Amounts are specified in integer cents (e.g., 1999 for $19.99).
Example:
// Apple Pay minimal example
const result = await Eitri.exposedApis.applePay.pay({
countryCode: "US",
currencyCode: "USD",
shippingMethods: [
{ identifier: "standard", label: "Standard Shipping", amount: 150, detail: "5-7 business days" }
],
summaryItems: [
{ label: "Subtotal", amount: 300 },
{ label: "Shipping", amount: 150 },
{ label: "Total", amount: 450, type: "final" }
],
})
Output:
{
paymentData: "<REDACTED>",
paymentMethod: {
type: "credit",
network: "MasterCard",
displayName: "MasterCard 1111"
},
transactionIdentifier: "<REDACTED>"
}
Functions that allow an Eitri-App to initiate Apple Pay on iOS devices.