# Subscription end user update

Use the **updateSubscriptionEndUser** method to update the details of a subscription’s end user. This method changes per-subscription end user data and not customer details.

## Request parameters <a href="#parameters" id="parameters"></a>

<table><thead><tr><th width="215.066650390625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><strong>Required (string)</strong><br>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect.  The <code>sessionID</code> expires in <strong>10 minutes</strong>.</td></tr><tr><td><code>SubscriptionReference</code></td><td><strong>Required (string)</strong><br>Unique, system-generated subscription identifier.</td></tr><tr><td><code>EndUser</code></td><td><strong>Required (object)</strong><br>Use this object to update end user information.</td></tr></tbody></table>

### Request sample

```php

<?php
 
require('PATH_TO_AUTH');

$subscriptionReference = '8F749B63E7';
$EndUser = new stdClass ();
$EndUser->Address1 = 'Address line 1';
$EndUser->Address2 = 'Address line 2';
$EndUser->City = 'LA';
$EndUser->Company = 'Company Name';
$EndUser->CountryCode = "US";
$EndUser->Email = 'customerAPI@avangate.com';
$EndUser->FirstName = 'New Customer 2.0';
$EndUser->Language = 'en';
$EndUser->LastName = 'Avangate';
$EndUser->Phone = '1234567890';
$EndUser->State = 'California';
$EndUser->Zip = '90210';
$EndUser->Fax = null;

$jsonRpcRequest = array (
'method' => 'updateSubscriptionEndUser',
'params' => array($sessionID, $subscriptionReference, $EndUser),
'id' => $i++,
'jsonrpc' => '2.0');

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
```

## Response parameters <a href="#response" id="response"></a>

<table><thead><tr><th width="107.33343505859375">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Boolean</strong></td><td><strong>true</strong> or <strong>false</strong> depending on whether the changes were successful or not.</td></tr></tbody></table>


---

# 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://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/subscription-end-user-update.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.
