Skip to content

Apple Pay

This guide explains how to implement Apple Pay payments with xMoney. Our API provides flexible options for accepting Apple Pay payments through different integration methods.

Overview

Integrate Apple Pay with xMoney to provide a seamless checkout experience for your customers. This guide will walk you through the steps needed to integrate Apple Pay into your website using Twispay/xMoney as the payment processor.

Since September 2019, the Strong Customer Authentication (SCA) regulation has required businesses across Europe to implement additional authentication measures for online payments.

Apple Pay fully complies with SCA, as its payment process already includes a built-in authentication layer, such as biometric verification (Face ID, Touch ID) or passcode authentication.

By integrating Apple Pay, you agree to Apple's terms of service.

Prerequisites

Before you begin, ensure you have the following:

  1. xMoney merchant account.

With your account, you will be given a siteId and a secret unique key (aka apiKey). This key is used to authenticate and communicate with our servers securely. The apiKey can be found in the merchant account on the following url: https://merchants.xmoney.com

For test accounts use the Sandbox environment from the Merchant Dashabord

Under the "Sites" menu – clicking the number found at column # will bring up a site details window. The apiKey is listed in the Website details view as "Private key"

Note:

  • The apiKey is unique for each website – if you had a test account, the apiKey used for tests is not the same as the one you will need to use for the live environment.
  • Integrate Apple Pay API with xMoney as your gateway. Follow the procedure in the Apple Pay documentation to integrate your web application.
  1. A website running on HTTPS (Apple Pay requires a secure connection).
  2. A working xMoney integration with our checkout secure page or directly with our API.

For checkout secure page you can find details on how to configure an order request using our documentation found here

For API (server to server) integration details can be found here

Supported card networks are:

  • Visa
  • Mastercard

Accept a payment using Apple Pay in your Website

Below is the option best suited for your integration. Please refer to Apple's branding guidelines to correctly incorporate the Apple Pay brand on your website.

The Apple Pay digital wallet button will be displayed on our checkout payment page. To enable this feature, we will activate the option in your account. If you encounter any issues, please contact support@xmoney.com to confirm that Apple Pay has been activated.

Merchants must adhere to the Apple Pay Acceptable Use Guidelines for Websites.


Accept a payment using Apple Pay in your iOS App

Prerequisites

Your app must:

More details about how to configure the app can be found on the official Apple Pay Programming Guide.

1. Setup your integration

To start the setup follow this guide.

For requesting a payment token you will need to use the following:

  • Make sure your merchant identifier is properly configured
  • You have the necessary certificates for payment processing

Supported card networks are:

  • Visa
  • Mastercard

2. Add the Apple Pay button

Add the Apple Pay button to your app by following Apple's guidelines. This ensures you're using the correct button style and appearance.

3. Handle the result

  • Get the payment token from the payment authorization
  • From your API make a POST /order request to xMoney API and include the token info in transactionOption as shown below:
{
  "digitalWallet":{
    "walletType":"applePay",
    "data": "insert your received encrypted payment token from Apple Pay here (Base64 encoded)"
  }
}

4. Test your integration

Follow Apple's guidelines for testing your Apple Pay integration.

5. Go live with Apple Pay

Follow Apple's instructions to prepare your app for production and submission to the App Store.


Go Live

  • Ensure your xMoney API keys are correct for production.
  • Test real transactions to confirm proper payment processing.
Keep your Private Key safe!

Your Private Key is a sensitive piece of information. Never share it publicly or expose it in client-side code. Anyone with access to your Private Key could potentially make unauthorized transactions on your behalf.

Additional Resources

By following these steps, you will have a functional Apple Pay integration with xMoney, offering customers a smooth and secure checkout experience.