Skip to content
Languages
Servers
Host Direct Test URL

https://api.shift4test.com/api/rest/v1/

Host Direct Production URL

https://api.shift4api.net/api/rest/v1/

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Request

This function is used to process a request via the 3D Secure process without authorizing the payment. This will return the result of the 3D Secure process as well as the 3D Secure data that can then be used to process a payment via the Authorization or Sale/Purchase endpoint.

Integration Methods:

  • Host Direct

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

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: "2022-05-04T09: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.

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: {"total":160}
amount.​totalnumber<= 14 charactersrequired

The amount being charged for a particular transaction. If other amount fields are sent, they must be included in the total amount. Amount cannot be zero.

Example: 160
transactionobjectrequired
Example: {"invoice":"730518","notes":"Transaction notes are added here"}
transaction.​invoicestring<= 10 charactersrequired

10-digit invoice number assigned by the interface to identify a transaction. An invoice number serves as a unique key that identifies a transaction within a batch in Shift4's Gateway.

Note: For US and Canadian processing: Although the invoice number is sent as a JSON string it is a numeric value. No alpha characters are allowed.

For processing outside of the US and Canada alpha characters are allowed.

Example: "730518"
transaction.​notesstring<= 4096 characters

A free-form notes field that supports the use of HTML tags. This can be used for reference in Lighthouse Transaction Manager and is not sent to the authorization host. Escaped quotation marks should not be sent in the Notes field.

Example: "Transaction notes are added here"
transaction.​vendorReferencestring<= 50 characters

Optional field for information that can be searched in the merchant portal.

transaction.​s4RiskIdstring

Unique transaction identification number generated by Shift4 to identify a specific risk transaction and a field that can be searched in LTM.

Conditional: must be sent if Risk Assessment was completed prior to processing the transaction.

cardobjectrequired
Example: {"number":"4012000098765439","expirationDate":1225,"present":"N"}
card.​numberstring<= 32 charactersrequired

The payment card number entered in an initial authorization/sale request. This field will always be masked when returned in a response.

Example: "4012000098765439"
card.​expirationDateinteger(MMYY)[ 3 .. 4 ] charactersrequired

Conditional: Send only when card data is manually entered or when using a token. This field should not be specified when using an encrypted device.

Card expiration date in MMYY format. This value should only be populated in the initial sale/authorization request.

Example: 1225
card.​presentstring

Conditional: Send in the initial authorization/sale request

Indicates whether a card was present (‘Y’) or not (‘N’) at the time a transaction took place. This should be set appropriately in the initial authorization/sale request. In subsequent requests, this field should be left blank or should not be sent.

Note: Subsequent request here does not apply to the secondary request for card on file type transactions or reuse of the same card. An example of a subsequent request would be a capture after an authorization. You would not include card.present in the capture, which is the subsequent request. Another example is when performing an incremental authorization where you perform an authorization, followed by an incremental authorization then a capture. The second authorization (incremental) and the capture are the subsequent requests where you would not include card.present.

Enum"Y""N"
Example: "N"
card.​securityCodeobject

Conditional: Send when processing a 3D Secure transaction in the US. This object should be sent for initial card on file request but is not required for subsequent merchant initiated charges.

customerobjectrequired
Example: {"firstName":"John","lastName":"Smith","addressLine1":"65 Easy St","city":"Las Vegas","postalCode":"65144","emailAddress":"firstname.lastname@email.com","ipAddress":"63.57.84.101"}
customer.​firstNamestring<= 30 charactersrequired

Specifies a consumer’s first name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option USECARDNAME is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the customer object, the consumer's name will be returned in the customer object if the name is present in the card's EMV or track data.

Example: "John"
customer.​lastNamestring<= 30 charactersrequired

Specifies a consumer’s last name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option USECARDNAME is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the customer object, the consumer's name will be returned in the customer object if the name is present in the card's EMV or track data.

Example: "Smith"
customer.​emailAddressstring<= 80 charactersrequired

Customer email address.

Example: "firstname.lastname@email.com"
customer.​ipAddressstring<= 20 charactersrequired

Public source IP Address where the request originates, not the IP Address of the web server.

Example: "63.57.84.101"
customer.​phoneNumberstring<= 32 characters

Customer phone number

customer.​phoneCountrystring[ 1 .. 3 ] characters

Country calling code of the phone number.

Required when sending customer.phoneNumber.

customer.​addressLine1string<= 30 characters

Cardholder’s street address exactly as it appears on their billing statement. This field is used in AVS.

Recommended for increasing the possibility of frictionless flow

Example: "65 Easy St"
customer.​addressLine2string<= 30 characters

Customer address line 2.

customer.​citystring<= 30 characters

Customer address city.

Recommended for increasing the possibility of frictionless flow

