Reprint request

An overview of the Reprint request message for Android.

Overview

👉 The Reprint request is used to reprint the receipt of a previously completed transaction.

The client app must implement a mechanism to send messages using Android intents and URI calls and to receive the result in a custom URI callback.

The prerequisite for executing the Reprint request is that a receipt printer is properly connected to the device.

Reprint request

For a typical Reprint request, the client app must provide the following information:

Field Description Example Card Termimal Support
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1' Android Card TerminalsViva Wallet POS app for Android
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' Android Card TerminalsViva Wallet POS app for Android
action print. For successful validation, should not be empty. 'print' Android Card TerminalsViva Wallet POS app for Android
command reprint. For successful validation , should not be empty. 'reprint' Android Card TerminalsViva Wallet POS app for Android
orderCode If not empty should be integer bigger than zero and length 16. '1020304050607080' Android Card TerminalsViva Wallet POS app for Android
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' Android Card TerminalsViva Wallet POS app for Android

The above information elements must create a URI call, i.e.

String reqStr = "vivapayclient://pay/v1"
		+ "&appId=com.example.myapp"
		+ "&action=print"
		+ "&command=reprint"
		+ "&orderCode=1020304050607080"
		+ "&callback=mycallbackscheme://result";

Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse( reqStr));
payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);

Reprint response

After executing a Reprint request, the Card Terminal App responds with a response to indicate if the reprint request has been successful or not.

The result is received as a URI in the callback activity intent:

Uri result = getIntent().getData();

The table below summarises the contents of an approved response.

Field Description Example Card Termimal Support
callback The URI callback that will handle the result. 'mycallbackscheme://result' Android Card TerminalsViva Wallet POS app for Android
status The status of the reprint action 'success' Android Card TerminalsViva Wallet POS app for Android
message A string containing information about the reprint status. 'Printing successful' Android Card TerminalsViva Wallet POS app for Android
action Print. For successful validation, should not be empty. 'print' Android Card TerminalsViva Wallet POS app for Android

A reprint response result looks as follows:

Key to card terminal product categories

To understand the icons used on the above tables, see the below table.

Product category Terminal models Icon
Android Card Terminals Android Card Terminal Ethernet, Android Card Terminal 4G, Mobile Card Terminal Plus, Mobile Card Terminal. Android Card Terminals
Viva Wallet POS app for Android Mini Card Reader, Pocket Card Terminal connected via Bluetooth or USB to the Viva Wallet POS app for Android. Android Card Terminals
Linux Card Terminals Countertop, IM20, S900, S800, D200. Linux Card Terminals

Get Support

If you have any questions about our solutions, or questions about how to integrate with our solutions, please refer to our Contact & Support page.