Skip to main content

Apple Pay Configuration

To integrate Apple Pay within the Fiuu Mobile XDK (Version 1.2), you must configure your Apple Merchant ID and payment processing certificates.

info

This guide is based on the Fiuu Mobile XDK Swift Apple Pay setup.

Prerequisites

  • Apple Developer Account
  • Fiuu merchant account with Apple Pay enabled
  • iOS app with Apple Pay capability

1. Register an Apple Merchant ID

  1. Sign in to the Apple Developer Portal.
  2. Navigate to Certificates, Identifiers & ProfilesIdentifiers.
  3. Register a new Merchant ID identifier.
  4. Note the Merchant ID value (e.g. merchant.com.yourcompany.applepay).
warning

The Apple Merchant ID must be different from your app's bundle identifier.

2. Enable Apple Pay Capability in Xcode

  1. Open your Xcode project.
  2. Select your target → Signing & Capabilities.
  3. Click + Capability and add Apple Pay.
  4. Select your registered Merchant ID.

3. Create a Payment Processing Certificate

A Payment Processing certificate is a cryptographic key used to securely encrypt and send payment data to the Fiuu server.

  1. Select your Merchant ID on the Apple Developer portal.
  2. Under Apple Pay Payment Processing Certificate, click Create Certificate.
  3. Upload the Certificate Signing Request (CSR) provided by Fiuu/RazerMS.
  4. Download the resulting Payment Processing certificate.
  5. Provide the downloaded certificate to Fiuu/RazerMS.

Contact support@fiuu.com to obtain the CSR file.

4. Configure XDK Parameters

When initializing the XDK, pass the required Apple Pay parameters:

@"mp_ap_merchant_ID": @"merchant.com.rms.mobile.applepay",
@"mp_allowed_channels": [NSArray arrayWithObjects:@"credit", @"ApplePay", nil],

Required Parameters

ParameterValueDescription
mp_ap_merchant_IDYour Apple Merchant IDe.g. merchant.com.rms.mobile.applepay
mp_allowed_channels["credit", "ApplePay"]Must include both values

Optional Parameters

ParameterValueDescription
mp_express_modetrueBypass the Fiuu XDK payment selection page
mp_channel"ApplePay"Direct Apple Pay channel selection

Full Example (Objective-C)

NSDictionary *paymentDetails = @{
@"mp_username": @"username",
@"mp_password": @"password",
@"mp_merchant_ID": @"merchantid",
@"mp_app_name": @"appname",
@"mp_verification_key": @"vkey123",
@"mp_amount": @"1.01",
@"mp_order_ID": @"orderid123",
@"mp_currency": @"MYR",
@"mp_country": @"MY",
@"mp_bill_description": @"billdesc",
@"mp_bill_name": @"billname",
@"mp_bill_email": @"email@domain.com",
@"mp_bill_mobile": @"+1234567",
@"mp_express_mode": @YES,
@"mp_ap_merchant_ID": @"merchant.com.rms.mobile.applepay",
@"mp_allowed_channels": @[@"credit", @"ApplePay"],
};

Swift Example

let paymentDetails: [String: Any] = [
"mp_channel": "ApplePay",
"mp_express_mode": true,
"mp_allowed_channels": ["ApplePay"],
"mp_ap_merchant_ID": "merchant.com.rms.mobile.applepay",
// ... other mandatory parameters
]

5. Objective-C Bridging Header

If your project uses Objective-C, create a bridging header and add:

#import <MOLPayXDK/MOLPayLib.h>

See the Objective-C integration guide or CocoaPods guide for installation steps.

6. Payment Flow

Standard Flow

  1. User selects Apple Pay from the XDK channel list.
  2. Apple Pay sheet appears for biometric authentication.
  3. Payment is processed and result is returned to your app.

Express Mode

With mp_express_mode: true and mp_channel: "ApplePay", the XDK skips the channel selection page and goes directly to the Apple Pay sheet.

7. Testing

Use Apple Pay Sandbox testing cards from the Apple Developer documentation.

Test scenarios:

  • Success Payment — valid card, successful authorization
  • Failure Payment — declined card or insufficient funds
  • Express Mode — direct Apple Pay launch without channel selection

Troubleshooting

IssueSolution
Apple Pay option not shownVerify mp_allowed_channels includes "ApplePay" and "credit"
Merchant ID errorEnsure mp_ap_merchant_ID matches your registered Apple Merchant ID
Certificate errorConfirm the Payment Processing certificate was uploaded to Fiuu
Capability missingAdd Apple Pay capability in Xcode with the correct Merchant ID

For unresolved issues, contact support@fiuu.com.