Search Overlay

Configure Apple Pay Payments

Please Note: As an ISV / Paysafe Partner, you will need to complete all of the below "merchant" steps on behalf of the Parent Merchant Legal Entity (PMLE) that your merchants will be operating under.

To enable Apple Pay, you need to update the SDK files. Below you can find examples for Swift and Objective-C.

SDK can be configured both ways on each language.

// Store all merchant details in .plist file and read all relevant information from there
- (PaysafeSDKApplePayMerchantConfiguration *)getPaysafeSDKApplePayMerchantConfigurationFromPlist:(NSString *)plistName {
NSString *path = [[NSBundle mainBundle] pathForResource:plistName ofType:@"plist"];
NSDictionary *myDictionary = [[NSDictionary alloc] initWithContentsOfFile:path];

NSString *countryCode = [myDictionary objectForKey:@"countryCode"];
NSString *currencyCode = [myDictionary objectForKey:@"CurrencyCode"];
NSString *appleMerchantIdentifier = [myDictionary objectForKey:@"merchantIdentifier"];

PaysafeSDKApplePayMerchantConfiguration *result = [[PaysafeSDKApplePayMerchantConfiguration alloc]
initWithApplePayMerchantId:appleMerchantIdentifier
countryCode:countryCode
currencyCode:currencyCode];
return result;
}


PaysafeSDK.applePayMerchantConfiguration = [self getPaysafeSDKApplePayMerchantConfigurationFromPlist:@"PaysafeSDK_ApplePay-Info"];

// Before / After reading the configuration you have to setup ApplePayService
self.applePayService = [[ApplePayService alloc] init];
PaysafeSDK.applePayMerchantConfiguration = PaysafeSDK.ApplePayMerchantConfiguration(applePayMerchantId: "<Your Generated Merchant Id>",
countryCode: "<Merchant country code>",
currencyCode: "<Merchant currency code>")


// Create ApplePayService instance only once
private lazy var applePayService = {
return ApplePayService()
}()

Paysafe SDK needs applePayMerchantConfiguration, and ApplePayService set to work appropriately.

On this Page