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.
Generate the Certificate Signing Request (CSR)
First, you will need to generate a CSR file with specific key pair settings using Keychain Access.
Key Size will be specified as
256 bits, and
Algorithm will be specified as
- On your Mac, open
- In the menu bar go to
Request a Certificate from a Certificate Authority....
- Input your preferred email address
Saved to Disk
Let me specify key pair information
- Choose a location to save the
.certSigningRequestfile, and give it a name.
- Select Algorithm
- Select Key Size
256 Bits** NOTE: You MUST select
256 Bitsoption becomes available
Register a Merchant ID
Register a Merchant ID via the Apple Provisioning Portal. Typically this follows a pattern similar to bundle id (e.g.,
- Go to the Apple Developer dashboard and log in
- Navigate to "Identifiers"
- Next to the page title "Identifiers" click the blue
+sign button to be taking to the "Register a New Identifier" page
Merchant IDsand click
- Provide a description and ID. Typically this follows a similar to pattern to bundle id (e.g,
Continueand if the information looks good, click
After registering a Merchant ID, you will then need to enable Apple Pay for your game’s App ID on the Apple Developer Dashboard.
Next you will need to generate your certificate using the CSR you generated via Keychain Access earlier.
- On the Apple Developer dashboard navigate to Certificates
- Next to the page title "Certificates" click the blue
+sign button to be taking to the "Create a New Certificate" page
Apple Pay Payment Processing Certificateand click
- Select the Merchant ID you created and click
- Under "Apple Pay Payment Processing Certificate" click
- 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
- On the "Create a New Certificate" page upload the
.certSigningRequestfrom the first section. Click
- You will be taken to a confirmation page titled "Download Your Certificate". Make sure to press the
Downloadbutton and save your certificate file.
Download the resulting certificate file (
.cer), which you will turn into a
.p12 file in the next step.
Change Certificate to a .p12
The certificate you have downloaded is a .cer file, which you will need to change to a .p12 file before uploading to Skillz.
- Once you have downloaded the
Keychain Accesson your computer.
- Import the certificate you created in the previous step by selecting
File -> ImportItems.
- Select the Certificates category.
- Select your game’s APNS certificate:
File -> ExportItems.
- Save as a
Personal Information Exchange (.p12)file.
- You will be prompted to create a password. Make note of this password, as you will need it when you upload to Skillz.
- 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 the Entitlements File in Xcode
You will now need to update your entitlements file in Xcode.
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 capabilities tab for your game’s target, and enable Apple Pay. 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. This can be done one of two ways described below. These options are identical in effect, it’s up to personal preference.
weak_framework PassKit to
Other Linker Flags in your project’s Build Settings.
Add PassKit to
Link Binary With Libraries section of your project’s Build Phases, and mark as Optional.
You should now be able to complete a deposit via Apple Pay!
Test 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)
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. But don’t worry, as long as the game is running in the
Sandbox environment, your credit card will not be charged!