Shift4 Batches API
The Batches API from Shift4 — 1 operation(s) for batches.
Operations 1
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
The Batches API from Shift4 — 1 operation(s) for batches.
Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/shift4:shift4-batches-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: 1.7.57
title: Shift4 Payment Batches API
contact:
url: https://www.shift4.com/contact-us/
servers:
- url: https://api.shift4test.com/api/rest/v1
description: Host Direct Test URL
- url: https://api.shift4api.net/api/rest/v1
description: Host Direct Production URL
tags:
- name: Batches
paths:
/batches/submit:
servers:
- url: https://api.shift4test.com/api/rest/v1
description: Host Direct Test URL
- url: https://api.shift4api.net/api/rest/v1
description: Host Direct Production URL
post:
tags:
- Batches
summary: Submit Batch
operationId: batchessubmit
security:
- AccessToken: []
description: 'This function is used to close a batch.
**Integration Methods:**
- Host Direct
See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option.'
parameters:
- $ref: '#/components/parameters/InterfaceVersion'
- $ref: '#/components/parameters/InterfaceName'
- $ref: '#/components/parameters/CompanyName'
- $ref: '#/components/parameters/AccessToken'
requestBody:
required: true
content:
application/json:
schema:
required:
- dateTime
- transaction
- batch
properties:
dateTime:
$ref: '#/components/schemas/DateTime'
transaction:
type: object
required:
- businessDate
properties:
businessDate:
$ref: '#/components/schemas/SubmitBatchBusinessDate'
batch:
$ref: '#/components/schemas/Batch'
responses:
'200':
description: Request was processed
content:
application/json:
schema:
properties:
result:
type: array
items:
type: object
properties:
dateTime:
$ref: '#/components/schemas/DateTime'
batch:
$ref: '#/components/schemas/BatchResponse'
merchant:
$ref: '#/components/schemas/MerchantResponse'
transaction:
type: object
properties:
businessDate:
$ref: '#/components/schemas/TransactionBusinessDate'
server:
$ref: '#/components/schemas/Server'
'400':
description: Error
content:
application/json:
schema:
properties:
result:
type: array
items:
type: object
properties:
error:
$ref: '#/components/schemas/Error'
server:
$ref: '#/components/schemas/Server'
examples:
Error:
$ref: '#/components/examples/BatchError'
'504':
$ref: '#/components/responses/TimeoutResponse'
components:
schemas:
BatchResponse:
type: object
properties:
inclusive:
$ref: '#/components/schemas/BatchInclusiveResponse'
netAmount:
$ref: '#/components/schemas/BatchNetAmountResponse'
netCount:
$ref: '#/components/schemas/BatchNetCountResponse'
refundAmount:
$ref: '#/components/schemas/BatchRefundAmount'
refundCount:
$ref: '#/components/schemas/BatchRefundCount'
saleAmount:
$ref: '#/components/schemas/BatchSaleAmount'
saleCount:
$ref: '#/components/schemas/BatchSaleCount'
processors:
$ref: '#/components/schemas/BatchProcessorsArray'
ErrorCode:
type: integer
maxLength: 5
readOnly: true
example: 64100
description: 'Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
**Note: This is currently only supported for European merchant processing.**
'
Batch:
type: object
required:
- inclusive
properties:
inclusive:
$ref: '#/components/schemas/BatchInclusive'
netAmount:
$ref: '#/components/schemas/BatchNetAmount'
netCount:
$ref: '#/components/schemas/BatchNetCount'
MerchantResponse:
type: object
properties:
mid:
$ref: '#/components/schemas/MerchantMID'
name:
$ref: '#/components/schemas/MerchantName'
BatchNetCount:
type: integer
example: 187
description: 'The net transaction count in the batch (sales PLUS refunds). If this field is sent and the count does not match, an error will be returned, and the batch will not be closed.
'
BatchNetCountResponse:
type: integer
example: 187
description: 'The net transaction count in the batch (saleCount PLUS refundCount)
'
BatchSaleCount:
type: integer
readOnly: true
example: 186
description: 'The count of all sales in the batch
'
ErrorSeverity:
type: string
enum:
- Info
- Error
- Alert
readOnly: true
example: Info
description: 'Severity level of the error.
| Severity | Description |
| -------- | ---------------------------------------------------------------- |
| Info | Action not required - Data input/formatting is incorrect |
| Error | Action may be required - Communication, timeout or network issue |
| Alert | Action required - System issue |
'
BatchSaleAmount:
type: number
maxLength: 14
readOnly: true
example: 5701.78
description: 'The total amount of all sales in the batch
'
BatchInclusiveResponse:
type: string
minLength: 1
maxLength: 1
example: N
enum:
- Y
- N
description: 'Indicates whether or not the batch includes transactions for every day leading up to the business date.
Value|Description
-----|-----------
Y | The batch includes transactions for every day leading up to the specified business date
N | The batch includes transactions for only the specified business date
'
BatchProcessorsArchivesId:
type: integer
maxLength: 10
example: '41'
description: "The ID that was assigned to the closed batch. \n"
ErrorShortText:
type: string
maxLength: 16
readOnly: true
example: NOT IN CARDRANGE
description: 'Abbreviated error message that is always returned if an error condition exists
'
Server:
type: object
readOnly: true
properties:
name:
$ref: '#/components/schemas/ServerName'
BatchNetAmountResponse:
type: number
maxLength: 14
example: 5601.78
description: 'The net amount in the batch (saleAmount MINUS refundAmount)
'
BatchProcessors:
type: object
properties:
archivesID:
$ref: '#/components/schemas/BatchProcessorsArchivesId'
processor:
$ref: '#/components/schemas/BatchProcessorsProcessor'
currencyCode:
$ref: '#/components/schemas/BatchProcessorsCurrencyCode'
refundAmount:
$ref: '#/components/schemas/BatchRefundAmount'
refundCount:
$ref: '#/components/schemas/BatchRefundCount'
saleAmount:
$ref: '#/components/schemas/BatchSaleAmount'
saleCount:
$ref: '#/components/schemas/BatchSaleCount'
ErrorLongText:
type: string
maxLength: 255
readOnly: true
example: Card type not recognized
description: 'Extended error message that is returned if an error condition exists.
'
LighthouseDataResponse:
type: string
example: eyJwYXltZW50SWQiOiI4NWM0MWNhNy01NzVjLTQzNGUtODIyZi0xYzZlOTE0ZDAzODYiLCJyZW1haW5pbmdBbW91bnQiOjB9
description: 'Base64 encoded JSON formatted data that will be returned from Lighthouse to be passed back to SkyTab. This data will contain variable information.
'
Error:
type: object
properties:
code:
$ref: '#/components/schemas/ErrorCode'
severity:
$ref: '#/components/schemas/ErrorSeverity'
shortText:
$ref: '#/components/schemas/ErrorShortText'
longText:
$ref: '#/components/schemas/ErrorLongText'
primaryCode:
$ref: '#/components/schemas/ErrorPrimaryCode'
secondaryCode:
$ref: '#/components/schemas/ErrorSecondaryCode'
SubmitBatchBusinessDate:
type: string
format: ISO 8601
minLength: 10
example: '2021-04-15T00:00:00.000-07:00'
description: 'The business date you want to close a batch for.
'
BatchNetAmount:
type: number
maxLength: 14
example: 5601.78
description: 'The net amount that is expected to be in the batch (sales MINUS refunds). If this field is sent and the amount does not match, an error will be returned, and the batch will not be closed.
'
ServerName:
type: string
maxLength: 50
example: TM01CE
description: 'The name of the server that processed the request.
'
BatchProcessorsArray:
type: array
items:
$ref: '#/components/schemas/BatchProcessors'
MerchantName:
type: string
maxLength: 22
example: Merchant XYZ
description: 'The merchant’s business name as configured with Shift4.
'
BatchProcessorsProcessor:
type: string
readOnly: true
example: TSYS
description: 'The processor which handled this batch of transactions.
'
TransactionBusinessDate:
type: string
format: ISO 8601
minLength: 10
example: '2021-04-15'
description: 'Desired business date of a transaction. Include when overriding the existing business date of a transaction. The overriding date may be earlier or later than the existing date. (yyyy-mm-dd)
'
BatchInclusive:
type: string
minLength: 1
maxLength: 1
example: N
enum:
- Y
- N
description: 'Indicates whether or not you want the batch to include transactions for every day leading up to the `transaction.businessDate`.
Value|Description
-----|-----------
Y | The batch will contain transactions for every day leading up to the specified `businessDate`
N | The batch will contain transactions for only the specified `businessDate`
'
BatchRefundCount:
type: integer
readOnly: true
example: 1
description: 'The count of all refunds in the batch
'
BatchProcessorsCurrencyCode:
type: string
readOnly: true
example: '840'
description: 'The type of currency used for this batch of transactions.
'
DateTime:
type: string
format: ISO 8601
example: '2024-05-21T09:18:23.283-07:00'
description: '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
'
ErrorSecondaryCode:
type: integer
maxLength: 4
readOnly: true
example: 0
description: 'This code supplements the code specified in the `error.primaryCode` field to provide additional information about the error that occurred.
'
BatchRefundAmount:
type: number
maxLength: 14
readOnly: true
example: 100
description: 'The total amount of all refunds in the batch
'
MerchantMID:
type: number
maxLength: 10
example: 15877
description: 'The merchant ID associated with the merchant account.
'
ErrorPrimaryCode:
type: integer
maxLength: 4
readOnly: true
example: 9842
description: 'Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
'
parameters:
InterfaceName:
required: true
name: InterfaceName
in: header
schema:
type: string
maxLength: 25
example: ForwardPOS
description: '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: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =
'
CompanyName:
required: true
name: CompanyName
in: header
schema:
type: string
maxLength: 26
example: PAWS
description: '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: $ % : ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =
'
InterfaceVersion:
required: true
name: InterfaceVersion
in: header
schema:
type: string
maxLength: 11
example: '2.1'
description: 'Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed: $ % : ^ - ~ < > , ? “ ” ‘ ’ { } [ ] \ + =
'
AccessToken:
required: true
name: AccessToken
in: header
schema:
type: string
format: uuid
maxLength: 52
example: EA79FB05-3AA7-4500-AF9A-73F986FF2C1D
description: 'A security credential used to authenticate API requests and all [i4Go®](https://s4-myportal.s3.amazonaws.com/downloads/documentation/i4go/i4go%20technical%20reference%20guide.pdf) 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](/apis/payments-platform-rest/openapi/credentials/accesstokenexchange) request, which generates an Access Token using an `authToken` and `clientGuid`.
'
examples:
BatchError:
summary: Batch Error
value:
result:
- error:
primaryCode: 9300
secondaryCode: 2
shortText: BATCH FAILED
longText: Received Net Amount 1124.49 doesn't match existing Net Amount 1356.27. Batch submission process failed.
server:
name: U2API02CE
responses:
TimeoutResponse:
description: Timeout
content:
application/json:
schema:
properties:
result:
type: array
items:
type: object
properties:
error:
$ref: '#/components/schemas/Error'
lighthouse:
type: object
properties:
data:
$ref: '#/components/schemas/LighthouseDataResponse'
server:
$ref: '#/components/schemas/Server'
example:
result:
- error:
primaryCode: 9951
secondaryCode: 0
shortText: RESPONSE TIMEOUT
longText: Timeout waiting for response across the internet
lighthouse:
data: eyJwYXltZW50SWQiOiI4NWM0MWNhNy01NzVjLTQzNGUtODIyZi0xYzZlOTE0ZDAzODYiLCJyZW1haW5pbmdBbW91bnQiOjB9
server:
name: U2API01CE
securitySchemes:
AccessToken:
type: apiKey
name: AccessToken
in: header
description: "A security credential used to authenticate API requests and all [i4Go®](https://s4-myportal.s3.amazonaws.com/downloads/documentation/i4go/i4go%20technical%20reference%20guide.pdf) authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. \n\nExample:\n ```\n AccessToken: EA79FB05-3AA7-4500-AF9A-73F986FF2C1D\n ```\n"
HMAC-SHA256:
type: http
scheme: hmac-sha256
description: "Authentication using HMAC-256 signatures as the authorization scheme.\n\nSent in the `Authorization` header in the following format:\n\n`Authorization`: **HMAC-SHA256** `Credential`={value}&`Signature`={value}\n\n| Argument | Description |\n|---------------|--------------------------------------------------|\n| HMAC-SHA256 | Authorization scheme. |\n| Credential | The ID of the key used to compute the signature. |\n| Signature | base64 encoded HMACSHA256 value. |\n\nExample: \n ```\n Authorization: HMAC-SHA256 Credential=AESKEY1&Signature=8SFtIc6zQlswxAZqDKXL+BpRmlDvIWyjOwU8wdl0zK4=\n ```\n"