> ## Documentation Index
> Fetch the complete documentation index at: https://developers.orchestrasolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ApplePay

> Accept Apple Pay for fast, secure payments on Apple devices.

<Info>
  This page is part of **Supported Payment Methods**. [View all payment methods →](/guides/library/supported-payment-methods)
</Info>

Apple Pay enables one-tap payments on Apple devices using Face ID, Touch ID, or passcode authentication. Customers pay with cards stored in their Apple Wallet.

## Availability

Apple Pay is only available on Apple devices with Safari browser or in native iOS apps.

| Platform            | Availability |
| ------------------- | ------------ |
| Safari (macOS)      | Yes          |
| Safari (iOS)        | Yes          |
| Chrome/Firefox/Edge | No           |
| iOS apps            | Yes          |
| Android             | No           |

```javascript theme={null}
const available = await engine.checkAvailability();
if (available.includes('ApplePay')) {
  // Show Apple Pay button
}
```

## Requirements

ApplePay requires:

* A payment gateway (PSP) account from one of our [supported payment gateways](https://orchestrasolutions.com/integrations/), configured in [Orchestra Portal](https://portal.orchestrasolutions.com/#/resource/paymentGateway)
* An Apple Developer account with ApplePay enabled (see [ApplePay Setup](/guides/library/applepay-setup)), configured as an ApplePay eWallet account in [Orchestra Portal](https://portal.orchestrasolutions.com/#/resource/eWalletAccount)

```javascript theme={null}
// Server-side session creation
const session = {
  operation: 'CHARGE',
  paymentGatewayAccountId: 'yourPspAccount',
  allowedeWalletAccountIds: ['your-applepay-account'],
  allowedBrands: ['Visa', 'MasterCard', 'AMEX'],
  amount: 25.00,
  currencyCode: 'USD',
  countryCode: 'US',
  mode: 'LIVE'
};
```

## Button Setup

```html theme={null}
<div id="applepay-button"></div>
```

```javascript theme={null}
engine.payBy(
  [{ name: 'ApplePay', domEntitySelector: '#applepay-button' }],
  handleResult,
  { color: 'Dark', text: 'Pay' }
);
```

<Note>
  The Apple Pay button renders with Apple's official styling. The `color` and `text` options customize the appearance within Apple's guidelines.
</Note>

## How It Works

1. Customer clicks the Apple Pay button
2. Apple Pay sheet appears with saved cards
3. Customer selects a card and authenticates with Face ID, Touch ID, or passcode
4. Apple returns encrypted payment data to Orchestra
5. Orchestra processes the payment through your PSP
6. On completion, the popup closes and results are returned to the client, ready to be sent to your server for validation

## Supported Operations

| Operation             | Supported | Description                          |
| --------------------- | --------- | ------------------------------------ |
| `CHARGE`              | Yes       | Process payment immediately          |
| `TOKENIZE`            | Yes       | Store payment method for future use  |
| `CHARGE_AND_TOKENIZE` | Yes       | Process payment and store for future |

## 3D Secure

All ApplePay transactions are 3DS-enabled. ApplePay uses two-factor authentication (Face ID, Touch ID, or passcode) to verify the cardholder before the transaction is processed.

Orchestra automatically passes the 3DS authentication data to your PSP if the [Orchestra integration to your PSP supports 3DS](https://orchestrasolutions.com/integ-type/3d-secure/).

## Address Collection

Apple Pay can collect billing and shipping addresses from the customer's Apple Wallet:

```javascript theme={null}
const requiredAncillaryInfo = {
  billingInfo: {
    phoneRequired: true,
    emailAddressRequired: true,
    details: 'FULL'
  },
  shippingInfo: {
    phoneRequired: false,
    emailAddressRequired: false
  }
};

const engine = new eWallet.Engine(sessionToken, requiredAncillaryInfo);
```

## Related

<CardGroup cols={2}>
  <Card title="Apple Pay Setup" icon="apple" href="/guides/library/applepay-setup">
    Domain verification and merchant setup
  </Card>

  <Card title="Result Handling" icon="check" href="/guides/library/result-handling">
    Parse payment results
  </Card>
</CardGroup>
