Skip to content

Sale/Purchase

Request

Used to request processor approval for an authorization and capture in one request. If the invoice number already exists, the amount requested will be compared to the approved amount on file, and Shift4 will request approval for the additional amount only. If approved, a new sale transaction will be displayed in Lighthouse Transaction Manager and be ready to be batched.

Integration Methods:

  • Host Direct
  • Locally Installed UTG
  • Commerce Engine For On Premise
  • Commerce Engine For Cloud

See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option.

See the JSON Body Schemas for more details on the various JSON body formats.

Security
AccessToken
Headers
InterfaceVersionstring, <= 11 charactersrequired

Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed: $ % : ^ - ~ < > , ? “ ” ‘ ’ { } [ ] \ + =

Example:2.1
InterfaceNamestring, <= 25 charactersrequired

Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

Example:ForwardPOS
CompanyNamestring, <= 26 charactersrequired

Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

Example:PAWS
AccessTokenstring, (uuid), <= 52 charactersrequired

A security credential used to authenticate API requests and all i4Go® authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. The Access Token is required in all requests except an Access Token Exchange request, which generates an Access Token using an authToken and clientGuid.

Example:EA79FB05-3AA7-4500-AF9A-73F986FF2C1D
Bodyapplication/jsonrequired
One of:
dateTimestring, (ISO 8601)required

The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).

Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00

Example:"2024-05-21T09:18:23.283-07:00"
amountobjectrequired

Object containing information regarding the amount being requested. The total field within the object is required and specifies the amount being requested. All other fields are for informational purposes and must also be included in the total field. For example, a purchase of $100 with a $20 tip and $8 tax would be 128.00 in the total field, 20.00 in the tip field and 8.00 in the tax field.

Note: For merchants that are configured to allow multiple currencies, the amount fields can specify up to three decimal places. However, the number of decimal places can not exceed the number allowed for the specified currency. See the Currency Codes section for details.

Example:
{ "tax": 15, "total": 140 }
clerkobjectrequired
Example:
{ "numericId": 1576 }
transactionobjectrequired
Example:
{ "hotel": { "additionalCharges": { "giftShop": "Y", "laundry": "Y", "miniBar": "Y", "other": "Y", "restaurant": "Y", "telephone": "Y" }, "arrivalDateTime": "2021-04-12T15:39:01.594-07:00", "departureDateTime": "2021-04-15T09:18:23.283-07:00", "primaryChargeType": 1, "roomRates": [ { "nights": 2, "rate": 159.95 }, { "nights": 3, "rate": 125.38 } ], "specialCode": 1 }, "invoice": "192029", "notes": "Transaction notes are added here", "purchaseCard": { "customerReference": "D019D09309F2", "destinationPostalCode": "94719", "productDescriptors": [ "Hamburger", "Fries", "Soda", "Cookie" ] } }
deviceobject
cardobject
Example:
{ "present": "Y" }
customerobject
receiptColumnsinteger, <= 2 characters

Send this field if you want Shift4 to format the receipt text instead of returning individual fields. The value sent will correlate to the column width of the formatted receipt that we return. (This also allows the receipt text to wrap to fit the paper size of the printed receipt.) See the Printing Receipts section of this document for more information on formatted receipts.

Example:40
currencyCodestring, (ISO 4217 3 Character Alphabetic Code)

Transaction currency code. See the Currency Codes section for details.

Note: This is currently supported when processing for a merchant outside of the US and Canada. If processing for a US or Canadian merchant then this field will be ignored and the transaction will process in the merchant's configured currency.

Example:"USD"
apiOptionsArray of stringswrite-only

API Options modify the request being made. See the API Options section for more information.

Example:
[ "RETURNEXPDATE", "ALLOWPARTIALAUTH" ]
statementSuffixstring, <= 15 characters

Custom description that will be appended to the merchant name on the customer's statement. For most card brands, the merchant DBA name can be a maximum of 25 characters. Sending this value will cause the merchant name to be truncated to 9 characters. Shift4 will add an asterisk between the merchant name and the statementSuffix value.

For example, for a merchant named Joe's Warehouse Emporium that processes a transaction with statementSuffix value of KDNYZUHQ1, the merchant statement will show as Joe's War*KDNYZUHQ1.

Note: The value that displays on customer statements from card issuers is beyond Shift4's control. We will submit the transaction data as described above, however issuers may modify or truncate that data as they see fit. To best accommodate different issuer limitations, we will truncate the merchant name to the minimum possible value (9 characters) in order to attempt to leave the most room for the statementSuffix to populate on issuer statements.

Example:"KDNYZUHQ1"
tipobject

The optional tip object allows integrators to control the display and behavior of the tip screen presented to customers during payment processing.

uiobject
{ "dateTime": "2021-04-15T09:18:23.283-07:00", "amount": { "tax": 15, "total": 140 }, "apiOptions": [ "ALLOWPARTIALAUTH" ], "card": { "present": "Y" }, "clerk": { "numericId": 1576 }, "transaction": { "hotel": { "additionalCharges": { "giftShop": "Y", "laundry": "Y", "miniBar": "Y", "other": "Y", "restaurant": "Y", "telephone": "Y" }, "arrivalDateTime": "2021-04-12T15:39:01.594-07:00", "departureDateTime": "2021-04-15T09:18:23.283-07:00", "primaryChargeType": 1, "roomRates": [ {}, {} ], "specialCode": 1 }, "invoice": "192029", "notes": "Transaction notes are added here", "purchaseCard": { "customerReference": "D019D09309F2", "destinationPostalCode": "94719", "productDescriptors": [ "Hamburger", "Fries", "Soda", "Cookie" ] } } }

Responses

Transaction was processed

Bodyapplication/json
resultArray of objects
Response
{ "result": [ { "dateTime": "2021-04-15T09:18:23.283-07:00", "amount": { "cashback": 20, "tax": 15, "tip": 20, "total": 160 }, "card": { "entryMode": "E", "number": "XXXXXXXXXXXX4111", "present": "Y", "token": {}, "type": "MC" }, "clerk": { "numericId": 1576 }, "emv": { "tlvData": "910A0102030405060708090A" }, "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "receipt": [ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} ], "server": { "name": "UTGAPI01CE" }, "transaction": { "authorizationCode": "OK710W", "authSource": "E", "hostResponse": {}, "invoice": "192029", "responseCode": "A", "retrievalReference": "402F9H0230S0", "saleFlag": "S" } } ] }