Transactions Web-Component
Provide full payment history visibility to your customers.

You can utilize our transaction table component by specifying the pay-engine
web component with type transactions
and other necessary properties.
<pay-engine
id="pf-transactions"
type="transactions"
merchant-id="PE_MERCHANT_ID"
hash="PE_MERCHANT_ID_HASH">
</pay-engine>
Example with default-filter property
<pay-engine
id="pf-transactions"
type="transactions"
default-filter='{
"amount": {
"from": 50,
"to": 100
},
"method": "Credit Card",
"date": {
"from": 1700780400,
"to": 1740264397
},
{"refund":"all"}
}'
merchant-id="PE_MERCHANT_ID"
hash="PE_MERCHANT_ID_HASH">
</pay-engine>
Using the onRowClick
event.
onRowClick
event.You can listen to the custom onRowClick
event to execute custom behavior such as navigating away from the table to a transaction detail page. See the example below:
<pay-engine
id="transactions-table"
type="transactions"
merchant-id="PE_MERCHANT_ID"
hash="PE_MERCHANT_ID_HASH">
</pay-engine>
<script>
document.getElementById("transactions-table")
.addEventListener("onRowClick", event => {
const payengineTransactionId = event.detail.id;
const internalTransactionId = event.detail.internalTransactionID;
// use values here, e.g. navigate to transaction detail page
})
</script>
Transactions Table Customization
You can customize column titles and control their visibility using the columns
parameter. To do this, specify each column you want to configure by referencing its identifier and defining its display settings.
<pay-engine
id="transactions-table"
type="transactions"
merchant-id="PE_MERCHANT_ID"
hash="PE_MERCHANT_ID_HASH"
columns='{
"current_column_name": {
"name": "New Name",
"visible": true
}
}'>
</pay-engine>
<script>
document.getElementById("transactions-table")
.addEventListener("onRowClick", event => {
const payengineTransactionId = event.detail.id;
const internalTransactionId = event.detail.internalTransactionID;
// use values here, e.g. navigate to transaction detail page
})
</script>
"current_column_name"
is the internal identifier for the column. These must match the values listed in the “Column Name for JSON” column in the table below.name
: Overrides the default column title in the UI.visible
: Set totrue
to show the column, orfalse
to hide it.
Column Mapping
Transaction ID
transaction_id
Merchant Name
merchant_name
Customer Name
customer_name
Transaction Amount
transaction_amount
Internal ID
internal_transaction_id
Status
transaction_status
Payment Type
payment_type
Transaction Time
created_at
Properties and Styling
The following properties can be set on this web-component. You can set each property via a JavaScript object reference, or directly inline as an HTML tag attribute.
merchant-id
Merchant ID (generated by using create merchant API call)
hash
HMAC generated from merchant-id
(see securing embedded UIs section)
css
<Style> HTML element id, or URL of CSS file (see Styling specs for this component)
hide-filter
Determinate show or hide the default filter element
default-filter
Default filter applying to the transaction table.
additional-columns
Additional columns to be displayed in the table in addition to the standard list
default-transaction-id
Show default transaction detail pop-up on table load.
print-receipt
Displays a button in the transaction detail modal to print the receipt.
Transaction Details
To view only the details for an individual transaction, use the following code snippet and pass the individual transaction. See the example below:
<pay-engine
id="transaction"
type="transaction-detail"
merchant-id="PE_MERCHANT_ID"
hash="PE_MERCHANT_ID_HASH"
transaction-id="PE_TRANSACTION_ID"
></pay-engine>
Last updated