Instance Property


An array of PKShippingMethod objects that describe the supported shipping methods.


var shippingMethods: [PKShippingMethod]? { get set }


The default value is nil. See Listing 1 for an example.

Listing 1

Setting the shipping methods

NSDecimalNumber *freeAmount = [NSDecimalNumber decimalNumberWithString:@"0.00"];
PKShippingMethod *freeShipping = [PKShippingMethod summaryItemWithLabel:@"Free Shipping" amount:freeAmount];
freeShipping.detail = @"Arrives by July 2";
freeShipping.identifier = @"free";
NSDecimalNumber *standardAmount = [NSDecimalNumber decimalNumberWithString:@"3.21"];
PKShippingMethod *standardShipping = [PKShippingMethod summaryItemWithLabel:@"Standard Shipping" amount:standardAmount];
standardShipping.detail = @"Arrives by June 29";
standardShipping.identifier = @"standard";
NSDecimalNumber *expressAmount = [NSDecimalNumber decimalNumberWithString:@"24.63"];
PKShippingMethod *expressShipping = [PKShippingMethod summaryItemWithLabel:@"Express Shipping" amount:expressAmount];
expressShipping.detail = @"Ships within 24 hours";
expressShipping.identifier = @"express";
paymentRequest.shippingMethods = @[freeShipping, standardShipping, expressShipping];

See Also

Setting the Shipping Methods and Types

class PKShippingMethod

Defines a shipping method for delivering physical goods.

var shippingType: PKShippingType

The type of shipping used by this request.

enum PKShippingType

Complete list of valid shipping types.