Apple Pay
Set up Apple Pay in OnsideKit using a Merchant ID, an Apple-generated certificate, and your app's Apple Pay capability.
Apple Pay gives users a fast, secure way to pay with OnsideKit.
Apple Pay is available in the full OnsideKit product only. OnsideKitLite ships without PassKit, so it has no Apple Pay and the Onside.applePayMerchantIdentifier API does not exist there. See OnsideKit vs OnsideKitLite.
Apple Pay is required for consumable purchases by external profiles. If it is unavailable, the payment queue rejects the purchase with .applePayRequired before creating a transaction. A device without a supported card may be directed to Wallet setup during payment; passing the pre-flight check does not guarantee a completed charge.
Enabling Apple Pay takes four steps:
Create a Merchant ID in Apple Developer.
Generate an Apple Pay Payment Processing Certificate for that Merchant ID.
Send the certificate to Onside.
Configure OnsideKit and your app with the same Merchant ID.
Step 1: Create a Merchant ID
The Merchant ID identifies your Apple Pay merchant configuration. You'll reuse this exact value in your app and in your Onside configuration.
Sign in to your Apple Developer account.
Open Certificates, Identifiers & Profiles → Identifiers.
Click +, select Merchant IDs, and click Continue.
Enter a unique Merchant ID, click Continue, review, and click Register.
Step 2: Generate the Apple Pay Payment Processing Certificate
Apple must issue an Apple Pay Payment Processing Certificate for your Merchant ID. This requires a Certificate Signing Request (CSR) that Onside provides — do not create your own CSR.
Request the CSR from Onside
Email merchant-support@onside.io and include:
your app name
your Merchant ID from step 1
your Onside account or publisher name
Keep the CSR file Onside sends you unchanged.
Generate the certificate in Apple Developer
Sign in to your Apple Developer account.
Open Certificates, Identifiers & Profiles → Identifiers.
Select the Merchant ID you created.
Open Apple Pay Payment Processing Certificate and start the generation flow.
Upload the CSR file provided by Onside.
Complete the process and download the generated certificate.
You must use the CSR from Onside. If you upload a different CSR, Onside cannot use the generated certificate for your integration.
Step 3: Send the certificate to Onside
Onside uses this certificate to decrypt Apple Pay tokens during transactions. Email the generated certificate file to merchant-support@onside.io and include:
the certificate file you downloaded from Apple
your app name
your Merchant ID
your Onside account or publisher name
Step 4: Configure your app
Once Onside has processed your certificate, configure the same Merchant ID in your app.
Set the merchant identifier in OnsideKit
Set Onside.applePayMerchantIdentifier to your Merchant ID — after Onside.initialize(), and before you present any purchase UI:
applePayMerchantIdentifier must be set after Onside.initialize() (the property requires an initialized SDK) and before the first purchase, so Apple Pay is available when the purchase flow starts.
Enable the Apple Pay capability in Xcode
Adding the capability generates the merchant entitlement your app needs to present Apple Pay:
Open your app target and go to Signing & Capabilities.
Click + Capability and add Apple Pay.
In the Apple Pay configuration, select the Merchant ID from step 1.
Apple Pay now appears as a payment option in the OnsideKit purchase flow. See Making a Purchase.
Last updated
Was this helpful?