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.
Merchant IDsand click
- Provide a description and ID. A typical convention for the ID is
Continueand if the information looks good, click
Link the Merchant ID to Your Bundle ID
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
- 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
NOTE: You must select
256 Bitsoption 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.
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.
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.
- 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 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.
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.