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

Request

This request initiates a PayPal transaction.

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
amountobjectrequired
amount.​taxnumber<= 14 charactersrequired

The amount of sales tax charged for a transaction. The tax amount is used by businesses to track tax expenses for accounting purposes. Identifying the tax amount also helps consumers understand the total amount that they were billed. This field is part of Level 2 card data.

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.

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.

customerobjectrequired
customer.​addressLine1string<= 30 charactersrequired

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

customer.​citystring<= 30 charactersrequired

Customer address city.

customer.​countrystring<= 2 charactersrequired

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

customer.​emailAddressstring<= 80 charactersrequired

Customer email address.

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.

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.

customer.​ipAddressstring<= 20 charactersrequired

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

customer.​phoneNumberstring<= 32 charactersrequired

Customer phone number

customer.​phoneCountrystring[ 1 .. 3 ] charactersrequired

Country calling code of the phone number.

Required when sending customer.phoneNumber.

customer.​regionstring<= 3 charactersrequired

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

customer.​externalIdstringrequired

Your external identifier for the Customer

customer.​enrollDatestring(ISO 8601)required

Date of the user's first transaction in your system, regardless of payment method used. The date and time must be passed in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm)

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

sourceIpstringrequired

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

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.

transaction.​vendorReferencestring<= 50 charactersrequired

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

transaction.​otaobject

Conditional: Utilize this object for Online Travel Agency transactions

application/json
{ "amount": { "tax": 15, "total": 160 }, "currencyCode": "USD", "customer": { "addressLine1": "65 Easy St", "city": "Las Vegas", "country": "US", "emailAddress": "john.smith@email.com", "firstName": "John", "lastName": "Smith", "ipAddress": "63.57.84.101", "phoneNumber": "3110001234", "phoneCountry": "1", "region": "NV", "externalId": "OD-123", "enrollDate": "2019-03-14T11:16:42.896-07:00" }, "dateTime": "2024-05-21T09:18:23.283-07:00", "sourceIp": "63.57.84.101", "transaction": { "invoice": "0510093358", "ota": { "changeGuest": "Y", "serviceEndDate": "2024-04-20", "serviceStartDate": "2024-04-18", "startCity": "Las Vegas", "startCountry": "US", "startZipCode": "89134", "type": [ "hotel", "airline", "trainticket" ] }, "vendorReference": "12382-01" } }

Responses

Transaction was processed

Bodyapplication/json
resultArray of objects
Response
application/json
{ "result": [ { "amount": { "tax": 15, "total": 160 }, "dateTime": "2024-05-21T09:18:23.283-07:00", "payPal": { "clientMetaDataId": "6f52ab38539f7e1037e8aa8e7b95407b", "clientToken": "eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiJleUowZVhBaU9pSktWMVFpTENKaGJHY2lPaUpGVXpJMU5pSXNJbXRwWkNJNklqSXdNVGd3TkRJMk1UWXRjMkZ1WkdKdmVDSXNJbWx6Y3lJNkltaDBkSEJ6T2k4dllYQnBMbk5oYm1SaWIzZ3VZbkpoYVc1MGNtVmxaMkYwWlhkaGVTNWpiMjBpZlEuZXlKbGVIQWlPakUzTVRNMk1qWXdNelVzSW1wMGFTSTZJbVl6WVRFek9EQm1MVFJpTURRdE5ERXpOQz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}, "transaction": { "authSource": "E", "invoice": "0510093358", "vendorReference": "12382-01" } } ] }

Request

This authorizes and captures the transaction. In addition, it will return a payload that includes the transaction's sale details.

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

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

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.

transaction.​airlineobject

Conditional: Utilize this object for Airline transactions

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.

transaction.​vendorReferencestring<= 50 characters

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

sourceIpstringrequired

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

customerobjectrequired
customer.​browserTypestringrequired

Internet browser or simply a browser.

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.

payPalobjectrequired
payPal.​payerIdstringrequired

The ID belonging to the PayPal account.

payPal.​paymentMethodNoncestringrequired

A payment method nonce is a secure, one-time-use reference to payment information. It's the key element that allows your server to communicate sensitive payment information to Braintree without ever touching the raw data.

payPal.​deviceDatastringrequired

The customer's device information.

payPal.​paymentMethodIdUsagestring

Dictates whether paymentMethodId returned will be single or multi-use payment token

ValueDescription
SSingle Use
MMultiple Use
Enum"S""M"
application/json
{ "dateTime": "2022-04-14T13:31:52.023807", "amount": { "total": 15 }, "currencyCode": "USD", "transaction": { "invoice": "0414133134" }, "payPal": { "payerId": "6CB2GS6AQRS5S", "paymentMethodNonce": "fd66f90e-c8ec-0363-6b45-aeb930175e43", "deviceData": "{\"correlation_id\":\"010e4 a744d78644f971fc5f9dc1c43aa\"}" }, "sourceIp": "10.249.11.254", "customer": { "browserType": "Mozilla 5.0" } }

Responses

Transaction was processed

Bodyapplication/json
resultArray of objects
Response
application/json
{ "result": [ { "dateTime": "2022-04-14T12:18:26.717923-07:00", "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "transaction": { "authSource": "A", "invoice": "0414151800", "responseCode": "A" }, "server": { "name": "WH-APM-V01.PPDEV1" }, "payPal": { "transactionId": "dHJhbnNhY3Rpb25fazd6cDB5ZzA", "legacyId": "k7zp0yg0", "orderId": "444106-8010720-0414151800-4371", "authorizationId": "6W6361048T1775802", "captureId": "3EK61497JE2934158", "status": "SETTLING", "paymentMethodId": "dda7z0fq" }, "amount": { "total": 15 } } ] }

Request

This refunds a settled transaction. In addition, it will return a payload that includes the transaction’s refund details.

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

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

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.

transaction.​originalInvoicestring<= 10 charactersrequired

The invoice number from the original sale. Used to link the refund to the original sale.

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.

transaction.​originalDatestring(ISO 8601)required

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

Must be an exact match for the value sent in the original transaction request.

application/json
{ "dateTime": "2021-04-15T09:18:23.283-07:00", "amount": { "total": 15 }, "transaction": { "invoice": "0414151837", "originalInvoice": "0414151800", "originalDate": "2022-04-14T00:00:00-04:00" } }

Responses

Transaction was processed

Bodyapplication/json
resultArray of objects
Response
application/json
{ "result": [ { "dateTime": "2022-04-14T12:18:47.515770-07:00", "amount": { "total": 15 }, "merchant": { "mid": 15877, "name": "Merchant XYZ" }, "transaction": { "authSource": "A", "invoice": "0414151837", "responseCode": "A" }, "payPal": { "transactionId": "cmVmdW5kX2s4dDRkZGEx", "legacyId": "k8t4dda1", "orderId": "444106-8010720-0414151837-4372", "status": "SETTLING" }, "server": { "name": "WH-APM-V01.PPDEV1" } } ] }
Operations
Operations
OperationsWebhooks
Operations