# Actions

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

Starts a transaction. If this action is successful, it will fire the "Added To Payment Queue" event. As the transaction progresses, the "Transactions Updated" event will fire.

{% hint style="info" %}
Be sure to "finish" a transaction with the "Finish Transaction" action once you are done processing the events for it. No purchases should be left hanging.
{% endhint %}

***

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

Generates previously finished transactions. This method can be called either to install purchases on additional devices, or to restore purchases for an application that the user deleted and reinstalled. This will refresh the "transactions" state with the relevant transactions for the current device's Apple ID.&#x20;

***

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

Generates a URL to a receipt with all of the purchases the user has made for your application.

***

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

Use this to complete a transaction. Note, you need to call this even if the transaction failed, to indicate that you are done processing the transaction.

***

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

Use this to finish all outstanding transactions.


---

# 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/actions.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.
