REST API | GPX

Authorization with Line Itemization

This section shows you how to process an authorization request with line items.

Fields Specific to this Use Case

Remove the
orderInformation.amountDetails.totalAmount
field used in a basic authorization and include one or more line items in the
lineItem[]
array.

Using Line Items

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
    )
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:
  • 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

POST
https://api.cybersource.com
/pts/v2/payments