On This Page

{#jumplink-list}  
[Markdown](/docs/cybs/en-us/payments/developer/fdiaus/rest/payments/payments-processing-basic-intro/payments-processing-basic-auth-lineitem-intro.md)  
Filter  
FILTER BY TAG

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 orderInformation.amountDetails.totalAmount field, which is included in a basic authorization, is substituted with one or more line items that are included in a lineItem\[\] array.

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

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

orderInformation.lineItems\[\].unitPrice
:

orderInformation.lineItems\[\].quantity
:

orderInformation.lineItems\[\].productCode
:

orderInformation.lineItems\[\].productSku
:
Optional when item_#_productCode is set to `default`, `shipping_only`, `handling_only`, or `shipping_and_handling`

orderInformation.lineItems\[\].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 orderInformation.lineItems\[\].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:

* orderInformation.lineItems\[\].productCode: `default`
* orderInformation.lineItems\[\].quantity: `1`

For example, these three line items are valid.

```
"orderInformation": {
  "lineItems": [
    {
      "unitPrice": "10.00"
    },
    {
      "unitPrice": "5.99",
      "quantity": "3",
      "productCode": "shipping_only"
    },
    {
      "unitPrice": "29.99",
      "quantity": "3",
      "productCode": "electronic_good",
      "productSku": "12384569",
      "productName": "receiver"
    }
  ]
}
```

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

**Production:** `POST ``https://api.cybersource.com``/pts/v2/payments`{#payments-processing-basic-auth-lineitem-intro_d8e25}  
**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/payments`{#payments-processing-basic-auth-lineitem-intro_d8e35}

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

> IMPORTANT  
> 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 Payment Transactions](/docs/cybs/en-us/payments/developer/fdiaus/rest/payments/payments-relax-reqs.md "").

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")

[orderInformation.billTo.address1](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-address1.md "")
:

[orderInformation.billTo.administrativeArea](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-admin-area.md "")
:

[orderInformation.billTo.country](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-company-country.md "")
:

[orderInformation.billTo.email](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-email.md "")
:

[orderInformation.billTo.firstName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-first-name.md "")
:

[orderInformation.billTo.lastName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-last-name.md "")
:

[orderInformation.billTo.locality](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-locality.md "")
:

[orderInformation.billTo.postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-postal-code.md "")
:

[paymentInformation.card.expirationMonth](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-exp-mo.md "")
:

[paymentInformation.card.expirationYear](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-exp-year.md "")
:

[paymentInformation.card.number](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-number.md "")
:

Related Information {#payments-processing-basic-auth-lineitem-required_section_x5s_wz5_sxb}
-------------------------------------------------------------------------------------------

* [API field reference guide for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md "")
  {#payments-processing-basic-auth-lineitem-required_ul_y5s_wz5_sxb}

REST Example: Processing an Authorization with Line Items {#payments-processing-basic-auth-lineitem-ex-rest}
============================================================================================================

Request

```keyword
{
  "currencyConversion": {
    "indicator": "Y"
  },
  "paymentInformation": {
    "card": {
      "number": "4111111111111111",
      "expirationMonth": "12",
      "expirationYear": "2031"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "currency": "USD",
      "exchangeRate": ".91",
      "originalAmount": "107.33",
      "originalCurrency": "eur"
    },
    "billTo": {
      "firstName": "John",
      "lastName": "Doe",
      "address1": "1 Market St",
      "locality": "san francisco",
      "administrativeArea": "CA",
      "postalCode": "94105",
      "country": "US",
      "email": "test@cybs.com"
    },
    "lineItems": [
      {
        "unitPrice": "10.00"
      },
      {
        "unitPrice": "5.99",
        "quantity": "3",
        "productCode": "shipping_only"
      },
      {
        "unitPrice": "29.99",
        "quantity": "3",
        "productCode": "electronic_good",
        "productSku": "12384569",
        "productName": "receiver"
      }
    ]
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6482385519226028804003/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6482385519226028804003"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6482385519226028804003/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1648238551902"
  },
  "id": "6482385519226028804003",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "117.94",
      "currency": "USD"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "card": {
      "type": "001"
    }
  },
  "processorInformation": {
    "systemTraceAuditNumber": "191521",
    "approvalCode": "831000",
    "merchantAdvice": {
      "code": "01",
      "codeRaw": "M001"
    },
    "responseDetails": "ABC",
    "networkTransactionId": "016153570198200",
    "consumerAuthenticationResponse": {
      "code": "2",
      "codeRaw": "2"
    },
    "transactionId": "016153570198200",
    "responseCode": "00",
    "avs": {
      "code": "Y",
      "codeRaw": "Y"
    }
  },
  "reconciliationId": "6482385519226028804003",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2022-03-25T20:02:32Z"
}
```

RELATED TO THIS PAGE

