*** id: 844d7156-f84a-45f0-9149-a927c9ec795d title: Relay.Calling.FaxAction slug: /php/reference/calling/actions/fax description: The FaxAction object is returned when sending or receiving a fax. max-toc-depth: 3 ---------------- [call-1]: /docs/server-sdk/v2/php/reference/calling/call#faxsendasync [call]: /docs/server-sdk/v2/php/reference/calling/call#faxreceiveasync [relay-calling-faxresult]: /docs/server-sdk/v2/php/reference/calling/results/fax This object returned from [`faxReceiveAsync`][call] and [`faxSendAsync`][call-1] methods represents a receiving or sending Fax on the call. ## Methods ### getControlId Return the UUID to identify the fax action. **Parameters** *None* **Returns** `string` - UUID to identify the action. **Examples** Start faxing and print the controlId. ```php faxSendAsync('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')->done(function ($action) { echo $action->getControlId(); }); ``` ### getPayload Return the payload sent to Relay to initiate the request. Useful to inspect what you sent to perform this action. **Parameters** *None* **Returns** `Object` - Payload sent to Relay. **Examples** Start sending a fax and print out the payload. ```php faxSendAsync('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', '+1888222111', 'Custom Header')->done(function ($action) { print_r($action->getPayload()); }); ``` ### getResult Returns the final result of the faxing. **Parameters** *None* **Returns** [`Relay.Calling.FaxResult`][relay-calling-faxresult] - Final result of the faxing. **Examples** Trying receiving a Fax and grab the result when it's completed. ```php faxReceiveAsync()->done(function($action) { // .. later in the code since it's an async method if ($action->isCompleted()) { $faxResult = $action->getResult(); } }); ``` ### isCompleted Return `true` if faxing has finished, `false` otherwise. **Parameters** *None* **Returns** `Boolean` - True/False accordingly to the state. **Examples** Trying receiving a Fax and check if it has finished. ```php faxReceiveAsync()->done(function($action) { // .. later in the code since it's an async method if ($action->isCompleted()) { } }); ``` ### stop Stop the action immediately. **Parameters** *None* **Returns** `React\Promise\Promise` - A `React Promise` that will be resolved with the Relay response. **Examples** Trying to receive a Fax and then stop the attempt. ```php faxReceiveAsync()->done(function ($faxAction) { // For demonstration purposes only.. $faxAction->stop(); }); ```