Example: "Las Vegas"
customer.​regionstring<= 3 characters

A level 2 country subdivision code according to ISO-3166-2.

Recommended for increasing the possibility of frictionless flow

customer.​postalCodestring[ 1 .. 9 ] characters

Cardholder’s ZIP/postal code from their billing statement. This field is used in AVS. Do not include special characters.

Note: This field only allows alphanumeric characters (a-z, A-Z, 0-9). Special characters including - are not allowed. If you are sending in zip+4 you must not include the dash so 89134-1234 would be sent as 891341234

Recommended for increasing the possibility of frictionless flow

Example: "65144"
customer.​countrystring<= 2 characters

2 character ISO Country Code. See the ISO website for details.

Recommended for increasing the possibility of frictionless flow

customer.​shippingobject

Conditional: must be sent if threeDSecure.addressMatch is 'false'

currencyCodestring(ISO 4217 3 Character Alphabetic Code)required

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: "EUR"
threeDSecureobjectrequired
Example: {"initiate":"03","browser":{"acceptHeader":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","javaEnabled":true,"javascriptEnabled":true,"language":"en-GB","colorDepth":"48","screenWidth":1920,"screenHeight":1080,"tz":-480},"headerContent":"userAgent header","challengeWindowSize":"05","transType":"01","channel":"02"}
threeDSecure.​initiatestringwrite-onlyrequired

Indicates whether to initiate the 3D Secure authentication process

ValueDescription
01Force 3D Secure authentication
03Initiate 3D Secure according to the 3D Secure Adviser result
Enum"01""03"
Example: "03"
threeDSecure.​browserobjectrequired
Example: {"acceptHeader":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","javaEnabled":true,"javascriptEnabled":true,"language":"en-GB","colorDepth":"48","screenWidth":1920,"screenHeight":1080,"tz":-480}
threeDSecure.​browser.​acceptHeaderstring[ 0 .. 2048 ] charactersrequired

Exact content of the HTTP accept headers.

Example: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
threeDSecure.​browser.​javaEnabledbooleanrequired

Indicates whether the cardholder's browser has the ability to execute Java.

ValueDescription
trueCardholder's browser does have the ability to execute Java.
falseCardholder's browser does not have the ability to execute Java.
Example: true
threeDSecure.​browser.​javascriptEnabledbooleanrequired

Indicates whether the cardholder's browser has the ability to execute Javascript.

ValueDescription
trueCardholder's browser does have the ability to execute Javascript.
falseCardholder's browser does not have the ability to execute Javascript.
Example: true
threeDSecure.​browser.​languagestring[ 2 .. 16 ] charactersrequired

Value representing the browser language as defined in IETF BCP47.

Example: "en-GB"
threeDSecure.​browser.​colorDepthstring[ 1 .. 2 ] charactersrequired

Value representing the bit depth of the colour palette for displaying images, in bits per pixel. Accepted values are:

ValueDescription
11 bit
44 bits
88 bits
1515 bits
1616 bits
2424 bits
3232 bits
4848 bits
Enum"1""4""8""15""16""24""32""48"
Example: "48"
threeDSecure.​browser.​screenWidthinteger[ 1 .. 6 ] charactersrequired

Total height of the Cardholder's screen in pixels.

Example: 1920
threeDSecure.​browser.​screenHeightinteger[ 1 .. 6 ] charactersrequired

Total height of the Cardholder's screen in pixels.

Example: 1080
threeDSecure.​browser.​tzinteger[ 1 .. 5 ] charactersrequired

Time difference between UTC time and the Cardholder browser local time, in minutes.

Example: -480
threeDSecure.​headerContentstring<= 255 charactersrequired

Exact content of the HTTP user-agent header.

Example: "userAgent header"
threeDSecure.​challengeWindowSizestring= 2 charactersrequired

Dimensions of the challenge window that will be displayed to the cardholder. The issuer replies with content that is formatted to appropriately render in this window to provide the best possible user experience. Preconfigured window sizes are given in “width x height” in pixels.

ValueDescription
01250 x 400
02390 x 400
03500 x 600
04600 x 400
05Full screen
Enum"01""02""03""04""05"
Example: "05"
threeDSecure.​transTypestring= 2 charactersrequired

Identifies the type of transaction being authenticated. The values are derived from ISO 8583.

ValueDescription
01Goods / Service purchase
03Check Acceptance
10Account Funding
11Quasi-Cash Transaction
28Prepaid activation and Loan
Enum"01""03""10""11""28"
Example: "01"
threeDSecure.​channelstring= 2 charactersrequired

Indicates the type of channel interface being used to initiate the transaction.

ValueDescription
01App-based (APP)
02Browser (BRW)
033DS Requestor Initiated (3RI)
Enum"01""02""03"
Example: "02"
threeDSecure.​addressMatchboolean

Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are identical.

ValueDescription
trueShipping Address matches Billing Address
falseShipping Address does not match Billing Address
threeDSecure.​reqChallengeIndstring= 2 characters

Indicates whether a challenge is requested for this transaction. For example: For payment authentication, a merchant may have concerns about the transaction, and request a challenge.

ValueDescription
01No preference
02No challenge requested
03Challenge requested by merchant
04Challenge requested: Mandate
05No Challenge Requested, transactional risk analysis is already performed
06No Challenge Requested, Data share only
07No Challenge Requested, SCA is already performed
08No challenge requested (utilise whitelist exemption if no challenge required)
09Challenge requested (whitelist prompt requested if challenge required)"
Enum"01""02""03""04""05""06""07""08""09"
completionUrlstringrequired

Contains the merchant URL to which the browser should be redirected after the challenge session.

Example: "https://merchant.com/completion"
riskobject

Conditional: must be sent if Risk Assessment was completed prior to processing the transaction.

apiOptionsArray of stringswrite-only

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

Example: ["ALLOWPARTIALAUTH"]
application/json
{ "dateTime": "2022-05-04T09:18:23.283-07:00", "amount": { "total": 160 }, "currencyCode": "EUR", "customer": { "firstName": "John", "lastName": "Smith", "addressLine1": "65 Easy St", "city": "Las Vegas", "postalCode": "65144", "emailAddress": "firstname.lastname@email.com", "ipAddress": "63.57.84.101" }, "card": { "number": "4012000098765439", "expirationDate": 1225, "present": "N" }, "transaction": { "invoice": "730518", "notes": "Transaction notes are added here" }, "threeDSecure": { "initiate": "03", "browser": { "acceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "javaEnabled": true, "javascriptEnabled": true, "language": "en-GB", "colorDepth": "48", "screenWidth": 1920, "screenHeight": 1080, "tz": -480 }, "headerContent": "userAgent header", "challengeWindowSize": "05", "transType": "01", "channel": "02" }, "completionUrl": "https://merchant.com/completion", "apiOptions": [ "ALLOWPARTIALAUTH" ] }

Responses

Request was processed

Bodyapplication/json
One of:
resultArray of objects
Example: {"dateTime":"2022-05-04T09:20:04.487-07:00","amount":{"tax":15,"total":160},"currencyCode":"EUR","card":{"entryMode":"M","number":"XXXXXXXXXXXX1119","present":"N","securityCode":{"result":"M","valid":"Y"},"token":{"value":"8048471746471119"},"type":"VS"},"customer":{"firstName":"John","lastName":"Smith","addressLine1":"65 Easy St","city":"Las Vegas","postalCode":"65144","emailAddress":"firstname.lastname@email.com","ipAddress":"63.57.84.101"},"merchant":{"mid":15877,"name":"Merchant XYZ"},"threeDSecure":{"trxId":"a7bbd49a-ffe6-49b2-8a92-541f0a3b053d","cryptogram":"AAAAAAAA/COBt84dnIEcwAA3gAAGhgEDoLABAAhAgAABAAAALnNCLw==","programProtocol":"2","directoryServerTranId":"07e54000-2721-4df9-aa51-04fa0e079aa8","ecommIndicator":"5"},"server":{"name":"TM01CE"},"transaction":{"authSource":"A","avs":{"postalCodeVerified":"N","result":"A","streetVerified":"Y","valid":"Y"},"invoice":"730518","responseCode":"A","retrievalReference":"402F9H0230S0"},"receipt":[{"key":"CardEntryMode","printName":"ENTRY METHOD","printValue":"KEYED"},{"key":"MaskedPAN","printValue":"XXXXXXXXXXXX1119"},{"key":"SignatureRequired","printValue":"Y"},{"key":"TransactionResponse","printName":"Response","printValue":"APPROVED"}]}
Response
application/json
{ "result": { "dateTime": "2022-05-04T09:20:04.487-07:00", "amount": { "tax": 15, "total": 160 }, "currencyCode": "EUR", "card": { "entryMode": "M", "number": "XXXXXXXXXXXX1119", "present": "N", "securityCode": { "result": "M", "valid": "Y" }, "token": { "value": "8048471746471119" }, "type": "VS" }, "customer": { "firstName": "John", "lastName": "Smith", "addressLine1": "65 Easy St", "city": "Las Vegas", "postalCode": "65144", "emailAddress": "firstname.lastname@email.com", "ipAddress": "63.57.84.101" }, "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "threeDSecure": { "trxId": "a7bbd49a-ffe6-49b2-8a92-541f0a3b053d", "cryptogram": "AAAAAAAA/COBt84dnIEcwAA3gAAGhgEDoLABAAhAgAABAAAALnNCLw==", "programProtocol": "2", "directoryServerTranId": "07e54000-2721-4df9-aa51-04fa0e079aa8", "ecommIndicator": "5" }, "server": { "name": "TM01CE" }, "transaction": { "authSource": "A", "avs": { "postalCodeVerified": "N", "result": "A", "streetVerified": "Y", "valid": "Y" }, "invoice": "730518", "responseCode": "A", "retrievalReference": "402F9H0230S0" }, "receipt": [ { "key": "CardEntryMode", "printName": "ENTRY METHOD", "printValue": "KEYED" }, { "key": "MaskedPAN", "printValue": "XXXXXXXXXXXX1119" }, { "key": "SignatureRequired", "printValue": "Y" }, { "key": "TransactionResponse", "printName": "Response", "printValue": "APPROVED" } ] } }

Request

This endpoint is utilized to send the status of the device fingerprint. This must be sent whenever the response to the 3D Secure Standalone results in a device fingerprint required.

Integration Methods:

  • Host Direct

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

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
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

transactionobjectrequired
transaction.​invoicestring<= 10 charactersrequired

10-digit invoice number assigned by the interface to identify a transaction. An invoice number serves as a unique key that identifies a transaction within a batch in Shift4's Gateway.

Note: For US and Canadian processing: Although the invoice number is sent as a JSON string it is a numeric value. No alpha characters are allowed.

For processing outside of the US and Canada alpha characters are allowed.

threeDSecureobjectrequired
threeDSecure.​trxIdstring<= 36 charactersrequired

The assigned 3D Secure transaction ID

threeDSecure.​compIndstring= 1 charactersrequired

Indicates whether or not the device fingerprint was completed successfully.

ValueDescription
YYes
NNo
UUnknown
Enum"Y""N""U"
merchantobject
application/json
{ "dateTime": "2022-05-04T09:20:04.487-07:00", "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "transaction": { "invoice": "730518" }, "threeDSecure": { "trxId": "a7bbd49a-ffe6-49b2-8a92-541f0a3b053d", "compInd": "Y" } }

Responses

Transaction was processed

Bodyapplication/json
One of:
resultArray of objects
Example: {"dateTime":"2022-05-04T09:20:04.487-07:00","amount":{"tax":15,"total":160},"currencyCode":"EUR","card":{"entryMode":"M","number":"XXXXXXXXXXXX1119","present":"N","securityCode":{"result":"M","valid":"Y"},"token":{"value":"8048471746471119"},"type":"VS"},"customer":{"firstName":"John","lastName":"Smith","addressLine1":"65 Easy St","city":"Las Vegas","postalCode":"65144","emailAddress":"firstname.lastname@email.com","ipAddress":"63.57.84.101"},"merchant":{"mid":15877,"name":"Merchant XYZ"},"server":{"name":"TM01CE"},"transaction":{"authorizationCode":"OK868Z","authSource":"A","avs":{"postalCodeVerified":"N","result":"A","streetVerified":"Y","valid":"Y"},"invoice":"730518","responseCode":"A","retrievalReference":"402F9H0230S0","saleFlag":"S"},"receipt":[{"key":"CardEntryMode","printName":"ENTRY METHOD","printValue":"KEYED"},{"key":"MaskedPAN","printValue":"XXXXXXXXXXXX1119"},{"key":"SignatureRequired","printValue":"Y"},{"key":"TransactionResponse","printName":"Response","printValue":"APPROVED"}]}
Response
application/json
{ "result": { "dateTime": "2022-05-04T09:20:04.487-07:00", "amount": { "tax": 15, "total": 160 }, "currencyCode": "EUR", "card": { "entryMode": "M", "number": "XXXXXXXXXXXX1119", "present": "N", "securityCode": { "result": "M", "valid": "Y" }, "token": { "value": "8048471746471119" }, "type": "VS" }, "customer": { "firstName": "John", "lastName": "Smith", "addressLine1": "65 Easy St", "city": "Las Vegas", "postalCode": "65144", "emailAddress": "firstname.lastname@email.com", "ipAddress": "63.57.84.101" }, "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "server": { "name": "TM01CE" }, "transaction": { "authorizationCode": "OK868Z", "authSource": "A", "avs": { "postalCodeVerified": "N", "result": "A", "streetVerified": "Y", "valid": "Y" }, "invoice": "730518", "responseCode": "A", "retrievalReference": "402F9H0230S0", "saleFlag": "S" }, "receipt": [ { "key": "CardEntryMode", "printName": "ENTRY METHOD", "printValue": "KEYED" }, { "key": "MaskedPAN", "printValue": "XXXXXXXXXXXX1119" }, { "key": "SignatureRequired", "printValue": "Y" }, { "key": "TransactionResponse", "printName": "Response", "printValue": "APPROVED" } ] } }
Operations
OperationsWebhooks
Operations