Purchase - Use Level 2 or 3 Transaction Data

Process a payment with Level 2 or 3 data


📘

Note:

To simplify your development and have consistency across the various Purchase requests - all Purchase API calls can also be reached at the following endpoint with any combination of the required Purchase... parameters :

https://<<test_api_url>>/v3/payment/sale/

Processing Level 3 corporate and purchase cards for business-to-business (B2B) and business-to-government (B2G) purchases qualifies for lower interchange rates. This is achieved in part by providing the issuing bank more information on what is being purchased, who is involved in the transaction, how the sale is taking place, and when.

Parameters

The following parameters are available to process a manually input credit card sale.

parameterdescriptionrequired
midthe Merchant ID (MID) assigned by QorCommerce or your merchant service provider (MSP)Yes
toptType Of Payment Transaction - set a value to simply tag and/or route a transaction to a pre-defined provider.No
reference_idA reference id that will be echo'd back in the message response.No
amountthe total amount to process that MUST equal the sum of all total_amount parameter values in the items object array (see below)Yes
service_chargethe amount of the total sum of this transaction that is made up of the service_chargeNo
creditcardthe credit card number -or- card tokenYes
monththe card expiration monthYes
yearthe card expiration yearYes
cvvthe card verification valueYes
cardfullnamethe name printed or embossed on the front of the credit cardYes if store_card value is true
baddressthe card billing street addressNo
baddress2the card billing street 2 addressNo
bcitythe card billing city nameNo
bstatethe card billing state codeNo
bzipthe card billing zip codeYes
bcountrythe card billing country code
default: US
No
currencyThe currency to process. Defaults to USD if no value providedNo
invoiceidthe merchant invoice id associated with the saleNo
orderidunique merchant order tracking numberYes
ipaddressThe IP address of the client or server sending the requestNo
cfirstnamethe customer first nameNo
clastnamethe customer last nameNo
cemailthe customer email addressNo
cphonethe customer phone numberNo
cwebaddressthe customer websiteNo
total_taxthe total tax amount applied to the saleYes
purchase_orderthe purchase order associated with this saleNo
shipping_amountthe total shipping amount applied to the saleNo
shipping_zipif items shipped or delivered, the shipping zip codeNo
shipping_countryif items shipped or delivered, the shipping country codeNo
line_itemsan array of item objects sold (see line_item object parameters below)Yes must have at least one item object
risk_scorerisk score associated to this transaction (*if you are using a risk prevention system)No
store_cardif true will store card in the QorCommerce Vault and return a card tokenNo
metadataa set of key-value pairs that you can attach to a payment. This can be useful for storing additional information about the payment in a structured format.No

Each object in the line_items array provides the following parameters

parameterdescriptionrequired
namethe name of the itemYes
descriptiona description of the itemNo
unit_pricethe price per unit for the itemYes
units_soldthe number of item units soldYes
unit_measurementthe unit of measurementNo
total_amountthe total amount of the item sale which should equal unit_price * units_sold + any taxes, discounts and/or feesYes
uccthe item Universal Commercial CodeNo
upcthe item Universal Product CodeNo
NOTE: The request amount field MUST be equal to the sum of total_amount values for all objects in the items array or the transaction will be not be processed.
JSON example with manually entered card data

The following JSON example provides test values to process a sale with keyed/manual card data. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
  "transaction_data": {
      "mid": "887728202",
      "amount": "86.41",
      "creditcard": "4484070000000000",
      "cvv": "123",
      "month": "12",
      "year": "22",
      "bzip": "23443",
      "cardfullname": "Endframe Systems",
      "currency": "USD",
      "invoiceid": "INV-123123",
      "orderid": "124531541",
      "ipaddress": "0.0.0.0",
      "baddress": "1338 Westport Dr",
      "baddress2": "Suite 300",
      "bcity": "Santa Clara",
      "bstate": "CA",
      "bcountry": "US",
      "cfirstname": "Dinesh",
      "clastname": "Chugtai",
      "cemail": "[email protected]",
      "cphone": "415.343.1231",
      "cwebaddress": "endframe-sys.com",
      "tax_amount": 12.45,
      "purchase_order": "PO-123123",
      "shipping_zip": "33149",
      "shipping_country": "US",
      "items": [
          {
              "name": "Green Plasma Glue",
              "description": "the green, sticky glue guaranteed to stick",
              "ucc": "UCC-21366412",
              "upc": "UPC-634ab112",
              "unit_price": 14.25,
              "units_sold": 2,
              "unit_measurement": "each",
              "total_amount": "33.14"
          },
          {
              "name": "Black Hoodie",
              "description": "100% cotton hoodies",
              "ucc": "UCC-635345432",
              "upc": "UPC-24nn4532098",
              "unit_price": 49.00,
              "units_sold": 1,
              "unit_measurement": "each",
              "total_amount": "53.27"
          }
      ],
    "risk_score": 0,
    "store_card": 0
  }
}
JSON example with card track data

