Payment¶
-
public class
Payment
¶ Represents an individual payment within the context of the transaction
Methods¶
create¶
getAccountType¶
-
public AccountType
getAccountType
()¶ The account type used to complete this payment. This may be empty.
getAcquirerId¶
getAcquirerName¶
getAcquirerResponseCode¶
getAdditionalAcquirerData¶
getAllowedPaymentOperations¶
-
public ArrayList<PaymentOperation>
getAllowedPaymentOperations
()¶ Get the allowed payment operations A list of operations that can be performed on this payment. If null (or an empty optional for c++), then the allowed operations are unknown. If an empty list, then there are no further operations allowed.
getAlternativePaymentId¶
getAmountAvailableForRefund¶
getAmountDue¶
getAmounts¶
-
public AmountTotals
getAmounts
()¶ Get the approved amounts in the payment. Please note that these amounts are independent from the requested amounts.
getAppSpecificData¶
-
public String
getAppSpecificData
()¶ Stores the information necessary to perform other operations on this payment at a later time, such as completing a pre-auth or refunding a specific payment. If the payment object is stored offline, only this field must be saved and restored to complete later operations. This field is limited to 255 characters, and the value should not be modified.
getAuthCode¶
getAuthResponseText¶
getAuthResult¶
-
public AuthorizationResult
getAuthResult
()¶ Get Result of transaction authorization. This is provided by the payment application or payment service provider. This may be empty.
getCardInformation¶
-
public CardInformation
getCardInformation
()¶ If the payment involves a card / contactless, this provides the relevant information. This might be empty.
getCashbackAmount¶
getCashierId¶
getCashierName¶
getContextData¶
getCurrency¶
getCustomerNote¶
getDynamicCurrencyConversions¶
-
public ArrayList<DynamicCurrencyConversion>
getDynamicCurrencyConversions
()¶ Refer to
setDynamicCurrencyConversions(DynamicCurrencyConversion)
.
getEbtVoucherNum¶
getExpiryDate¶
getFeesAmount¶
getGratuityAmount¶
getHasRestrictedItem¶
getHostAuthCode¶
getInstallment¶
-
public Installment
getInstallment
()¶ Refer to
setInstallment(Installment)
- Return:
Installment object containing installment related information.
getInvoice¶
getLane¶
getLocalPaymentId¶
getMaximumCompletionAmount¶
getMedicalAmounts¶
-
public MedicalAmounts
getMedicalAmounts
()¶ Gets the optional medical amounts requested by the POS
getMerchantAccount¶
-
public MerchantAccount
getMerchantAccount
()¶ Refer to
setMerchantAccount(MerchantAccount)
- Return:
MerchantAccount object containing merchant account related information.
getMerchantId¶
getOperationsHistory¶
-
public ArrayList<PaymentOperationHistory>
getOperationsHistory
()¶ Get history of operations performed on a payment to modify it, including, but not limited to pre-authorizations A list of operations that have been performed on this payment. If null (or an empty optional for c++), then the operations history is unknown. If an empty list, then there is no history.
getOrderType¶
getPaymentAmount¶
getPaymentId¶
getPaymentMethod¶
getPaymentType¶
-
public PaymentType
getPaymentType
()¶ The payment type used to complete this payment. This may be empty.
getReceipts¶
-
public HashMap<ReceiptType, Receipt>
getReceipts
()¶ Get the receipts for the payment after the payment is completed. This is possibly empty or only containg one type depending on the success of the payment and the configuration of the payment application.
getReconciliationId¶
getRedeemedUnits¶
getReferenceLocalPaymentId¶
getReferencePaymentId¶
-
public String
getReferencePaymentId
()¶ Get the related payment ID of the payment that was refunded or voided. For example, Payment1 is made, and the customer desires a refund. Payment2 will be created for the refund, and the payment ID from Payment1 will be set as the reference payment ID of Payment2. For voids, refunds, and other follow-on payments, this is required if the AppSpecificData from the original payment is not provided, otherwise this is optional.
getReferenceTimestamp¶
-
public String
getReferenceTimestamp
()¶ Get the related payment timestamp of the payment that was refunded or voided. For example, Payment1 is made, and the customer desires a refund. Payment2 will be created for the refund, and the payment timestamp from Payment1 will be set as the reference payment timestamp of Payment2. For voids, refunds, and other follow-on payments, this is required if the AppSpecificData from the original payment is not provided, otherwise this is optional.
getRequestedAmounts¶
-
public AmountTotals
getRequestedAmounts
()¶ Get the requested payment amounts, set when a payment is requested by the POS and independent from the approved amounts.
getRequestedCardPresentationMethods¶
-
public ArrayList<PresentationMethod>
getRequestedCardPresentationMethods
()¶ Gets the requested card presentation methods. Valid presentation methods include:
MAG_STRIPE
,CHIP
,CTLS_CARD
(note that this will allow any type of CTLS presentation),KEYED
This is optional and if no presentation methods are requested, by default all card presentation methods supported by the device hardware will be allowed.
getRequestedPaymentType¶
-
public PaymentType
getRequestedPaymentType
()¶ Refer to
setRequestedPaymentType(paymentType)
.
getRequestedTokenParameters¶
-
public ArrayList<TokenParameters>
getRequestedTokenParameters
()¶ Set the requested token parameters of the payment.
getRequestedTokenizationMethod¶
-
public TokenizationMethod
getRequestedTokenizationMethod
()¶ Deprecated on 2022-03-01. Please use
getRequestedTokenParameters()
instead.
getRetrievalReferenceNumber¶
getSaleNote¶
getSignature¶
getStoredValueAction¶
-
public StoredValueAction
getStoredValueAction
()¶ Get stored value action. This may be empty.
getStoredValueCardInformation¶
-
public StoredValueCardInformation
getStoredValueCardInformation
()¶ Get stored card information, if the payment involves a gift card.
getTaxAmount¶
getTerminalData¶
getTerminalId¶
getTimestamp¶
getTotalsGroupId¶
getTransactionType¶
-
public TransactionType
getTransactionType
()¶ Refer to
setTransactionType
getVasCommands¶
-
public VasCommands
getVasCommands
()¶ The method used to obtain the VasCommands
getVenue¶
isDuplicate¶
-
public boolean
isDuplicate
()¶ Returns true if this payment was identified as a duplicate of a previous payment.
isForceOffline¶
isOnline¶
-
public boolean
isOnline
()¶ True if the payment was authorized online with the host, or false if this was authorized offline.
isStoredValueCard¶
-
public boolean
isStoredValueCard
()¶ Get whether is gift card
setAccountType¶
-
public void
setAccountType
(AccountType accountType)¶ The account type used to complete this payment.
setAcquirerId¶
setAcquirerName¶
setAdditionalAcquirerData¶
setAlternativePaymentId¶
setAppSpecificData¶
setAuthCode¶
setAuthResponseText¶
setAuthResult¶
-
public void
setAuthResult
(AuthorizationResult authorizationResult)¶ Result of transaction authorization. This is provided by the payment application or payment service provider. This may be empty. Deprecated on 2022-12-01.
setCardInformation¶
-
public void
setCardInformation
(CardInformation cardInformation)¶ Set card information if the card information is known by the POS, otherwise this should be empty.
setCashierId¶
setCashierName¶
setContextData¶
setCurrency¶
-
public void
setCurrency
(String currency)¶ This overrides the currency set in the transaction. See
getCurrency()
for more information. This is optional.
setCustomerNote¶
setDuplicate¶
-
public void
setDuplicate
(boolean isDuplicate)¶ See
isDuplicate()
.
setDynamicCurrencyConversions¶
-
public void
setDynamicCurrencyConversions
(ArrayList<DynamicCurrencyConversion> conversions)¶ Set the actual currency conversions that are being applied to the transaction.
setEbtVoucherNum¶
setForceOffline¶
-
public void
setForceOffline
(Boolean forceOffline)¶ Set to true to force the current payment to be authorized offline, set to false to force the payment to be performed online, or empty to let the payment application decide. This is only a recommendation, it is possible for the payment application configuration to override this value.
setHasRestrictedItem¶
setHostAuthCode¶
-
public void
setHostAuthCode
(String hostAuthCode)¶ Refer to
getHostAuthCode
.
setInstallment¶
-
public void
setInstallment
(Installment installment)¶ Set the payment/transaction to an installment type and sets the installment information Refer to
Installment
.
setInvoice¶
setLane¶
setLocalPaymentId¶
setMedicalAmounts¶
-
public void
setMedicalAmounts
(MedicalAmounts medicalAmounts)¶ Set the amounts eligible for FSA. This is optional, need to have only if FSA eligible items are there.
setMerchantAccount¶
-
public void
setMerchantAccount
(MerchantAccount merchantAccount)¶ Set the payment/transaction to an merchant account type and Id information Refer to
MerchantAccount
.
setMerchantId¶
setOnline¶
-
public void
setOnline
(boolean online)¶ Set by the application that performs the authorization with the host.
setOrderType¶
setPaymentId¶
setPaymentMethod¶
setPaymentType¶
-
public void
setPaymentType
(PaymentType paymentType)¶ The payment type used to complete this payment.
setReceipt¶
-
public void
setReceipt
(Receipt receipt)¶ Set the receipt for a payment. This is set by the application which processes the payment, so that the required transaction data can be present on the final receipt, otherwise this is not used. This is automatically added to the return receipts map according to the type of the receipt, which means that setting the receipt with the same type a second time will replace any other receipt with the same type that was already stored.
setReconciliationId¶
setRedeemedUnits¶
setReferenceLocalPaymentId¶
setReferencePaymentId¶
setReferenceTimestamp¶
setRequestedAmounts¶
-
public void
setRequestedAmounts
(AmountTotals amountTotals)¶ Set the amounts for the customer, either to be charged to the customer or cleared from the customer, depending on the transaction type. This is required.
setRequestedCardPresentationMethods¶
-
public void
setRequestedCardPresentationMethods
(ArrayList<PresentationMethod> presentationMethods)¶ Sets the requested card presentation methods. Valid presentation methods include:
MAG_STRIPE
,CHIP
,CTLS_CARD
(note that this will allow any type of CTLS presentation),KEYED
This is optional and if no presentation methods are requested, by default all card presentation methods supported by the device hardware will be allowed.- Parameters:
requestedCardPresentationMethods – The requested card presentation methods
setRequestedPaymentType¶
-
public void
setRequestedPaymentType
(PaymentType paymentType)¶ Request a specific type of payment. This is required to bypass the payment selection screen when the payment application is handling the payment, otherwise this is optional.
setRequestedTokenParameters¶
-
public void
setRequestedTokenParameters
(ArrayList<TokenParameters> requestedTokens)¶ Set the requested token parameters of the payment.
setRequestedTokenizationMethod¶
-
public void
setRequestedTokenizationMethod
(TokenizationMethod tokenizationMethod)¶ Deprecated on 2022-03-01. Please use
setRequestedTokenParameters()
instead.
setRetrievalReferenceNumber¶
setSaleNote¶
setSignature¶
setStoredValueAction¶
-
public void
setStoredValueAction
(StoredValueAction storedValueAction)¶ Set stored value action. This is optional.
setStoredValueCardInformation¶
-
public void
setStoredValueCardInformation
(StoredValueCardInformation cardInformation)¶ Set stored card information if the payment involves a gift or other stored value card and the POS already knows the card information to be used for the payment, otherwise this should be empty.
setTerminalData¶
setTerminalId¶
setTimestamp¶
setTotalsGroupId¶
setTransactionType¶
-
public void
setTransactionType
(TransactionType transactionType)¶ This provides a mechanism for the POS to set the type of transaction being requested.
setVasCommands¶
-
public void
setVasCommands
(VasCommands vasCommands)¶ Refer to
getVasCommands()
.