# Apple Pay

{% hint style="info" %}
This page consists of steps for how **Apple Pay** can be enabled in Hyperswitch via CyberSource.
{% endhint %}

> This guide assumes that you have already configured CyberSource as a connector in your Hyperswitch Control Center. If not, please follow the steps mentioned [here](https://docs.hyperswitch.io/other-features/connectors/available-connectors/cybersource).

### Steps to Configure Apple Pay

* On your Hyperswitch Control Center, click on `Connectors > Payment Processors`.
* If you have already configured CyberSource successfully, you will land on the page as shown in the image below.

  <figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-101b51afda8cbd2be6f47189b7972f3d12d7218b%2FScreenshot%202024-03-14%20at%201.36.58%20PM.png?alt=media" alt=""><figcaption></figcaption></figure>
* Click on CyberSource and then click on `Edit Icon` to **Update** the configuration of the CyberSource connector.

  <figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-e2031c90e1f35b684786cfe8c89b71b43321e6aa%2FScreenshot%202024-03-14%20at%201.38.05%20PM.png?alt=media" alt=""><figcaption></figcaption></figure>
* Click on **Proceed** after making the necessary changes to your API Keys (if required).
* Select **Apple Pay** under the Wallet section to enable it.
* Prepare Apple Pay certificates for CyberSource by following the steps mentioned [here](#steps-to-prepare-apple-pay-certificates-for-cybersource-integration).
* To configure these steps in the Hyperswitch dashboard, please follow the steps mentioned [here](https://docs.hyperswitch.io/hyperswitch-cloud/payment-methods-setup/wallets/apple-pay/ios-application#configuring-apple-pay-on-hyperswitch).
* Click on **Enable** and then **Proceed**, review your configuration and changes, and click **Done**.

#### Points to Remember for Apple Pay Payments via CyberSource

* Required fields for Apple Pay payment requests via CyberSource:
  * Email
  * Billing Address Details
    * First Name
    * Last Name
    * Address Line 1
    * Zip/Postal Code
    * City
    * State
    * Country

{% hint style="warning" %}
We recommend passing these fields when creating the Payment Intent with Hyperswitch. Otherwise, the Hyperswitch SDK will collect this information from the customer during payment, which may not provide the best experience.
{% endhint %}

### Steps to Prepare Apple Pay Certificates for CyberSource Integration

* Create an Apple Merchant ID by following the steps mentioned [here](https://docs.hyperswitch.io/hyperswitch-cloud/payment-methods-setup/wallets/apple-pay/ios-application#creating-an-apple-merchantid).
* Validate your merchant domain by following the steps mentioned [here](https://docs.hyperswitch.io/hyperswitch-cloud/payment-methods-setup/wallets/apple-pay/ios-application#validating-merchant-domain).
* Create Apple Merchant ID certificates by following the steps mentioned [here](https://github.com/juspay/hyperswitch-docs/blob/main/other-features/wallets/apple-pay/ios-application.md#creating-apple-merchantid-certificate-and-private-key).
* Log into your CyberSource Console and navigate to `Payment Configuration > Digital Payment Solutions`.

<figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-f495f7bcf4c74ffe57bfd1ec140e94dbf802b489%2FScreenshot%202024-03-14%20at%203.26.23%20PM.png?alt=media" alt=""><figcaption></figcaption></figure>

* Click on **Configure** and add your Apple Merchant ID that you created in the steps above.

  <figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-4995c551d9321021b042b50e92a78207408f5fed%2FScreenshot%202024-03-14%20at%204.54.31%20PM.png?alt=media" alt=""><figcaption></figcaption></figure>
* Click on `Generate New Certificate Signing Request` and download the provided **.csr** file.
* Log in to your [Apple Developer account](https://developer.apple.com/account/resources/certificates/list), go to **Identifiers**, and select the Merchant ID you created previously.
* Under the **Apple Pay Payment Processing Certificate** section, click on **Create Certificate**.
* After answering whether the Merchant ID will be processed exclusively in China mainland, click on **Continue**.
* Upload the **.csr** file you received from your processor and click **Continue**.
* Click on **Download** — you will receive a **.cer** file.
* On the CyberSource Console, if prompted, upload the same **.cer** file (`apple_pay.cer`).
* Now configure the generated certificates into the Hyperswitch Control Center for CyberSource by following these [steps](https://docs.hyperswitch.io/hyperswitch-cloud/payment-methods-setup/wallets/apple-pay/ios-application#configuring-apple-pay-on-hyperswitch).

{% hint style="info" %}
To enable Apple Pay in your iOS application, please refer to the steps mentioned [here](https://docs.hyperswitch.io/hyperswitch-cloud/payment-methods-setup/wallets/apple-pay/ios-application#integrate-with-xcode).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperswitch.io/other-features/connectors/available-connectors/cybersource/apple-pay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
