---
title: "Retrieve Apple Pay Session"
source_url: https://docs.rapyd.net/en/retrieve-apple-pay-session.html
lang: en
---

# Retrieve Apple Pay Session

Retrieve the details of an Apple Pay payment session.

Each payment that uses Apple Pay has a unique session.

Prerequisite: [Activating Apple Pay](https://docs.rapyd.net/en/activating-apple-pay.md "Activating Apple Pay")

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Body Parameters

- - display_name
  - The canonical name for the client's business, suitable for display. 64 or fewer UTF-8 characters.

    Relevant to Apple Pay.
- - initiative_context
  - The client's fully qualified domain name, without the final period. For example, **acmegeneralproducts.rapyd.net**

### Response Parameters

- - displayName
  - The canonical name of the client's business.
- - domainName
  - The domain name of the client's ecommerce site.
- - epochTimestamp
  - Time of creation of the Apple Pay session, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - expiresAt
  - Time of expiration of the Apple Pay session, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - merchantIdentifier
  - Your Apple Pay merchant ID.
- - merchantSessionIdentifier
  - Your Apple Pay session ID.
- - nonce
  - A string that uniquely identifies each call to Apple Pay.
- - retries
  - The number of previous attempts to get an Apple Pay Session object.
- - signature
  - Digital signature that validates the authenticity and integrity of a digital wallet payment.

- /v1/digital_wallets/session/apple_pay

- Retrieve Apple Pay Session
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/digital_wallets/session/apple_pay' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "display_name": "Acme General Products",
      "initiative_context": "acmegeneralproducts.rapyd.net"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "1d6372ba-530d-4195-be1e-ef50d91d0f91"
      },
      "data": {
          "epochTimestamp": 1646630045189,
          "expiresAt": 1646633645189,
          "merchantSessionIdentifier": "SSHAF97FDFD687E4E308A5DF0D252842CCF_916523...",
          "nonce": "7c059ca3",
          "merchantIdentifier": "2CA5870D7643C62D793F32133FFB35E85B69D1E23EEB49EBB989976C4A3F3367",
          "domainName": "www.acmegeneralproducts1234.com",
          "displayName": "Acme General Products",
          "signature": "308006092a864886f70d010702a08...",
          "operationalAnalyticsIdentifier": "name:2CA5870D7643C62D793F32133FFB35E85B69D1E23EEB49EBB989976C4A3F3367",
          "retries": 0
      }
  }
  ```

> **Note:**
>
> In the example response, the `merchantSessionIdentifier` and `signature` are truncated.

### Related Information

- [Customizing Hosted Pages with Apple Pay](https://docs.rapyd.net/en/customizing-hosted-pages-with-apple-pay.md "Customizing Hosted Pages with Apple Pay")
- Refer to this Apple Pay article: [Requesting an Apple Pay Payment Session](https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/requesting_an_apple_pay_payment_session).
