Accepting Apple Pay in Your iOS App

    To submit an app with Apple Pay to the App Store, you need to register a merchant ID with Apple and add the necessary entitlements to your app. This article will help you with every step of the setup process.

    Looking to integrate Apple Pay on your website? Read our Payment Request Button guide instead.


    To begin, you'll need a newer iOS device (iPhone 6 or 6+, iPad Air 2, or iPad mini 3) running iOS 8.1 or later, as well as a Mac with Xcode 6.1 or newer installed. You can install or upgrade Xcode in the Mac App Store.

    You'll also need an Apple Developer Account, as well as a membership in the iOS Developer Program. If you need to become a member, you can do so here.

    Using Stripe and Apple Pay vs. in-app purchases

    You can use any of Stripe's supported payment methods and Apple Pay in your iOS app to sell physical goods (e.g., groceries or clothing) or for services your business provides (e.g., club memberships or hotel reservations). These payments are processed through Stripe and you only need to pay Stripe's processing fee.

    Apple's developer terms require that the In-App Purchase API be used for digital "content, functionality, or services", such as premium content for your app or subscriptions for digital content. Payments made using the In-App Purchase API are processed by Apple with a fee of 30% of the total transaction.

    Registering for an Apple Merchant ID

    First, you'll need to obtain an Apple Merchant ID. Start by heading to the Registering a Merchant ID page on the Apple Developer website.

    Fill out the form with a description and identifier. Your description is for your own records and can be modified in the future (we recommend just using the name of your app). The identifier must be unique (across all apps, not just yours) and can't be changed later (although you can always make another one). We recommend using{your_app_name}. Save this value for later use when developing your app.

    Creating a new Apple Pay certificate

    You need to include a certificate in your app to encrypt outgoing payment data. This involves 3 steps:

    1. Obtain a CSR (certificate signing request) file from Stripe
    2. Use this CSR to generate a certificate through Apple
    3. Upload the certificate back to Stripe

    First, head to the Apple Pay Settings page in the Dashboard. Choose Add new application and download the .certSigningRequest file.

    Next, back on the Apple Developer site, visit the Add iOS Certificate page. Choose Apple Pay Certificate from the options and click Continue. On the next page, choose the Merchant ID you created earlier from the dropdown and continue.

    The next page explains that you can obtain a CSR from your Payment Provider (which at this point you've done already) or create one manually. Important note: you must use the CSR provided by Stripe - creating your own won't work. So ignore the directions at the bottom of this page and continue on.

    You'll be prompted to upload a .certSigningRequest file. Choose the file you downloaded from the Dashboard and continue. You'll see a success page, with an option to download your certificate. Download it. Finally, return to the Dashboard and upload this .cer file to Stripe.

    Integrating with Xcode

    The last step of this process is to add the Apple Pay capability to your app. In Xcode, open your project settings, choose the Capabilities tab, and enable the Apple Pay switch. You may be prompted to log in to your developer account at this point. Enable the checkbox next to the merchant ID you created earlier, and you're done!

    Xcode capabilities pane

    Enable the Apple Pay capability in Xcode


    If you're seeing errors from the Stripe API when attempting to create tokens, there's likely something wrong with your Apple Pay Certificate. You'll need to generate a new certificate and upload it to Stripe, as described above. Make sure you use a CSR obtained from your Dashboard and not one you generated yourself. Xcode often incorrectly caches old certificates, so in addition to generating a new certificate, we recommend creating a new Apple Merchant ID as well.

    If you receive the error "You haven't added your Apple merchant account to Stripe", it's likely your app is sending data encrypted with a previous (non-Stripe) CSR/Certificate. Make sure any certs generated by non-Stripe CSRs are revoked under your Apple Merchant ID. If this does not resolve the issue, delete the merchant ID in your Apple account and recreate it. Then, create a new certificate based on the same (Stripe-provided) CSR that was previously used. You do not need to re-upload this new certificate to Stripe. Once done, toggle the Apple Pay Credentials off and on in your app to make sure they refresh properly.

    Next steps

    You're now ready to start writing payment code and charging your users using Apple Pay. For next steps, including code examples, see our iOS tutorial.


    We're always happy to help with code or other questions you might have! Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode

    Was this page helpful? Yes No


    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.