In this guide we will show you how to enable Apple Pay in just a few short steps. Since the 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
- Click the blue
+sign button that is next to the
Identifierspage 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
- 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.
Updating Your Apple Pay Certificate
Apple requires you to update your Apple Pay certificate every 25 months. If you received an email from Skillz or Apple stating that your current certificate will expire soon, follow the steps below to ensure Apple Pay continues to work in your title.
Generate a New Certificate
- Following the steps above, create a new apple pay certificate
NOTE: you should NOT create a new merchant ID for your title. Doing so will disrupt the existing apple pay service in your title
- In the Apple Developer Console, click
ACTIVATEon your newly created certificate
- Download your certificate and export it as a
.p12file per the instructions above
- Upload your new
.p12file to the Skillz Developer Console. Be sure it is set as enabled
NOTE: Apple does not immediately start using your newly activated certificate. In order to minimize the duration of time Apple Pay does not work in your title, WAIT to upload your newly created
.p12file to Developer Console until AFTER Apple confirms via email that your old certificate has been revoked
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.
Inspect the Game IPA file for the
In App Payments Entitlement
If you did all the above steps and you still cannot see the Apple Pay, perhaps you should inspect your game's IPA file and see if the
In App Payments entitlement is present.
Note: Let's assume that your IPA is in the
~/Downloads folder and it's called
Follow these steps to extract the IPA files:
# Unzip the IPA to the DiamondStrike folder
unzip ~/Downloads/DiamondStrike.ipa -d ~/Downloads/DiamondStrike
Now, you can use the
codesign command to extract the entitlements from the app:
# Extract entitlements from the app
codesign -d --entitlements :- ~/Downloads/DiamondStrike/Payload/DiamondStrike.app | xmllint --format -
If done correctly, the above command will spit out XML text similar to the following (keep in mind that the output you get is unique to you):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
If you don't see the
<key>com.apple.developer.in-app-payments</key> line, this means that the In App Payments entitlement is not present in your app.
If that's the case, then you should try the following steps to attempt to enable Apple Pay:
- Regenerate your provisioning profile.
- Update your Xcode project with your provisioning profile.
- Create a new IPA with your provisioning profile.
- Check for the In App Payments entitlement in the IPA using the steps mentioned above.
If you see the In App Payments entitlement, you should be ready to follow the steps in Test Apple Pay to test that Apple Pay works in your device.