Test Apple Pay in sandbox mode

Sandbox mode is a stand-alone environment that includes all features of the production environment (live mode) except for user authorization and the ability to make real payments. You can access sandbox mode by sending “sandbox”: true when getting a token.

To open the payment UI, use this link and specify the obtained token as a query parameter: https://sandbox-secure.xsolla.com/paystation4/?token={token}.

In sandbox mode, you can test the following payment UI interaction scenarios for Apple Pay:

Apple Pay test account

Prerequisites

Before creating a test account, you need to configure an Apple developer account. To do this:

  1. Register your Merchant ID.
  2. Create your Payment Processing Certificate or obtain a certificate signing request (CSR) from your payment service provider (PSP).
  3. To accept payments in a browser:

    a. Create a Merchant Identity Certificate.

    b. Register and verify your domain.

    c. Verify that all web pages hosting an Apple Pay button use the HTTPS protocol and that your web server supports the TLS 1.2 encryption protocol.

Note
Refer to the Apple documentation for detailed information about configuring a developer account.

Create test account

To test the payment process, you need to create an Apple Pay sandbox account:

  1. Log in to your account in Apple Store Connect.
  2. Go to the Users and Access section.
  3. On the Sandbox tab, add a test account:
    • If you already have a test account, click the + icon and fill in the information about a test user.
    • If you don’t have a test account, click Create Test Accounts and fill in the information about a test user.
Notice
For a test account, you can’t use an email that is already linked to an active Apple account or has been used for purchases in iTunes or App Store.
  1. Click Create.

The account you created appears in the test account list. For testing, log in to it on your test Apple devices (mobile or desktop) and add test cards.

Note
Refer to the Apple documentation for detailed information about creating a test account.

Testing scenarios

Test payment in Safari browser

To test payment via Apple Pay in the Safari browser:

  1. Open the payment UI in sandbox mode.
  2. Click the Apple Pay button.
  3. Go to Apple Pay on your mobile or desktop device and complete the payment with a test card.

The transaction ID is shown on the page after completing the payment.

To see detailed information, including fees, about transactions made in sandbox mode:

  1. In your Publisher Account, go to the Accounting > Transaction registry section.
  2. Set the Show test transactions toggle to active.

Additionally, you can see the transactions’ details and request refunds in Publisher Account in the Support > Transaction search section.

Test payment in browser via QR code

If you test a payment via Apple Pay in a browser other than Safari:

  1. Open the payment UI in sandbox mode.
  2. Click the Apple Pay button.
  3. Use your iPhone to scan the QR code that appears.
  1. Go to Apple Pay on your iPhone and complete the payment with a test card.
The transaction ID is shown on the page after completing the payment.

Refund

  1. Configure the Refund webhook.
  2. Make a successful test payment.
  3. Call the Request refund API method.

A notification about the payment refund will be sent to the webhook URL.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: July 4, 2025

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!
We couldn't send your feedback
Try again later or contact us at [email protected].
OSZAR »