Package apple.passkit

Class PKPaymentRequest

  • All Implemented Interfaces:
    NSObject

    public class PKPaymentRequest
    extends NSObject
    PKPaymentRequest defines an application's request to produce a payment instrument for the purchase of goods and services. It encapsulates information about the selling party's payment processing capabilities, an amount to pay, and the currency code. API-Since: 8.0
    • Constructor Detail

      • PKPaymentRequest

        protected PKPaymentRequest​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static PKPaymentRequest allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • availableNetworks

        @NotNull
        public static @NotNull NSArray<java.lang.String> availableNetworks()
        The payment networks and platforms supported for in-app payment API-Since: 10.0
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • applicationData

        @Nullable
        public @Nullable NSData applicationData()
        Optional merchant-supplied information about the payment request. Examples of this are an order or cart identifier. It will be signed and included in the resulting PKPaymentToken.
      • billingAddress

        @Nullable
        @Deprecated
        public @Nullable org.moe.natj.general.ptr.ConstVoidPtr billingAddress()
        Deprecated.
        API-Since: 8.0 Deprecated-Since: 9.0 Deprecated-Message: ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to billingContact.
      • billingContact

        @Nullable
        public @Nullable PKContact billingContact()
        If the merchant already has a billing address on file, set it here. API-Since: 9.0
      • countryCode

        @NotNull
        public @NotNull java.lang.String countryCode()
        The merchant's ISO country code.
      • currencyCode

        @NotNull
        public @NotNull java.lang.String currencyCode()
        Currency code for this payment.
      • merchantCapabilities

        public long merchantCapabilities()
        The payment processing capabilities of the merchant.
      • merchantIdentifier

        @NotNull
        public @NotNull java.lang.String merchantIdentifier()
        Identifies the merchant, as previously agreed with Apple. Must match one of the merchant identifiers in the application's entitlement.
      • paymentSummaryItems

        @NotNull
        public @NotNull NSArray<? extends PKPaymentSummaryItem> paymentSummaryItems()
        Array of PKPaymentSummaryItem objects which should be presented to the user. The last item should be the total you wish to charge, and should not be pending
      • requiredBillingAddressFields

        @Deprecated
        public long requiredBillingAddressFields()
        Deprecated.
        Indicates which billing address fields are required. The default is PKAddressFieldNone. This property is deprecated and should not be used. API-Since: 8.0 Deprecated-Since: 11.0
      • requiredShippingAddressFields

        @Deprecated
        public long requiredShippingAddressFields()
        Deprecated.
        Indicates which shipping address fields are required. The default is PKAddressFieldNone. This property is deprecated and should not be used API-Since: 8.0 Deprecated-Since: 11.0
      • setApplicationData

        public void setApplicationData​(@Nullable
                                       @Nullable NSData value)
        Optional merchant-supplied information about the payment request. Examples of this are an order or cart identifier. It will be signed and included in the resulting PKPaymentToken.
      • setBillingAddress

        @Deprecated
        public void setBillingAddress​(@Nullable
                                      @Nullable org.moe.natj.general.ptr.ConstVoidPtr value)
        Deprecated.
        API-Since: 8.0 Deprecated-Since: 9.0 Deprecated-Message: ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to billingContact.
      • setBillingContact

        public void setBillingContact​(@Nullable
                                      @Nullable PKContact value)
        If the merchant already has a billing address on file, set it here. API-Since: 9.0
      • setCountryCode

        public void setCountryCode​(@NotNull
                                   @NotNull java.lang.String value)
        The merchant's ISO country code.
      • setCurrencyCode

        public void setCurrencyCode​(@NotNull
                                    @NotNull java.lang.String value)
        Currency code for this payment.
      • setMerchantCapabilities

        public void setMerchantCapabilities​(long value)
        The payment processing capabilities of the merchant.
      • setMerchantIdentifier

        public void setMerchantIdentifier​(@NotNull
                                          @NotNull java.lang.String value)
        Identifies the merchant, as previously agreed with Apple. Must match one of the merchant identifiers in the application's entitlement.
      • setPaymentSummaryItems

        public void setPaymentSummaryItems​(@NotNull
                                           @NotNull NSArray<? extends PKPaymentSummaryItem> value)
        Array of PKPaymentSummaryItem objects which should be presented to the user. The last item should be the total you wish to charge, and should not be pending
      • setRequiredBillingAddressFields

        @Deprecated
        public void setRequiredBillingAddressFields​(long value)
        Deprecated.
        Indicates which billing address fields are required. The default is PKAddressFieldNone. This property is deprecated and should not be used. API-Since: 8.0 Deprecated-Since: 11.0
      • setRequiredShippingAddressFields

        @Deprecated
        public void setRequiredShippingAddressFields​(long value)
        Deprecated.
        Indicates which shipping address fields are required. The default is PKAddressFieldNone. This property is deprecated and should not be used API-Since: 8.0 Deprecated-Since: 11.0
      • setShippingAddress

        @Deprecated
        public void setShippingAddress​(@Nullable
                                       @Nullable org.moe.natj.general.ptr.ConstVoidPtr value)
        Deprecated.
        These properties have been deprecated and should not be used. API-Since: 8.0 Deprecated-Since: 9.0 Deprecated-Message: ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to shippingContact.
      • setShippingContact

        public void setShippingContact​(@Nullable
                                       @Nullable PKContact value)
        If the merchant already has a shipping address on file, set it here. API-Since: 9.0
      • setShippingMethods

        public void setShippingMethods​(@Nullable
                                       @Nullable NSArray<? extends PKShippingMethod> value)
        Shipping methods supported by the merchant.
      • setShippingType

        public void setShippingType​(long value)
        Indicates the display mode for the shipping (e.g, "Pick Up", "Ship To", "Deliver To"). Localized. The default is PKShippingTypeShipping API-Since: 8.3
      • setSupportedNetworks

        public void setSupportedNetworks​(@NotNull
                                         @NotNull NSArray<java.lang.String> value)
        The payment networks supported by the merchant, for example @[ PKPaymentNetworkVisa, PKPaymentNetworkMasterCard ]. This property constrains payment cards that may fund the payment.
      • shippingAddress

        @Nullable
        @Deprecated
        public @Nullable org.moe.natj.general.ptr.ConstVoidPtr shippingAddress()
        Deprecated.
        These properties have been deprecated and should not be used. API-Since: 8.0 Deprecated-Since: 9.0 Deprecated-Message: ABRecordRef has been deprecated, and does not support all available address properties. You should migrate to shippingContact.
      • shippingContact

        @Nullable
        public @Nullable PKContact shippingContact()
        If the merchant already has a shipping address on file, set it here. API-Since: 9.0
      • shippingMethods

        @Nullable
        public @Nullable NSArray<? extends PKShippingMethod> shippingMethods()
        Shipping methods supported by the merchant.
      • shippingType

        public long shippingType()
        Indicates the display mode for the shipping (e.g, "Pick Up", "Ship To", "Deliver To"). Localized. The default is PKShippingTypeShipping API-Since: 8.3
      • supportedNetworks

        @NotNull
        public @NotNull NSArray<java.lang.String> supportedNetworks()
        The payment networks supported by the merchant, for example @[ PKPaymentNetworkVisa, PKPaymentNetworkMasterCard ]. This property constrains payment cards that may fund the payment.
      • paymentBillingAddressInvalidErrorWithKeyLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentBillingAddressInvalidErrorWithKeyLocalizedDescription​(@NotNull
                                                                                                    @NotNull java.lang.String postalAddressKey,
                                                                                                    @Nullable
                                                                                                    @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment billing address error with the supplied CNPostalAddressKey and description API-Since: 11.0
      • paymentContactInvalidErrorWithContactFieldLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentContactInvalidErrorWithContactFieldLocalizedDescription​(@NotNull
                                                                                                      @NotNull java.lang.String field,
                                                                                                      @Nullable
                                                                                                      @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment contact error with the supplied field You may optionally provide a localized description to be displayed to the user. Available display space for descriptions may be limited, so you should keep your messages concise API-Since: 11.0
      • paymentShippingAddressInvalidErrorWithKeyLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentShippingAddressInvalidErrorWithKeyLocalizedDescription​(@NotNull
                                                                                                     @NotNull java.lang.String postalAddressKey,
                                                                                                     @Nullable
                                                                                                     @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment shipping address error with the supplied CNPostalAddressKey and description API-Since: 11.0
      • paymentShippingAddressUnserviceableErrorWithLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentShippingAddressUnserviceableErrorWithLocalizedDescription​(@Nullable
                                                                                                        @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment shipping address service error with the supplied description API-Since: 11.0
      • requiredBillingContactFields

        @NotNull
        public @NotNull NSSet<java.lang.String> requiredBillingContactFields()
        Indicates which billing contact fields the merchant requires in order to process a transaction. Currently only postal address may be requested for billing contact. For all other fields use -requiredShippingContactFields API-Since: 11.0
      • requiredShippingContactFields

        @NotNull
        public @NotNull NSSet<java.lang.String> requiredShippingContactFields()
        Indicates which shipping contact fields the merchant requires in order to process a transactions API-Since: 11.0
      • setRequiredBillingContactFields

        public void setRequiredBillingContactFields​(@NotNull
                                                    @NotNull NSSet<java.lang.String> value)
        Indicates which billing contact fields the merchant requires in order to process a transaction. Currently only postal address may be requested for billing contact. For all other fields use -requiredShippingContactFields API-Since: 11.0
      • setRequiredShippingContactFields

        public void setRequiredShippingContactFields​(@NotNull
                                                     @NotNull NSSet<java.lang.String> value)
        Indicates which shipping contact fields the merchant requires in order to process a transactions API-Since: 11.0
      • setSupportedCountries

        public void setSupportedCountries​(@Nullable
                                          @Nullable NSSet<java.lang.String> value)
        Set of two-letter ISO 3166 country codes. When provided will filter the selectable payment passes to those issued in the supported countries. API-Since: 11.0
      • supportedCountries

        @Nullable
        public @Nullable NSSet<java.lang.String> supportedCountries()
        Set of two-letter ISO 3166 country codes. When provided will filter the selectable payment passes to those issued in the supported countries. API-Since: 11.0
      • couponCode

        @Nullable
        public @Nullable java.lang.String couponCode()
        An optional coupon code that is valid and has been applied to the payment request already. API-Since: 15.0
      • paymentCouponCodeExpiredErrorWithLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentCouponCodeExpiredErrorWithLocalizedDescription​(@Nullable
                                                                                             @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment coupon code expired error with the supplied description. API-Since: 15.0
      • paymentCouponCodeInvalidErrorWithLocalizedDescription

        @NotNull
        public static @NotNull NSError paymentCouponCodeInvalidErrorWithLocalizedDescription​(@Nullable
                                                                                             @Nullable java.lang.String localizedDescription)
        Convenience method to create a payment coupon code invalid error with the supplied description. API-Since: 15.0
      • setCouponCode

        public void setCouponCode​(@Nullable
                                  @Nullable java.lang.String value)
        An optional coupon code that is valid and has been applied to the payment request already. API-Since: 15.0
      • setShippingContactEditingMode

        public void setShippingContactEditingMode​(long value)
        Indicates the editing mode for the shipping contact. The default is PKShippingContactEditingModeEnabled. API-Since: 15.0
      • setSupportsCouponCode

        public void setSupportsCouponCode​(boolean value)
        Indicates whether the merchant supports coupon code entry and validation. Defaults to NO. API-Since: 15.0
      • shippingContactEditingMode

        public long shippingContactEditingMode()
        Indicates the editing mode for the shipping contact. The default is PKShippingContactEditingModeEnabled. API-Since: 15.0
      • supportsCouponCode

        public boolean supportsCouponCode()
        Indicates whether the merchant supports coupon code entry and validation. Defaults to NO. API-Since: 15.0
      • automaticReloadPaymentRequest

        @Nullable
        public @Nullable PKAutomaticReloadPaymentRequest automaticReloadPaymentRequest()
        Optional request to set up an automatic reload, such as a store card top-up. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with multi token contexts, recurring payment requests or deferred payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.0
      • multiTokenContexts

        @NotNull
        public @NotNull NSArray<? extends PKPaymentTokenContext> multiTokenContexts()
        Array of payment token contexts that indicates multiple payment tokens are requested, one for each context object provided. The sum of all context amounts must be less than or equal to the total amount of the enclosing payment request, as indicated by the last payment summary item. This property cannot be used simultaneously with recurring, automatic reload or deferred payment requests. Multiple payment tokens are not supported on watchOS. API-Since: 16.0
      • recurringPaymentRequest

        @Nullable
        public @Nullable PKRecurringPaymentRequest recurringPaymentRequest()
        Optional request to set up a recurring payment, typically a subscription. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with multi token contexts, automatic reload or deferred payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.0
      • setAutomaticReloadPaymentRequest

        public void setAutomaticReloadPaymentRequest​(@Nullable
                                                     @Nullable PKAutomaticReloadPaymentRequest value)
        Optional request to set up an automatic reload, such as a store card top-up. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with multi token contexts, recurring payment requests or deferred payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.0
      • setMultiTokenContexts

        public void setMultiTokenContexts​(@NotNull
                                          @NotNull NSArray<? extends PKPaymentTokenContext> value)
        Array of payment token contexts that indicates multiple payment tokens are requested, one for each context object provided. The sum of all context amounts must be less than or equal to the total amount of the enclosing payment request, as indicated by the last payment summary item. This property cannot be used simultaneously with recurring, automatic reload or deferred payment requests. Multiple payment tokens are not supported on watchOS. API-Since: 16.0
      • setRecurringPaymentRequest

        public void setRecurringPaymentRequest​(@Nullable
                                               @Nullable PKRecurringPaymentRequest value)
        Optional request to set up a recurring payment, typically a subscription. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with multi token contexts, automatic reload or deferred payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.0
      • applePayLaterAvailability

        public long applePayLaterAvailability()
        Opt out of Apple Pay Later. Defaults to enabled. Only set this property if you have a specific requirement to disable Apple Pay Later. Be sure to select the correct mode that matches your requirement, since this will be displayed to the user. API-Since: 17.0
      • deferredPaymentRequest

        @Nullable
        public @Nullable PKDeferredPaymentRequest deferredPaymentRequest()
        Optional request to set up a deferred payment, such as a hospitality booking or a pre-order. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with: multi token contexts, recurring payment requests or automatic reload payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.4
      • setApplePayLaterAvailability

        public void setApplePayLaterAvailability​(long value)
        Opt out of Apple Pay Later. Defaults to enabled. Only set this property if you have a specific requirement to disable Apple Pay Later. Be sure to select the correct mode that matches your requirement, since this will be displayed to the user. API-Since: 17.0
      • setDeferredPaymentRequest

        public void setDeferredPaymentRequest​(@Nullable
                                              @Nullable PKDeferredPaymentRequest value)
        Optional request to set up a deferred payment, such as a hospitality booking or a pre-order. This payment request will receive a merchant-specific payment token if the payment network supports merchant-specific payment tokens. This property cannot be used simultaneously with: multi token contexts, recurring payment requests or automatic reload payment requests. Merchant-specific payment tokens are not supported on watchOS. API-Since: 16.4
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.