The following JSON example provides test values to process a sale using track data. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
      "mid": "887728202",
      "amount": "86.41",
      "trackdata":"%B5544044490909090^SMITH/JOHN%20A^1904101084730001000000850000000?;5544044490909090=19041010847385000001?",
      "currency": "USD",
      "invoiceid": "INV-123123",
      "orderid": "124531541",
      "ipaddress": "0.0.0.0",
      "cfirstname": "Dinesh",
      "clastname": "Chugtai",
      "cemail": "[email protected]",
      "cphone": "415.343.1231",
      "cwebaddress": "endframe-sys.com",
      "tax_amount": 12.45,
      "purchase_order": "PO-123123",
      "shipping_zip": "33149",
      "shipping_country": "US",
      "items": [
          {
              "name": "Green Plasma Glue",
              "description": "the green, sticky glue guaranteed to stick",
              "ucc": "UCC-21366412",
              "upc": "UPC-634ab112",
              "unit_price": 14.25,
              "units_sold": 2,
              "unit_measurement": "each",
              "total_amount": "33.14"
          },
          {
              "name": "Black Hoodie",
              "description": "100% cotton hoodies",
              "ucc": "UCC-635345432",
              "upc": "UPC-24nn4532098",
              "unit_price": 49.00,
              "units_sold": 1,
              "unit_measurement": "each",
              "total_amount": "53.27"
          }
      ],
    "store_card": 0
}
JSON example with a card token

The following JSON example provides test values to process a sale using a token. You can copy and paste these values in the Body Params section below to be used by the Try It feature

{
      "mid": "887728202",
      "amount": "86.41",
      "creditcard":"000044$5x6hOpZ3",
      "currency": "USD",
      "invoiceid": "INV-123123",
      "orderid": "124531541",
      "ipaddress": "0.0.0.0",
      "cfirstname": "Dinesh",
      "clastname": "Chugtai",
      "cemail": "[email protected]",
      "cphone": "415.343.1231",
      "cwebaddress": "endframe-sys.com",
      "tax_amount": 12.45,
      "purchase_order": "PO-123123",
      "shipping_zip": "33149",
      "shipping_country": "US",
      "items": [
          {
              "name": "Green Plasma Glue",
              "description": "the green, sticky glue guaranteed to stick",
              "ucc": "UCC-21366412",
              "upc": "UPC-634ab112",
              "unit_price": 14.25,
              "units_sold": 2,
              "unit_measurement": "each",
              "total_amount": "33.14"
          },
          {
              "name": "Black Hoodie",
              "description": "100% cotton hoodies",
              "ucc": "UCC-635345432",
              "upc": "UPC-24nn4532098",
              "unit_price": 49.00,
              "units_sold": 1,
              "unit_measurement": "each",
              "total_amount": "53.27"
          }
      ]
}

Store Card Option

You can store the credit card information provided in the manual card input or card track data in the QorCommerce Secure Vault by setting the store_card parameter to true. The response will provide a token value representing the credit card that you can associate with your customer and/or a contract to use for a future payment in place of credit card data when needed.

BIN Check Option

When sale requests from this endpoint are received with Level 3 data, QorCommerce will pass to the host for processing. If the card does not qualify for Level 3 processing, the host will process the request at the interchange rate assigned to the card category.

To ensure only Level 3 qualified cards are processed with a request, you can do one of the following:

  1. Use our #endpoint:zbktnQqG4YjNqgwKY and verify the card category prior to sending the Level 3 request.
  2. Add the query parameter check_l3_card set to true and QorCommerce will perform a BIN Check to determine if the card qualifies as a Level 3 purchase or corporate card. If yes, it will process the request as normal. If the card does not qualify QorCommerce will not process the request and return an error code with a message indicating the card does not qualify for Level 3 Processing.

Response Codes

Language
Click Try It! to start a request and see the response here!