Skip to main content
Version: 26.2.9

Setting Up Apple Pay

Skillz supports Apple Pay but requires some additional steps to get it up and running in your game. In this guide we will show you how to enable Apple Pay in just a few short steps. Since the following steps require using Keychain, they must be performed on a Mac.

Setup a Merchant ID

Apple Pay requires that you create a Merchant ID that will be associated with your app's bundle ID.

Generate a Merchant ID

Register a Merchant ID via the Apple Provisioning Portal.

  • Go to the Apple Developer dashboard and log in.
  • Navigate to "Identifiers".
  • Click the blue + sign button that is next to the "Identifiers" page title. This will take you to the "Register a New Identifier" page.
  • Select Merchant IDs and click Continue.
  • Provide a description and ID. A typical convention for the ID is merchant.com.<your_apps'_bundle_id>.
  • Click Continue and if the information looks good, click register.

After registering a Merchant ID, you will then need to enable Apple Pay for your game’s App ID on the Apple Developer Dashboard.

  • Go back to the "Identifiers" page.
  • Find the bundle ID for your app, and click it to be taken to the "Edit your App ID Configuration" page.
  • Check the checkbox that is next to the "Apple Pay Payment Processing" item under the "Capabilities" section.
  • Click the now enabled "Edit" button to bring up a list of available Merchant IDs.
  • Find the Merchant ID that was created earlier and check it.

Create a Payment Processing Certificate

Next, a Payment Processing Certificate must be created.

Make a Certificate Signing Request (CSR)

You will need to generate a Certificate Signing Request file with specific key pair settings using Keychain Access.

  • On your Mac, open Keychain Access.
  • In the menu bar go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority....
  • Input your preferred email address.
  • Select Saved to Disk.
  • Check Let me specify key pair information.
  • Press Continue.
  • Choose a location to save the .certSigningRequest file, and give it a name.
  • Select Algorithm ECC.
  • Select Key Size 256 Bits.
  • Press Continue.

NOTE: You must select ECC before the 256 Bits option becomes available.

Generate the Certificate

Now generate your certificate using the CSR you generated via Keychain Access earlier.

  • On the Apple Developer dashboard navigate to Certificates.
  • Click the blue + sign next to the "Certificates" page title. This will take you to the "Create a New Certificate" page.
  • Select Apple Pay Payment Processing Certificate and click Continue.
  • Select the Merchant ID you created and click Continue.
  • Under "Apple Pay Payment Processing Certificate" click Create Certificate.
  • You may be taken to a page "Edit or Configure Merchant ID" - which asks "Will payments associated with this Merchant ID be processed exclusively in China?". Skillz does not operate in China. So answer no, then click Continue.
  • On the "Create a New Certificate" page upload the .certSigningRequest from the first section. Click Continue.
  • You will be taken to a confirmation page titled "Download Your Certificate". Make sure to press the Download button and save your certificate file.

Download the resulting certificate file (.cer), which you will turn into a .p12 file in the next step.

Upload to the Developer Console

You now need to upload a copy of your Payment Processing Certificate to the Skillz Developer Console.

Export the Certificate as a .p12

The certificate you have downloaded is a .cer file, which you will need to export as a .p12 file before uploading to Skillz.

  1. Once you have downloaded the .cer, open Keychain Access on your computer.
  2. Import the certificate you created in the previous step by selecting File -> Import Items.
  3. Select the Certificates category.
  4. Select your game’s APNS certificate:
  5. Select File -> Export Items.
  6. Save as a Personal Information Exchange (.p12) file.
  7. You will be prompted to create a password. Make note of this password, as you will need it when you upload to Skillz.
  8. Save the file in a secure place so that you can retrieve it later.

After you create a .p12 file from the Apple provided .cer, you can upload the .p12 file and provide the password to Skillz on our Apple Pay page under the Configuration section.

Update Your XCode Project

For final steps, your XCode project will need to be updated.

Update the Entitlements File in Xcode

You will now need to update your entitlements file in Xcode to enable Apple Pay in your binary.

Begin by regenerating and re-downloading the provisioning profiles for your game in the Apple Provisioning Portal. This will ensure they have all updated information regarding Apple Pay. In Xcode, open the "Signing and Capabilities" tab for your game’s target, click the "+ Capability" button and select Apple Pay. Finally, select the Merchant ID you created earlier.

Confirm the proper entry has been added to the entitlements file for your game.

Add PassKit to Your Xcode Project

Finally, add PassKit as a weakly linked framework to your project. To do so, select PassKit in the Link Binary With Libraries section of your project’s Build Phases and mark it as Optional.

Test Apple Pay

You should now be able to complete a deposit via Apple Pay.

When testing Apple Pay, be sure that:

  • You are on a device that supports Apple Pay
  • You have Apple Pay setup on your device
  • The credit card on file is supported by Skillz (Visa, Mastercard)

NOTE: We only show the Apple Pay button to players if they meet the above conditions.

You will then need to test Apple Pay using a real credit card. Your card will not be charged as long as the game is running in the Sandbox environment. You can use this credit card number when testing in Skillz's Sandbox environment.

Troubleshooting

Not seeing the Apple Pay button? Make sure you've done the following:

  • Enabled Apple Pay your app ID in your Apple Developer account.
  • Created a Merchant ID and linked it to your app's bundle ID.
  • Generated a Payment Processing Certificate.
  • Provided the correct password for your p12 to the Developer Console.
  • Regenerated your provisioning profile.
  • Updated your XCode project with the regenerated provisioning profile.
  • Added the "Apple Pay" capability in your XCode project with the Merchant ID selected.