WARNING:
The Transaction History Element is currently in beta as of Elements v2.0.0 and is functional for GB sellers. We are actively working on expanding support to additional regions. Please check back for updates.
The Transaction History Element lets users view their transaction history within ShipEngine in a specific date range.
The transaction history includes:
- Label purchases
- Voided labels
- Funding transactions
- Refunds issued
- Insurance charges
- Carrier adjustment charges
import { TransactionHistory, ElementsProvider } from '@shipengine/elements';
import { themeConfig } from '../themeConfig';
const tokenPath = '/path/to/token/endpoint';
const Foo = () => {
const getToken = useCallback(() => {
return fetch(tokenPath).then((res) => res.text());
}, []);
return (
<ElementsProvider
getToken={getToken}
themeConfig={themeConfig}
onError={handleError}
>
<TransactionHistory.Element />
</ElementsProvider>
);
};// Creates a new instance of the Elements SDK.
const elements = new ElementsSDK(getToken, {
onError: (err: Error) => console.error(err),
themeConfig: themeConfig,
locale: 'en-US',
});
const transactionHistory = elements.create('transactionHistory');