If you are using the Stripe Payments Plugin and wish to display a list of ‘User Transactions‘ for your customers to view on the front end of your site, this can be achieved by using the feature explained in this documentation.
This can be helpful if you are creating a membership type site (example: using a membership plugin like our WP eMember) where you will have members logging into your site and doing transactions.
Note: The transactions need to be made while being logged into the site (for this feature to work). So the plugin can recognize a user and store the transaction data for that user accordingly.
Create a new page and paste the following shortcode in it:
[asp_show_my_transactions]
When you paste this shortcode on a post or a page, if your customer is logged in as a WP User, they will be able to see all the transactions they have completed on your website (from the Stripe Payments Plugin). This allows the customer to keep up to date with what they have purchased on your site and if you have chosen to use the download parameter, they will have access to the digital content they have purchased as well.
Displaying Your Customers Transaction History on the Thank You Page
In the following example, the base shortcode; [asp_show_my_transactions] was added to the thank you page of a product. If the customer is logged in as a user prior to purchasing the following product “Movies Under the Stars”, their transaction history will be displayed on the Thank You page that they are directed to after a successful purchase.
Once the customer successfully pays for the item above, they are directed to a thank you page. It is on this thank you page that the transaction history shortcode was pasted so that logged in customers can see all the products they have purchased. This is demonstrated in the screenshot below.
Admin configured this by simply pasting the shortcode on the ‘Thank You’ page that was linked to the product in question. This method is shown in the screenshot below.
Additional Parameters for the User Transactions Shortcode
Optional parameters can then be added to the base shortcode to show a specific number of transactions per page, show when a subscription was cancelled, and also show the download links that the customer has previously purchased. This is useful if you sell digital items on your website. If a customer has misplaced their download link, rather than having to reproduce the link, you could send your logged in customer to the page where all their transaction history including their download links are displayed.
Displaying Your Customers Basic Transaction History
Use the following shortcode on a post or a page to display your customers basic transaction history. Using this shortcode alone will not display the download links they may have purchased.
[asp_show_my_transactions]
The Basic “User Transactions” Shortcode will display the: Name, Item ID, Amount and Date for each Transaction the Customer has Completed. These details will only be displayed to users that are currently logged in.
Displaying Your Customers Transaction History with a Set Amount of Items Per Page
Use the following shortcode to dictate how many of the transactions will be displayed per page. Edit the number shown in the shortcode below to represent the number of transactions you would like to display per page.
[asp_show_my_transactions items_per_page="4"]
In the following example screenshot, the number of items to be shown per page was ‘1’. The customer can then choose to click on the next page to see further transactions.
Displaying Your Customers Transaction History as well as Their Cancelled Subscriptions
Use the following shortcode to display the customers transaction history including any cancelled subscriptions.
[asp_show_my_transactions show_subscription_cancel="1"]
Displaying Your Customers Transaction History along with Any Previously Purchased Downloads
Use the shortcode below on a post or a page, to display your customers transaction history along with any digital file (download links) that they have purchased. If you run a website where you sell digital items, you could create a page with the following shortcode so that your logged in customers can retrieve their digital download links if they happen to misplace the original sales email.
[asp_show_my_transactions show_download_link="1"]
The details outlined by using the shortcode above are displayed in the screenshot below.