---
title: Testing Apple Pay™ Wallet - via Mobile SDK
slug: testing-apple-paytm-wallet-via-mobile-sdk
docTags: 
createdAt: 2024-06-11T08:25:49.822Z
---

## Prerequisites

- Before you can process Apple Pay™ payments and preAuths with Judopay, you will need to set up your [Apple Pay™ account](docId:09p1crU0CbxJkzEa-0ZPI) to:
  - Get your Merchant IDs.
  - [Create your Apple Pay™ certificate](docId:09p1crU0CbxJkzEa-0ZPI).
  - [Set up the Apple Pay™ entitlement](docId:09p1crU0CbxJkzEa-0ZPI).

***

## Apple Pay™ Wallet Scenarios (Positive Flow)

:::hint{type="info"}
Depending on you&#x72;**&#x20;use case and app configurations**, some of the following scenarios may not be relevant to you.
:::

Follow our suggested guidelines to simulate positive / happy path scenarios, to test your integration is working correctly. This will give you confidence for when your integration goes live.

### Important to Consider

- For a successful end-to-end wallet payment testing journey, it is recommended to:
  - Perform wallet test scenarios in a production environment
  - Use **live&#x20;**&#x63;ards to process test payments and preAuths.

:::hint{type="warning"}
**\***&#x54;hese images are from our dummy app, your interface may look different.
:::

***



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Test Scenario**

Process an Apple Pay™ wallet:

- payment
- preAuth

***

<font color="#6a4ee1">**TIP**</font>:
The app is using the payment / preAuth flow, which has been set up in the payment configuration object.

We suggest checking the following options have been configured correctly:

- Merchant Name
- Billing address phone no
- Shipping address
- Shipping address phone no
- Email address

For more information on configuring your app, see [Configuring Apple Pay for iOS](docId:09p1crU0CbxJkzEa-0ZPI).
:::

:::VerticalSplitItem
**Expected Outcome**

You will be directed to a successful transaction completed page.

**\***

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/vmdtEe_7Cw6GwCfpSUJ5b_ap-success.png" size="52" width="1458" height="3087" position="flex-start" alt="apple pay success" showCaption="false"}
:::
::::

***

**The below is a typical end user flow when making an Apple Pay™ wallet payment:**

![apple pay mobile payment flow](https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/ZgkRHZEJrfvYG0b89KetL_ap-wallet-mobile.png)

***

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Test Scenario**

Process a wallet:

- payment
- preAuth&#x20;

request to test the Apple Pay™ payment method is correctly configured and supported.

***

<font color="#6a4ee1">**TIP**</font>:
Your Judopay account **and&#x20;**&#x79;our app have been configured to support the **Apple Pay™&#x20;**&#x70;ayment method.


:::

:::VerticalSplitItem
**Expected Outcome**

The Buy with Apple Pay™ button will be displayed:

**\***

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/rsJFWuDnmbndlAIPbVL7r_buy-with-ap-189x402.png" size="62" width="189" height="402" position="flex-start" alt="buy with apple pay button" showCaption="false"}
:::
::::

***

### Test Card Data

To simulate a successful request, us&#x65;**&#x20;live cards** to process test payments and preAuths in a production environment.

:::hint{type="info"}
The card **will not** be charged when processing test payments in a production environment.
:::

***

### Calling the Mobile SDK Functions

For more information on integrating your iOS app, including calling the Mobile SDK functions see [Integrating with Judopay](docId:09p1crU0CbxJkzEa-0ZPI).

***

## Apple Pay™ Wallet Scenarios (Negative Flow)

Declines can occur for various reasons, it can be impossible to simulate all the negative flows.&#x20;
Depending on your use case and app configurations, some of the following scenarios may not be relevant to you.

Follow our suggested guidelines to simulate negative scenarios, to test your app’s error handling. This will give you confidence for when your integration goes live.

### Important to Consider

- How your app handles negative flows
- Your customer's experience should a negative flow occur:
  - Logic to communicate error messages
  - Customise how your app responds
- How to maintain application consistency

:::hint{type="warning"}
**\***&#x54;hese images are from our dummy app, your interface may look different.
:::

***



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**Suggested Negative Test Scenario**

To handle a decline scenario, attempt to perform a Apple Pay™ wallet:

- payment
- preAuth&#x20;

request where the user cancels the payment.
:::

:::VerticalSplitItem
**Expected Error**

Depending on how your app has been configured to respond, you may redirect the user to:

- their cart
- an error page displaying an error message

**\***

::Image[]{src="https://api.archbee.com/api/optimize/QGXTyW3MgdNcMjdEa0v8r/fvWUAG8kiTZio--cdwlD4_ap-decline.png" size="86" width="3473" height="3173" position="flex-start" alt="apple pay user cancels" showCaption="false"}
:::
::::

