---
schema_version: "1"
id: 69d908dee4b4479b193ee6aa2834069c1ecd5d29665255a066e7dcefe147b081
title: EnhancedPaymentDataInput Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d935e50e731ab22af68a2123146737ee8401038f480c47ba104e17bc0bb7621c
description: Sends enhanced payment data, including Level 2 and Level 3 fields, to the gateway adapter as part of the service call.Map of gateway-specific or custom fields. Discount amount.The total amount charged as duty or import or export tariffs on the transaction.Invoice number associated with the payment.Collection of individual line items associated with the payment.Customer reference or identifier. Sales tax amount.Origin postal code.Destination country code.Destination postal code.Shipping or freight amount.Percentage rate of tax applied to the transaction or line item. Total tax amount for the transaction. Maintains the integrity of lists of type EnhancedPaymentDataInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.Maintains the integrity of lists of type EnhancedPaymentDataInput.Converts a date to a string.
---
# EnhancedPaymentDataInput Class

Sends enhanced payment data, including Level 2 and Level 3 fields, to the gateway adapter as part of the service call.

## Namespace

[CommercePayments](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercepayments.htm "Use the CommercePayments namespace to provide a safe and customizable platform for managing customer payments and refunds.")

## Usage

Supported only for third-party payment gateways; not supported for native payments.

- **[EnhancedPaymentDataInput Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_properties)**
- **[EnhancedPaymentDataInput Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_methods)**

## EnhancedPaymentDataInput Properties

The following are properties for EnhancedPaymentDataInput.

- **[additionalAttributes](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_additionalAttributes)**  
    Map of gateway-specific or custom fields.
- **[discountAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_discountAmount)**  
    Discount amount.
- **[dutyAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_dutyAmount)**  
    The total amount charged as duty or import or export tariffs on the transaction.
- **[invoiceNumber](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_invoiceNumber)**  
    Invoice number associated with the payment.
- **[lineItems](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_lineItems)**  
    Collection of individual line items associated with the payment.
- **[referenceId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_referenceId)**  
    Customer reference or identifier.
- **[salesTaxAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_salesTaxAmount)**  
    Sales tax amount.
- **[shipFromZip](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_shipFromZip)**  
    Origin postal code.
- **[shipToCountry](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_shipToCountry)**  
    Destination country code.
- **[shipToZip](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_shipToZip)**  
    Destination postal code.
- **[shippingAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_shippingAmount)**  
    Shipping or freight amount.
- **[taxRate](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_taxRate)**  
    Percentage rate of tax applied to the transaction or line item.
- **[totalTaxAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_totalTaxAmount)**  
    Total tax amount for the transaction.

### additionalAttributes

Map of gateway-specific or custom fields.

#### Signature

public Map<String,String> additionalAttributes {get; set;}

#### Property Value

Type: Map<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type."),[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")\>

### discountAmount

Discount amount.

#### Signature

public Double discountAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### dutyAmount

The total amount charged as duty or import or export tariffs on the transaction.

#### Signature

public Double dutyAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### invoiceNumber

Invoice number associated with the payment.

#### Signature

public String invoiceNumber {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### lineItems

Collection of individual line items associated with the payment.

#### Signature

public List<commercepayments.LineItemInput> lineItems {get; set;}

#### Property Value

Type: List<commercepayments.[LineItemInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_class_commercepayments_LineItemInput "Sends the list of individual line items associated with the payment to the gateway adapter.")\>

### referenceId

Customer reference or identifier.

#### Signature

public String referenceId {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### salesTaxAmount

Sales tax amount.

#### Signature

public Double salesTaxAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### shipFromZip

Origin postal code.

#### Signature

public String shipFromZip {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### shipToCountry

Destination country code.

#### Signature

public String shipToCountry {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### shipToZip

Destination postal code.

#### Signature

public String shipToZip {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### shippingAmount

Shipping or freight amount.

#### Signature

public Double shippingAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### taxRate

Percentage rate of tax applied to the transaction or line item.

#### Signature

public Double taxRate {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### totalTaxAmount

Total tax amount for the transaction.

#### Signature

public Double totalTaxAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

## EnhancedPaymentDataInput Methods

The following are methods for EnhancedPaymentDataInput.

- **[equals(obj)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_equals)**  
    Maintains the integrity of lists of type EnhancedPaymentDataInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.
- **[hashCode()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_hashCode)**  
    Maintains the integrity of lists of type EnhancedPaymentDataInput.
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_EnhancedPaymentDataInput.htm#apex_commercepayments_EnhancedPaymentDataInput_toString)**  
    Converts a date to a string.

### equals(obj)

Maintains the integrity of lists of type EnhancedPaymentDataInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.

#### Signature

public Boolean equals(Object obj)

#### Parameters

- **obj**: Type: Object External object whose key is to be validated.

#### Return Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### hashCode()

Maintains the integrity of lists of type EnhancedPaymentDataInput.

#### Signature

public Integer hashCode()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### toString()

Converts a date to a string.

#### Signature

public String toString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")