# Print (/global/en/docs/Terminal/DeviceServices/Print)

## Print

A print request allows you to initiate printing on the payment terminal from your POS app outside of a payment flow. You can print text or images.

#### Print Request

**PrintParam**

**html** *string*

Html to print.

**image** *string*

Image in Base64 to print.

**escCommand** *string*

Print data in ESC command.

#### Print Response

**PrintResult**

**recipientPartyIdentification** *string* — Required

Unique identification of the partner that is the recipient of the message exchange.\
For example, the POS SN

**response** *enum* — Required

Result of the requested transaction.

**Possible enum values**

- `SUCC` — "Success.\nProcessing OK. Information related to the result of the processing is contained in other parts of the response message."
- `FAIL` — "Failure.\nProcessing of the request fails for various reasons."
- `PART` — "Partial Approved.\nThe service was partially completed. Use the Message Status service to query the final transaction status."

**responseReason** *string*

Detail of the response.

**Possible enum values**

- `ABRT` — "Aborted.\nThe initiator of the request has sent an abort message request, which was accepted and processed."
- `BUSY` — "Busy.\nThe system is busy, try later."
- `CANC` — "Cancel.\nThe user has aborted the transaction on the PED keyboard, for instance during PIN entering."
- `DEVO` — "DeviceOut.\nDevice out of order."
- `WPIN` — "WrongPIN.\nThe user has entered the PIN on the PED keyboard and the verification fails."
- `NHOS` — "UnreachableHost.\nAcquirer or any host is unreachable or has not answered to an online request, so is considered as temporary unavailable.\nDepending on the Sale context, the request could be repeated(to be compared with \\"Refusal\\")"
- `UNVS` — "UnavailableService.\nThe service is not available (not implemented, not configured, protocol version too old…)."
- `UNVD` — "UnavailableDevice.\nThe hardware is not available (absent, not configured…)"
- `REFU` — "Refusal.\nThe transaction is refused by the host or by the local rules associated to the card or the POI."
- `TNFD` — "NotFound.\nThe transaction is not found (e.g. for a reversal or a repeat)."
- `WIPG` — "InProgress.\nThe transaction is still in progress and then the command cannot be processed."

**additionalResponseInformation** *string*

Additional information to be logged for further examination.

```java
PrintParam param = PrintParam.newBuilder()
        .html(getPrintHtml())
        .build();

RetailerManager.provideDeviceService()
        .newPrintExchange(param)
        .startAsyncExchange(new Exchange.RetailerSDKCallback<PrintResult>() {
            @Override
            public void onError(int code, String msg) {
                Logger.e(TAG, "Print failed: " + code + ", " + msg);
            }
            
            @Override
            public void onResult(PrintResult result) {
                Logger.i(TAG, "Print result: " + GsonUtils.toJson(result));
            }
        });
```