PNSP (POS Network Server Protocol)

Network communication layer with a POS Port Interface (POS) server.

Client command set:

CommandArgs
LOGIN login-id
PASS password
SEND trans-code field field...
REQ trans-code draft-id field field...
ACK trans-code draft-id
QUIT<none>
HELP<none>

Server response set:

RangeType
000-199Error
200-399Good
400-599Need More Info
600-899Response

Client Commands
LOGIN login-id

Login this connection with login-id. This is required before any other command will be accepted. This may be followed by a 400 Password Required response from the server.

HALT

Shutdown the server (Note: may disable this)

HELP

Print command set.

PASS password

If the server requires a password send it after LOGIN with this command.

QUIT

Quit your session and close your connection--discarding any pending responses.

REQ tcode draftid request

Submit a request directly to the POS Port interface. The dbref is a unique alphanumeric identifier for this request which is also inserted as a field in the request as the Draft ID (code 65). When using REQ, DO NOT include a DraftID in the fields. If you do, the POSd will respond with a error 100. If the DraftID is already in use, error 175 will be returned and the request will not be processed. The tcode is the Transaction Code, and must be one of the valid Transaction codes given in EIS1103 table 7.1.3. The request is generated from PPI fields formatted as:

FC:DATA

Where FC is the field code (see tables 9.1.x). If DATA contains spaces it should be quoted (with double quotes). Space is used as a delimiter beetween fields. Example using User Memo (18) and Expiration Date (31):

18:"i 15125" 31:0100

Note: Quotes may or may not be used in responses. Some databases have difficulty parsing quotes in this manner, so you can enable an option to replace spaces in responses with underscores, rather than quoting them as above.

ACK tcode draftid

Acknowledge full recieval of a 650 response. When the ACK is received the response is forgotten. Until the ACK is received the response will be remembered, and each time the user connects it will be printed, until it is Acknowledged.

SEND tcode request

Similar to REQ, except no draft is used, and the request/response is not tracked by the server, thus no ACK is necessary.

Server Responses

Responses are formatted as:

CODE -- INFO -- NAME

CODE is the unique numeric code. INFO is formatted specific to the code, db-quoted fields may exist to include space within a field. Name is simply an explanation of the code, and is not required. Specific responses:

000 -- REASON -- Connection Failed
025 -- REQUEST-CODE REQUEST -- Unable to send request
050 -- REASON -- Input Error
075 -- CMD -- Authorization Failed
100 -- REASON -- Command Error
125 -- CMD -- Unsupported Command
150 -- CMD -- Authorization Required
155 -- REASON -- Authorization Failed
175 -- DBREF -- DBREF exists, REQ refused
200 -- CMD -- Ok
225 -- CMD -- MESSAGE
250 -- ID -- Login Ok
350 -- VERSION -- PNSP Server
400 -- ID -- Password Required
600 -- RESPONSE-CODE RESPONSE -- PPI Request Response
650 -- RESPONSE_CODE DRAFT-ID RESPONSE -- PPI Request Response

Common Requests

For a full listing of Field Codes see tables 9.1.x. The following is a list of common uses and the appropriate codes:

Passive Credit Authorization:

SEND 10 18:<Memo> 30:<Account> 31:<ExpDate> 35:VC 72:<AVS>

Passive Credit Authorization:

SEND 10 18:<Memo> 30:<Account> 31:<ExpDate> 35:PR 40:<Amount> 64:<MerchantID> 67:<EmployeeID> 72:<AVS>

Passive Credit Reversal:

SEND 13 1:<ApprCode> 3:<LocalDate> 4:<LocalTime> 17:<CIC> 30:<Account> 31:<ExpDate> 34:<ADS> 35:AR 44:<Amount> 64:<MerchantID> 67:EmployeeID> 72:<AVS> 79:<RefNo> 80:<TransID>

Off-Line Credit Purchase:

REQ 25 <DraftID> 0:<RespCode> 1:<ApprCode> 3:<LocalDate> 4:<LocalTime> 17:<CIC> 18:<Memo> 30:<Account> 34:<ADS> 35:PR 40:<Amount> 50:<BatchID> 51:<GroupID> 64:<MerchantID> 67:<EmployeeID> 75:<AVRC> 79:<RefNo> 80:<TID> 81:<ValidCode>

Off-Line Credit Purchase:

REQ 26 <DraftID> 3:<LocalDate> 4:<LocalTime> 18:<Memo> 30:<Account> 35:CR 40:<Amount> 50:<BatchID> 51:<GroupID> 64:<MerchantID> 67:<EmployeeID>

Create Group:

SEND 50 50:<BatchID> 51:<GroupID>

Create Batch:

SEND 60 50:<BatchID> 64:<MerchantID>

Close Batch:

SEND 61 50:<BatchID>

Release Batch:

SEND 63 50:<BatchID>

Delete Batch:

SEND 65 50:<BatchID>

Retrieve Total:

SEND 71 50:<BatchID>

Retrieve Status:

SEND 72 71:F

Retrieve Status:

SEND 72 71:N

Retrieve Status:

SEND 72 72:<BatchID>

Settle Now:

SEND 75

Loop Back (testing):

SEND 80

Pre-Dial Request:

SEND 86