# Web Integration

> For the complete documentation index, see [llms.txt](https://docs.fondy.io/llms.txt).

Learn how to integrate Apple Pay payments using Fondy, enabling seamless and secure transactions for both web and mobile platforms.

Fondy provides multiple ways to integrate Apple Pay into your website, allowing merchants to choose the most suitable method for their business:

1. [Hosted checkout](https://docs.fondy.io/gateway/digital-wallets/apple-pay/hosted-checkout/): Redirects the payer to Fondy’s hosted checkout, minimizing integration effort.
2. [Embedded Apple Pay button](https://docs.fondy.io/gateway/digital-wallets/apple-pay/embedded-apple-pay-button/): Embeds the Apple Pay button directly into the merchant’s website.
3. [Direct API integration](https://docs.fondy.io/gateway/digital-wallets/apple-pay/direct-integration-with-apple-pay-api/): Allows full control over Apple Pay transactions using the Apple Pay API.

Each approach offers different levels of flexibility, complexity, and control.

## Create Apple Pay Certificates

To process Apple Pay transactions, merchants must generate and upload Apple Pay certificates for secure authentication and encryption. Merchants must generate their own CSR and keys using either Keychain Access on Mac or OpenSSL on other platforms, then send the resulting certificates to Fondy support.

### Generating a CSR on Mac (Keychain Access)

1. Open [Keychain Access](https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request) on your Mac.  
2. Navigate to **Keychain Access** > **Certificate Assistant** > **Request a Certificate from a Certificate Authority**.  
3. Enter your email address and the **Common Name** (e.g., `merchant.com.yourappname`).  
4. Select **Saved to disk** and click **Continue** to save the CSR file.    

### Generating a CSR on Other Platforms (OpenSSL) 

If you are not using macOS, you can generate a CSR using OpenSSL commands.

#### Apple Merchant Identity Certificate

```sh
openssl genrsa -out merchant.key 2048
openssl req -new -key merchant.key -out merchant.csr
```

#### Apple Processing Certificate

```sh
openssl ecparam -out processing.key -name prime256v1 -genkey
openssl req -new -sha256 -key processing.key -nodes -out processing.csr
```

### Generating Certificates in the Apple Developer Portal
  
Use the generated CSR files to obtain Apple Pay certificates.

#### Apple Pay Payment Processing Certificate 

Upload the `processing.csr` file in the Apple Developer portal under the Apple Pay Payment Processing Certificate section.

![Processing Certificate](https://docs.fondy.io/media/docs/gateway/apple-17.png)

#### Apple Pay Merchant Identity Certificate

Upload the `merchant.csr` file in the Apple Pay Merchant Identity Certificate section.

![Identity Certificate](https://docs.fondy.io/media/docs/gateway/apple-18.png)

### Final Step: Submitting Certificates to Fondy 

Once you have generated the required certificates, download them and send them to Fondy support for final setup.