Authorization with Line Items {#payments-processing-basic-auth-lineitem-intro}
==============================================================================

This section shows you how to process an authorization with line items.
The main difference between a basic authorization and an authorization that includes line items is that the purchaseTotals_grandTotalAmount field, which is included in a basic authorization, is substituted with one or more line items that are included in the item_#_ fields, starting with the item_0_ fields.

Fields Specific to this Use Case
--------------------------------

These fields are required for each line item that you use:

item_#_unitPrice
:

item_#_quantity
:

item_#_productCode
:

item_#_productSKU
:
Optional when item_#_productCode is set to `default`, `shipping_only`, `handling_only`, or `shipping_and_handling`

item_#_productName
:
Optional when item_#_productCode is set to `default`, `shipping_only`, `handling_only`, or `shipping_and_handling`
{#payments-processing-basic-auth-lineitem-intro_dl_ht4_hlx_rxb}  
At a minimum, you must include the item_#_unitPrice field in order to include a line item in an authorization. When this field is the only field included in the authorization, the system sets:

* item_#_productCode: `default`
* item_#_quantity: `1`

For example, these three line items are valid.

```
item_0_unitPrice=10.00
item_1_unitPrice=5.99
item_1_quantity=3
item_1_productCode=shipping_only
item_2_unitPrice=29.99
item_2_quantity=3
item_2_productCode=electronic_good
item_2_productSKU=12384569
item_2_productName=receiver
```

Endpoint {#payments-processing-basic-auth-lineitem-intro_d8e16}
---------------------------------------------------------------

Set the ccAuthService_run field to `true`.  
Send the request to `https://ics2ws.ic3.com/commerce/1.x/transactionProcessor`.

Optional Line Item Fields {#payments-processing-basic-auth-lineitem-inst-ops-so}
================================================================================

These fields can be used to provide more line item information. For more information on each field, see the field reference guide:

* item_#_buyerRegistration
* item_#_commodityCode
* item_#_invoiceNumber
* item_#_nationalTax
* item_#_orderAcceptanceCity
* item_#_orderAcceptanceCountry
* item_#_orderAcceptancePostalCode
* item_#_orderAcceptanceState
* item_#_orderOriginCity
* item_#_orderOriginCountry
* item_#_orderOriginPostalCode
* item_#_orderOriginState
* item_#_otherTax_#_amount
* item_#_otherTax_#_firstName
* item_#_otherTax_#_lastName
* item_#_otherTax_#_rate
* item_#_otherTax_#_statusIndicator
* item_#_otherTax_#_type
* item_#_otherTax_#_passengerFirstName
* item_#_otherTax_#_passengerLastName
* item_#_productCode
* item_#_productDescription
* item_#_productName
* item_#_productSKU
* item_#_quantity
* item_#_referenceData_#_code
* item_#_referenceData_#_number
* item_#_shippingDestinationType
* item_#_taxAmount
* item_#_taxRate
* item_#_taxStatusIndicator
* item_#_unitOfMeasure
* item_#_unitPrice
* item_#_weightAmount
* item_#_weightIdentifier
* item_#_weightUnitMeasure

Required Fields for Processing an Authorization with Line Items {#payments-processing-basic-auth-lineitem-required}
===================================================================================================================

> When relaxed requirements for address data and the expiration date are being used, not all fields in this list are required. It is your responsibility to determine whether your account is enabled to use this feature and which fields are required. For details about relaxed requirements, see [Relaxed Requirements for Address Data and Expiration Date in a Payment](/docs/cybs/en-us/payments/developer/amexdirect/so/payments/payments-relax-reqs.md "").

billTo_city
:

billTo_country
:

billTo_email
:

billTo_firstName
:

billTo_lastName
:

billTo_postalCode
:

billTo_state
:

billTo_street1
:

card_accountNumber
:

card_expirationMonth
:

card_expirationYear
:

ccAuthService_run
:
Set the value to `true`.

merchantID
:

merchantReferenceCode
:
:
Required when billTo_personalID is included in the request.

purchaseTotals_currency

purchaseTotals_grandTotalAmount
:
Either purchaseTotals_grandTotalAmount or item_#_unitPrice must be included in the request.

Simple Order Example: Processing an Authorization with Line Items {#payments-processing-basic-auth-lineitem-ex-so}
==================================================================================================================

Request

```keyword
billTo_city=Palo Alto
billTo_country=US
billTo_email=null@cybersource.com
billTo_firstname=Julia
billTo_lastname=Fernandez
billTo_postalCode=94053
billTo_state=CA
billTo_street1=123 Main St.
card_accountNumber=41111111XXXXXXXX
card_expirationMonth=12
card_expirationYear=2023
ccAuthService_run=true
dcc_dccIndicator=1
merchant_id=MID23
merchant_referenceCode=Merchant_REF
purchaseTotals_currency=usd
item_0_unitPrice=10.00
item_1_unitPrice=5.99
item_1_quantity=3
item_1_productCode=shipping_only
item_2_unitPrice=29.99
item_2_quantity=3
item_2_productCode=electronic_good
item_2_productSKU=12384569
item_2_productName=receiver
purchaseTotals_exchangeRate=0.91
purchaseTotals_originalAmount=107.33
purchaseTotals_originalCurrency=eur
```

Response to a Successful Request

```
additional_processor_response=e1cdcafc-cdbb-4ef7-8788-a1234e844805
request_id=6461515866500167772420
decision=ACCEPT
reasonCode=100
merchantReferenceCode=Merchant_REF
purchaseTotals_currency=usd
cardCategory=FccAuthService_reconciliationID=ZUDCXJO8KZRFXQJJ
ccAuthReply_amount=117.94
ccAuthReply_avsCode=5
ccAuthReply_authorizationCode=570110
ccAuthReply_processorResponse=1
ccAuthReply_authorizedDateTime=2022-03-01T161947Z
ccAuthReply_paymentNetworkTransactionID=111222
```

