---
title: "Creating a Payment with Apple Pay (encrypted)"
source_url: https://docs.rapyd.net/en/creating-a-payment-with-apple-pay--encrypted-.html
lang: en
---

# Creating a Payment with Apple Pay (encrypted)

This procedure describes how to create a payment with an encrypted Apple Pay payload.

Initiate this process with a call to the Rapyd API.

Prerequisites

- Completion of the Rapyd onboarding process. See [Activating Your Account (KYB)](https://docs.rapyd.net/en/activating-your-account--kyb-.md "Activating Your Account (KYB)").
- Check the relevant country's payment methods that support Apple Pay as a digital wallet provider via the [List Payment Methods by Country](https://docs.rapyd.net/en/list-payment-methods-by-country.md "List Payment Methods by Country") request. For information about Apple Pay support for a specific payment method, contact [Rapyd Client Support](https://support.rapyd.net/).
- Activation of Apple Pay in the Client Portal. See [Activating Apple Pay](https://docs.rapyd.net/en/activating-apple-pay.md "Activating Apple Pay").
- A digital wallet. Generate the transaction details using Apple Pay's process.

URL

post {{base_url}}/v1/payments

Request Body

```json
{
    "amount": 10,
    "currency": "USD",
    "description": "encrypted payload",
    "payment_method": {
        "type": "by_visa_card",
        "address": null,
        "digital_wallet": {
            "type": "apple_pay",
            "details": {
                "token": {
                    "paymentData": {
                        "data": "V7OcjttPJnUJaQH7x7OjbIeZSINuc...pm+2RquBArCp71Z9CPSGwQ6bfcq09Dwsw3WJ0RGg=",
                        "signature": "MIAGCSqGSIb3DQEHAqCAM...xCzAJBgNVBAY3Sbrb7MpYRdEAAAAAAAA=",
                        "header": {
                            "publicKeyHash": "L6vppo38t31Q/9npxRy/xbA1+cs13h1LV+pMO/FYwvo=",
                            "ephemeralPublicKey": "MFkwEwYHKoZI...sum3onbZcAU/4Q==",
                            "transactionId": "4f4fac7a1...a6a8ba2c0e8c5"
                        },
                        "version": "EC_v1"
                    },
                    "paymentMethod": {
                        "displayName": "MasterCard 1512",
                        "network": "MasterCard",
                        "type": "credit"
                    },
                    "transactionIdentifier": "4F4FAC7A10474...8BA2C0E8C5"
                }
            }
        }
    }
}
```

> **Note:**
>
> You must use the entire `token` object that you got from Apple Pay, without any changes. The example here has truncated some of the long values for clarity.
