Skip to main content

Overview

Apple Pay enables customers to pay using cards stored in their Apple Wallet. Transactions are authenticated with Face ID, Touch ID, or device passcode, providing a seamless and secure checkout experience. Through Yuno, you can accept Apple Pay on Safari (web), iOS apps, and in-app contexts.

Prerequisites

Before integrating Apple Pay, ensure you have completed the following:
1

SSL Certificate

Your domain must serve content over HTTPS with a valid SSL/TLS certificate. Apple Pay will not function on HTTP or self-signed certificates.
2

Domain Verification

Register and verify your payment domain with Apple through the Yuno Dashboard. Navigate to Settings > Digital Wallets > Apple Pay and add your domain.
3

Apple Developer Account

You need an Apple Developer account to create a Merchant ID and configure payment processing certificates.
4

Yuno Configuration

Enable Apple Pay in your Yuno Dashboard and upload the required Apple merchant certificates.
Domain verification is mandatory. Apple Pay buttons will not render on unverified domains. The verification file must be accessible at https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association.

Integration with Full Checkout SDK

When using Yuno’s Full Checkout SDK, the Apple Pay button renders automatically on supported devices.
const checkout = yuno.checkout({
  countryCode: "BR",
  currency: "BRL",
  amount: "150.00",
  checkoutSession: "session_abc123",
  // Apple Pay button appears automatically on Safari/iOS
});

checkout.mount("#checkout-container");

Direct API Integration

For Direct API integrations, you handle the Apple Pay session and pass the payment token to Yuno.
// 1. Create an Apple Pay session
const session = new ApplePaySession(3, {
  countryCode: "BR",
  currencyCode: "BRL",
  supportedNetworks: ["visa", "masterCard"],
  merchantCapabilities: ["supports3DS"],
  total: {
    label: "Your Store",
    amount: "150.00"
  }
});

// 2. Handle payment authorization
session.onpaymentauthorized = async (event) => {
  const applePayToken = event.payment.token;

  // 3. Send token to Yuno
  const response = await fetch("/api/pay", {
    method: "POST",
    body: JSON.stringify({
      payment_method: {
        type: "APPLE_PAY",
        token: applePayToken.paymentData
      }
    })
  });
};

session.begin();

Supported Countries and Networks

NetworkCountries
VisaUS, BR, MX, CO, CL, AR, PE, and 60+ more
MastercardUS, BR, MX, CO, CL, AR, PE, and 60+ more
American ExpressUS, MX, and select markets
Apple Pay supports both credit and debit cards. Card eligibility is determined by the issuing bank’s participation in the Apple Pay program.

Testing in Sandbox

  1. Use an Apple sandbox tester account (created in App Store Connect).
  2. Add test cards to the Apple Wallet on a physical device or simulator.
  3. Process test transactions using your Yuno sandbox credentials.
Apple Pay cannot be tested in desktop browsers without a paired iPhone or Apple Watch. Use the iOS Simulator in Xcode or a physical Apple device for testing.

Troubleshooting

IssueCauseResolution
Button not renderingUnverified domainComplete domain verification in Dashboard
”Payment not completed”Expired certificateRenew Apple merchant certificate
Session timeoutNetwork latencyEnsure server-to-Apple communication is under 30 seconds
Unsupported deviceNon-Apple deviceApple Pay only works on Apple devices with Safari