Receipt

public class Receipt

Provided as a part of the Payment object when a payment is received. This object cannot be retrieved at a later time, and should be stored if re-printing may be required.

Methods

create

public static Receipt create()

Factory method to create Receipt object

getAsHtml

public String getAsHtml()

Returns the final receipt as HTML.

getAsPlainText

public String getAsPlainText()

Returns the final receipt as plain text.

getBusinessInfo

public String getBusinessInfo()

The Business Info section of the receipt, as customized by the merchant in the receipt settings for this venue.

getCashierName

public String getCashierName()

Return Cashier name

getCustomFooter

public String getCustomFooter()

The footer as defined by the merchant in receipt settings.

getCustomGreeting

public String getCustomGreeting()

Return custom greeting message

getFooter

public String getFooter()

The footer as modified by other applications in response to the REQUEST_APPEND_RECEIPT API.

getOnlineUrl

public String getOnlineUrl()

The mFooter as modified by other applications in response to the REQUEST_APPEND_RECEIPT API. Returns the online URL in an HTML-formatted string, including a QR code image if entered by the merchant.

getOriginalHtml

public String getOriginalHtml()

Returns the original HTML of the receipt as received from the payment application

getOriginalImage

public Image getOriginalImage()

Convenience method to get the original receipt from the payment application as an image.

getPaymentInformation

public String getPaymentInformation()

The payment information, in particular, the EMV fields or other relevant lines necessary for legal compliance, as provided by the payment application.

getQrCodeImage

public String getQrCodeImage()

Return the Qr code image

getReceiptType

public ReceiptType getReceiptType()

The type of receipt, generally either for the customer or for the merchant.

getTextAtSection

public String getTextAtSection(ReceiptSection section)

Allows additional customization of the receipt at specific compliant sections of the receipt.

getTransactionInformation

public String getTransactionInformation()

The transaction information, including basket, adjustments, offers, donations, taxes, and totals, as provided by the payment application.

hasCustomFooter

public boolean hasCustomFooter()

Returns true if the merchant has decided to include a custom mFooter, or false otherwise. Defaults to false.

hasCustomHeader

public boolean hasCustomHeader()

Returns true if the merchant has decided to include a custom header, or false otherwise. Defaults to false.

insertTextAtSection

public boolean insertTextAtSection(String text, ReceiptSection receiptSection)

Refer to getTextAtSection

isCashierNameIncluded

public boolean isCashierNameIncluded()

Returns true if the merchant has decided to include the cashier’s name, or false otherwise. Defaults to false.

isLogoIncluded

public boolean isLogoIncluded()

Returns true if the merchant has decided to include their logo, or false otherwise. Defaults to false.

isOnlineUrlIncluded

public boolean isOnlineUrlIncluded()

Returns true if the merchant has decided to include an online url for the receipt, or false otherwise. Defaults to false.

isQrCodeIncluded

public boolean isQrCodeIncluded()

Returns true if the merchant has decided to include the QR Code with the online url, or false otherwise. Defaults to false.