> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/proposal-microservice/perform-action.md).

# Perform action

Use the **performAction** method via JSON-RPC APIv6 to execute an action on the proposal.

## Request parameters

<table><thead><tr><th width="109.26666259765625">Action</th><th width="152.5999755859375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td></td><td><code>sessionId</code></td><td><p><strong>Required (string)</strong></p><p>Unique 2Checkout session ID code.</p></td></tr><tr><td><strong>SEND</strong></td><td><code>proposalId</code></td><td><p><strong>Required (string)</strong></p><p>The unique merchant proposal ID generated by the 2Checkout system.</p></td></tr><tr><td></td><td><code>exirationDate</code></td><td><p><strong>Required (date)</strong></p><p>The date at which the proposal expires; date-time ISO 8601 format</p></td></tr><tr><td></td><td><code>userId</code></td><td><p><strong>Optional (string)</strong></p><p>The unique user ID generated by the 2Checkout system.</p></td></tr><tr><td></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr><tr><td></td><td><code>sentBy</code></td><td><p><strong>Required (string)</strong></p><p>Represents the account manager of the merchant.</p></td></tr><tr><td></td><td><code>FirstName</code></td><td><p><strong>Required (string)</strong></p><p>The first name of the email sender.</p></td></tr><tr><td></td><td><code>LastName</code></td><td><p><strong>Required (string)</strong></p><p>The last name of the email sender.</p></td></tr><tr><td></td><td><code>Email</code></td><td><p><strong>Required (string)</strong></p><p>The email address of the email sender.</p></td></tr><tr><td><strong>ACCEPT</strong></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr><tr><td><strong>CLOSE</strong></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr><tr><td></td><td><code>userId</code></td><td><p><strong>Optional (string)</strong></p><p>The unique user ID generated by the 2Checkout system.</p></td></tr><tr><td><strong>DISCARD</strong></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr><tr><td></td><td><code>userId</code></td><td><p><strong>Optional (string)</strong></p><p>The unique user ID generated by the 2Checkout system.</p></td></tr><tr><td><strong>REOPEN</strong></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr><tr><td></td><td><code>userId</code></td><td><p><strong>Optional (string)</strong></p><p>The unique user ID generated by the 2Checkout system.</p></td></tr><tr><td><strong>DECLINE</strong></td><td><code>action</code></td><td><p><strong>Required (string)</strong></p><p>The action to be executed on the proposal.</p></td></tr><tr><td></td><td><code>statusComment</code></td><td><p><strong>Optional (string)</strong></p><p>Free text comments that can accompany a status.</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$proposalId = "0573e71d-38bb-4d61-88ca-b3c557517c68";

$actionPayload = new stdClass();
$actionPayload->ExpirationDate = "2021-01-05T17:21:42+00:00";
$actionPayload->UserId = "john.doe@email.com";
$actionPayload->action = "decline";
$actionPayload->StatusComment = "The price is too high for the first product";
$actionPayload->SentBy = new stdClass();
$actionPayload->SentBy->FirstName = "John";
$actionPayload->SentBy->LastName = "Doe";
$actionPayload->SentBy->Email = "john.doe@email.com";

$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'performAction';
$jsonRpcRequest->params = array($sessionID, $actionPayload);
$jsonRpcRequest->id = $i++;

try {
    $result = callRPC($jsonRpcRequest, $host);
    echo "Proposal: </br>",
    var_dump($result);
}
catch (SoapFault $e) {
    echo "Could not fetch proposal: " . $e->getMessage();
    exit;
}
```

## Response

The **performAction** call via JSON-RPC APIv6 returns the [Proposal](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/proposal-microservice.md) object.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/proposal-microservice/perform-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
