Apple Pay Integration guide with Edfapay

Overview

This guide explains how to integrate Apple Pay with EdfaPay on mobile apps and websites. The process involves three steps: generating a certificate, verifying your domain (web only), and submitting the certificate to EdfaPay for backend configuration.


Prerequisites

RequirementDescription
Apple Developer AccountActive account with access to Certificates and Merchant IDs
OpenSSLInstalled on your machine for generating keys and CSRs
EdfaPay AccountActive merchant account
Public DomainRequired for web integrations only

Mobile vs. Web

Mobile (App)Web (Browser)
CertificatePayment ProcessingMerchant Identity
Key AlgorithmEC (prime256v1)RSA (2048-bit)
Domain VerificationNot requiredRequired

Step 1 — Generate Your Certificate

Generate an EC private key:

openssl ecparam -out merchant_private_key.pem -name prime256v1 -genkey

Generate a CSR:

openssl req -new -sha256 -key merchant_private_key.pem -out merchant_csr.csr \
  -subj "/CN=Apple Pay Payment Processing: EDFAPAY, INC./O=EDFAPAY, INC./C=US"
⚠️

O and C must match your Apple Developer Account registration exactly.

Upload the CSR to Apple:

  1. Log in to the Apple Developer Portal
  2. Go to Certificates > Merchant IDs > Payment Processing Certificate
  3. Upload merchant_csr.csr
  4. Download the generated apple_pay.cer
📧

Send apple_pay.cer to [email protected]


Step 2 — Domain Verification (Web Only)

📱

Mobile integrations — skip this step.

  1. Log in to the Apple Developer Portal
  2. Go to Apple Pay > Merchant ID > Domains
  3. Add your domain
  4. Download the verification file
  5. Host it at:
https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association
🚫

Apple Pay will not work until this file is publicly accessible. Test the URL first.


Step 3 — Backend Configuration

After you submit your certificate, the EdfaPay team completes the following:

TaskDescription
Certificate installationCertificate is installed on the EdfaPay backend
Server-side integrationApple Pay services are connected to your account
Session validationMerchant session validation is enabled

You will receive an email confirmation when your integration is live.


Flutter

To configure Apple Pay in Flutter, provide EdfaPay with:

  • Apple Developer Account access — for provisioning and certificates
  • Xcode project access — for signing and building
📧

Contact [email protected] to coordinate Flutter setup.


Payment Flow

The diagram below shows how a payment moves from the customer through your app or website to EdfaPay and Apple Pay Services.

How It Works

StepActorWhat Happens
1CustomerTaps or clicks the Apple Pay button on your app or website
2MerchantYour domain is verified with Apple to confirm the request is legitimate (web only)
3App / WebsiteYour app or website sends the payment details (amount, currency, order ID) to the EdfaPay backend
4EdfaPayEdfaPay connects to Apple Pay Services and generates a secure, encrypted payment token
5EdfaPayEdfaPay validates the merchant session with Apple, decrypts the token, and processes the payment

Once Step 5 completes, the payment is processed and both the merchant and customer receive confirmation.


Support

For any questions or issues, contact [email protected].