# States

### <mark style="color:purple;">Can Make Payments</mark>

Returns yes/no if the user is able to start a purchase.

***

### <mark style="color:purple;">Active Transactions</mark>

A list of all unfinished transactions.

#### Transaction Object

Represents a single in-app purchase transaction.

<mark style="color:$info;">**transactionIdentifier**</mark>\
A unique identifier for this transaction.

<mark style="color:$info;">**transactionDate**</mark>\
The date the transaction was added to the payment queue (ISO string).

<mark style="color:$info;">**originalTransactionIdentifier**</mark>\
The identifier of the original transaction. Used for restored purchases.

<mark style="color:$info;">**transactionState**</mark>\
The current state of the transaction. Can be purchasing, purchased, failed, restored, or deferred.

<mark style="color:$info;">**errorCode**</mark>\
A numeric error code if the transaction failed.

<mark style="color:$info;">**errorMessage**</mark>\
A message describing the error, if one occurred.

<mark style="color:$info;">**payment**</mark>\
An object containing details about the payment.

#### Payment Object

<mark style="color:$info;">**productIdentifier**</mark>\
The ID of the product being purchased.

<mark style="color:$info;">**quantity**</mark>\
The number of items purchased.

<mark style="color:$info;">**applicationUsername**</mark>\
An optional string used to associate the transaction with a user account in your system.

<mark style="color:$info;">**paymentDiscount**</mark>\
An object containing promotional offer details, if applicable.

#### Payment Discount Object

<mark style="color:$info;">**identifier**</mark>\
The discount offer identifier.

<mark style="color:$info;">**keyIdentifier**</mark>\
The identifier of the key used to sign the offer.

<mark style="color:$info;">**nonce**</mark>\
A unique value used to prevent replay attacks.

<mark style="color:$info;">**signature**</mark>\
The cryptographic signature for the promotional offer.

<mark style="color:$info;">**timestamp**</mark>\
The time the discount was generated (in milliseconds since epoch).

***

### <mark style="color:purple;">Error</mark>

Error output, if any.

***

### <mark style="color:purple;">Receipt URL</mark>

The user's receipt URL, generated with the "Get Receipt URL" action.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://deskifier.gitbook.io/deskifier/deskifier-bubble.io-docs/in-app-purchases-element/states.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
