Transaction Types
Since Windows SDK 3.3.0 the Duplicate Check service it will be enabled by default when Handpoint Payments app v4.0.0. or higher is used. (Handpoint Android SDK 7.0.0 or higher).
Sale
Sale Method
A sale initiates a transaction with the payment terminal. In it's simplest form you only have to pass the amount and currency but it also accepts a map with optional parameters.
Parameters
| Parameter | Notes |
|---|---|
amount RequiredBigInteger | Transaction amount - in the minor unit of currency (f.ex. 1000 is 10.00 GBP). |
currency RequiredCurrency | Currency of the transaction. |
map Map | A map including optional transaction parameters. (Customer reference, Metadata, Money Remittance Options,...). This object can be empty if no options are required. |
Code example
// Basic
this.Hapi.Sale(new BigInteger("1000"), Currency.EUR);
// With options
Dictionary map = new Dictionary();
map.Add(XmlTag.CustomerReference.Tag(), "YourCustomerReference");
map.Add(XmlTag.Metadata1.Tag(), "Data 1");
map.Add(XmlTag.MoneyRemittanceCountryCode.Tag(), "USA");
map.Add(XmlTag.MoneyRemittanceFullName.Tag(), "John Doe");
this.Hapi.Sale(new BigInteger("1000"), Currency.EUR, map);
Events invoked
This event gets statuses from the payment terminal during the transaction, for example: 'waiting for card' or 'waiting for PIN entry'
This event is invoked if the card issuer requires the cardholder to sign the transaction receipt.
This event is invoked when the transaction is completed, it contains the transaction result and receipts.
Returns
| Parameter | Notes |
|---|---|
| OperationStartResult | Object containing information about the financial operation started. Most specifically the transactionReference which must be saved on your end in case you do not get back the transaction result object at the end of the transaction. The transactionReference will allow you to query the Handpoint Gateway directly to know the outcome of the transaction in case it is not delivered as planned by the terminal at the end of the transaction. |
Sale And Tokenize Card
SaleAndTokenizeCard Method
A sale operation which also returns a card token. This functionality is not available for all acquirers, please check with Handpoint to know if tokenization is supported for your acquirer of choice.
Parameters
| Parameter | Notes |
|---|---|
amount RequiredBigInteger | Transaction amount - in the minor unit of currency (f.ex. 1000 is 10.00 GBP). |
currency RequiredCurrency | Currency of the transaction. |
map Map | A map including optional transaction parameters. (Customer reference, Metadata, Money Remittance Options,...). This object can be empty if no options are required. |
Code example
//Initiate a sale for 10.00 in Great British Pounds
api.SaleAndTokenizeCard(new BigInteger("1000"),Currency.GBP);
// With options
Dictionary map = new Dictionary();
map.Add(XmlTag.CustomerReference.Tag(), "YourCustomerReference");
map.Add(XmlTag.MoneyRemittanceCountryCode.Tag(), "USA");
map.Add(XmlTag.MoneyRemittanceFullName.Tag(), "John Doe");
api.SaleAndTokenizeCard(new BigInteger("1000"), Currency.EUR, map);
Events invoked
This event gets statuses from the payment terminal during the transaction, for example: 'waiting for card' or 'waiting for PIN entry'
This event is invoked if the card issuer requires the cardholder to sign the transaction receipt.
This event is invoked when the transaction is completed, it contains the transaction result and receipts.
Returns
| Parameter | Notes |
|---|---|
| OperationStartResult | Object containing information about the financial operation started. Most specifically the transactionReference which must be saved on your end in case you do not get back the transaction result object at the end of the transaction. The transactionReference will allow you to query the Handpoint Gateway directly to know the outcome of the transaction in case it is not delivered as planned by the terminal at the end of the transaction. |
Sale Reversal
SaleReversal Method
A sale reversal, also called sale VOID allows the user to reverse a previous sale operation. This operation reverts (if possible) a specific sale identified with a transaction id. In its simplest form you only have to pass the amount, currency and originalTransactionID but it also accepts a map with optional parameters. Note that transactions can only be reversed within a 24 hours timeframe or until the daily batch of transactions has been sent for submission.
Parameters
| Parameter | Notes |
|---|---|
amount RequiredBigInteger | Transaction amount - in the minor unit of currency (f.ex. 1000 is 10.00 GBP). |
currency RequiredCurrency | Currency of the transaction. |
originalTransactionID RequiredString | Id of the original sale transaction (EFTTransactionID) |
map Map | A map including optional transaction parameters. |
Code example
//Initiate a reversal for 10.00 Pounds
api.SaleReversal(new BigInteger(1000),Currency.GBP,"00000000-0000-0000-0000-000000000000");
Events invoked
This event gets statuses from the payment terminal during the transaction, for example: 'waiting for card' or 'waiting for PIN entry'
This event is invoked if the card issuer requires the cardholder to sign the transaction receipt.
This event is invoked when the transaction is completed, it contains the transaction result and receipts.
Returns
| Parameter | Notes |
|---|---|
| OperationStartResult | Object containing information about the financial operation started. Most specifically the transactionReference which must be saved on your end in case you do not get back the transaction result object at the end of the transaction. The transactionReference will allow you to query the Handpoint Gateway directly to know the outcome of the transaction in case it is not delivered as planned by the terminal at the end of the transaction. |
Refund
Refund Method
A refund operation moves funds from the merchant account to the cardholder´s credit card. In it's simplest form you only have to pass the amount and currency but it also accepts a map with optional parameters. Note that a card is required to be swiped, dipped or tapped for this operation. For Interac (Canadian Debit Network), refunds can only be processed until Interac closes the batch of transactions at night.
Parameters
| Parameter | Notes |
|---|---|
amount RequiredBigInteger | Transaction amount - in the minor unit of currency (f.ex. 1000 is 10.00 GBP). |
currency RequiredCurrency | Currency of the transaction. |
originalTransactionIDString | Id of the original sale transaction (EFTTransactionID) |
map Map | A map including optional transaction parameters. (Customer reference, Metadata, Money Remittance Options,...). This object can be empty if no options are required. |
Code example
//Initiate a refund for 10.00 in Great British Pounds
api.Refund(new BigInteger(1000),Currency.GBP,"00000000-0000-0000-0000-000000000000");
// With options
Dictionary map = new Dictionary();
map.Add(XmlTag.CustomerReference.Tag(), "YourCustomerReference");
map.Add(XmlTag.MoneyRemittanceCountryCode.Tag(), "USA");
map.Add(XmlTag.MoneyRemittanceFullName.Tag(), "John Doe");
api.Refund(new BigInteger("1000"), Currency.EUR, map);