<!--
{
  "availability" : [
    "iOS: 3.0.0 - 18.0.0",
    "iPadOS: 3.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.7.0 - 15.0.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 6.2.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKMutablePayment",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKMutablePayment"
  },
  "title" : "SKMutablePayment"
}
-->

# SKMutablePayment

A mutable request to the App Store to process payment for additional functionality that your app offers.

```
class SKMutablePayment
```

## Overview

A mutable payment object identifies a product and the quantity of that item the user would like to purchase.

When a mutable payment is added to the payment queue, the payment queue copies the contents into an immutable request before queueing the request. Your app can safely change the contents of the mutable payment object.

## Topics

### Getting and Setting Attributes

[`var productIdentifier: String`](/documentation/StoreKit/SKMutablePayment/productIdentifier)

A string that identifies a product that can be purchased from within your app.

[`var quantity: Int`](/documentation/StoreKit/SKMutablePayment/quantity)

The number of items the user wants to purchase.

[`var requestData: Data?`](/documentation/StoreKit/SKMutablePayment/requestData)

Reserved for future use.

[`var applicationUsername: String?`](/documentation/StoreKit/SKMutablePayment/applicationUsername)

A string that associates the transaction with a user account on your service.

### Simulating Buy for Testing

[`var simulatesAskToBuyInSandbox: Bool`](/documentation/StoreKit/SKMutablePayment/simulatesAskToBuyInSandbox)

A Boolean value that produces an “ask to buy” flow for this payment in the sandbox.

### Getting and Setting Discount Details

[`var paymentDiscount: SKPaymentDiscount?`](/documentation/StoreKit/SKMutablePayment/paymentDiscount)

The details of the discount offer to apply to the payment.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Sendable`](/documentation/Swift/Sendable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSMutableCopying`](/documentation/Foundation/NSMutableCopying)

### Inherits From

[`SKPayment`](/documentation/StoreKit/SKPayment)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)