StoreKit.AddPayment
-------------------

Adds a new payment to the transaction query.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [StoreKit](component_StoreKit.md) | [8.2](newinversion82.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "StoreKit.AddPayment"; productIdentifier { ; quantity } ) 

**MBS**( **"StoreKit.AddPayment";** /\* Adds a new payment to the transaction query. \*/  
**$productIdentifier**; /\* The product identifier.e.g. 1234 \*/   
**$quantity**) /\* Optional; The quantity of the product.   
Default is 1.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| productIdentifier | The product identifier. | 1234 |  |
| quantity | The quantity of the product.    Default is 1. | 1 | Optional |

### Result

Returns OK or error.

### Description

Adds a new payment to the transaction query.  
When a payment request is added to the queue, the payment queue processes that request with the Apple App Store and arranges for payment from the user. When that transaction is complete or if a failure occurs, the payment queue sends the payment transaction object that encapsulates the request to all transaction observers.  
Use [StoreKit.Transactions](StoreKitTransactions.md) later to query status.  
  
Clears last error state.  
### Examples

Start order of item:

 Set Variable \[ $r ; Value: MBS ( "StoreKit.AddPayment"; "123"; 1 ) \]  
### See also

- [StoreKit.Transactions](StoreKitTransactions.md)

### Blog Entries

- [Working on new Store Kit functions](https://www.mbsplugins.de/archive/2018-04-23/Working_on_new_Store_Kit_funct/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 22nd April 2018 , last changed 13th December 2024

  
[SpeechRecognition.SupportsOnDeviceRecognition](SpeechRecognitionSupportsOnDeviceRecognition.md) - [StoreKit.CanMakePayments](StoreKitCanMakePayments.md)

[HTML Version](StoreKitAddPayment.shtml)