Deprecated
JSON-RPC
updateCustomerEmail
method is deprecated. Use PATCH /3.1/customers/{customerId} instead.
This method is used to change the email address a customer uses to access the platform.
Note: The customer must have been created using the generateCheckoutUrl() method.
Enterprise account required. Contact us if you're interested about opening Enterprise account.
Parameters
Name | Type | Description |
---|---|---|
publisherToken* | string | Enterprise account required |
customerEmail* | string | Current customer email |
newEmail* | string | New customer email |
API Request/Response
Request
{
"method":"updateCustomerEmail",
"params":{
"publisherToken":"Xlrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x ",
"customerEmail":"[email protected]",
"newEmail":"[email protected]"
},
"jsonrpc":"2.0",
"id":1
}
Response
{
"result":{
"success":true
},
"id":"1",
"error":null,
"jsonrpc":"2.0"
}
PHP Example
<?php
$customerEmail = '[email protected]';
$newCustomerEmail = '[email protected]';
$cleengApi = new Cleeng_Api();
$cleengApi->setPublisherToken('VIJYHWzJEP4mt1DZThD7DV_FinBG0Yo3Q9oHfCFAjqA22jXP');//enterprise account required
$cleengApi->updateCustomerEmail($customerEmail, $newCustomerEmail);
?>