Skip to main content

pos.receipt-footer.block.render
Target

Renders a custom section within the POS receipt footer

Note

This is part of a POS UI Extensions developer preview. More information to come.

Anchor to transactioncompletewithreprintdataTransactionCompleteWithReprintData

The data object provided to this extension target.

required
required
string
required
required
required
| | | |
required
Was this section helpful?

Receipt Footer Block

jsx

import {render} from 'preact';

export default async () => {
render(<Extension />, document.body);
};

const Extension = () => {
const {transaction} = shopify;
const qrCodeValue =
transaction.transactionType === 'Exchange'
? `exampleExchange=${encodeURIComponent(transaction.exchangeId ?? '')}`
: `exampleOrder=${encodeURIComponent(transaction.orderId ?? '')}`;

return (
<s-pos-receipt-block>
<s-text>Transaction type: {transaction.transactionType}</s-text>
<s-text>Total tax ({transaction.taxTotal.currency}): {transaction.taxTotal.amount}</s-text>
<s-qr-code value={`https://www.shopify.com?${qrCodeValue}`} />
</s-pos-receipt-block>
);
};