Additional Functions
Remember that these API calls will be HTTP POST requests to the TCP/IP address where DeviceHub is installed. Typically, this address will be:
POST http://localhost:17000
There are special calls that offer their functionality through the content of the XML message itself. They are known as CallSpecificFunction. They have the same common elements as all calls: ClientIdValue, ... but in addition, all of this type have the following common parameters:
- Function
- Modifier
- Parameter 1
- Parameter 2
- Parameter 3
Below is a generic example as a prototype:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:CallSpecificFunctionRequest>
<tem:Header>
<tem:ClientId>ClientIdValue</tem:ClientId>
<tem:StoreId>StoreIdValue</tem:StoreId>
<tem:PosId>PosValue</tem:PosId>
<tem:Lang>Idioma</tem:Lang>
<tem:ExtraData1></tem:ExtraData1>
</tem:Header>
<tem:Function>FunctionCode</tem:Function>
<tem:Modifier>FunctionModifier</tem:Modifier>
<tem:Parameter1>Parameter1</tem:Parameter1>
<tem:Parameter2>Parameter1</tem:Parameter2>
<tem:Parameter3>Parameter3</tem:Parameter3>
</tem:CallSpecificFunctionRequest>
</soap:Body>
</soap:Envelope>
Referenced Returns [BeginDevolution]
In this case, having an amount and a ticket number, the return transaction is launched, requesting financial authorization. The response code reflects whether the request has been delivered to the DeviceHub service. To obtain the transaction result, it is necessary to use the GetNextMessage function.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:BeginDevolutionRequest>
<tem:Header>
<tem:ClientId>ClientIdValue</tem:ClientId>
<tem:StoreId>StoreIdValue</tem:StoreId>
<tem:PosId>PosIdValue</tem:PosId>
<tem:Lang>Idioma</tem:Lang>
<tem:ExtraData1></tem:ExtraData1>
</tem:Header>
<tem:Amount>Importe</tem:Amount>
<tem:TicketNumber>TicketNumber</tem:TicketNumber>
</tem:BeginDevolutionRequest>
</soap:Body>
</soap:Envelope>
Request: BeginDevolutionRequest
| TYPE | NAME | COMMENTS |
|---|---|---|
| Header | Header | Data used during subsequent queries. |
| String | Amount | Refund amount. Amount of the operation with 10 numeric digits, where the last two digits represent the cents. |
| String | TicketNumber | Refund receipt number. |
Header
| TYPE | NAME | COMMENTS |
|---|---|---|
| String | Clientid | Merchant identifier. |
| String | Storeid | Store identifier. |
| String | Posid | Point of Sale Terminal identifier. |
| String | Language | Language identifier: 0 Spanish 1 English. |
| String | ExtraData1 | Not used. |
Note: The Posid field must not exceed 30 characters, and it is recommended not to use the following symbols within the field:
{"/","\"}
Output Parameters
Response: BeginDevolutionResponse
| TYPE | NAME | COMMENTS |
|---|---|---|
| Result | Result | Returns 0=OK or an error code and its description. |
Result
| TYPE | NAME | COMMENTS |
|---|---|---|
| Int | Code | Error code. |
| String | Description | Error description |
Ticket Printing Information
The cash register software must include a series of data for ticket printing. The mandatory and optional fields are as follows:
| MANDATORY RETURN RECEIPT FIELDS |
|---|
| Operation type |
| Merchant name |
| City of merchant |
| Card number replacing the first 12 digits with '*' |
| Application label with the following priority 'ApplicationLabel(T50), 'Terminal label'(Only if the operation was carried out with EMV card) |
| Operation date and time (DDMMYY hhmm) |
| Authorization number |
| Operation amount with currency indication |
| Merchant's receipt: Indicate that it is a copy and that it is for the merchant |
| Customer receipt: Merchant signature box indicating that the receipt is for the customer |
| Other copies: Indicate that it is a copy |
| OPTIONAL FIELDS |
|---|
| Cardholder (some companies include it and others do not) |
| Authorizing center |
| Payment gateway |
Ticket printing depends on the Pin Pad model used:
- Fixed PIN Pads (integrated): Printing and ticket fields depend on the POS.
- Wireless PIN Pads (stand-alone): Printing and ticket fields depend on the Sipay gateway.
IMPORTANT: It should be noted that ticket printing represents the completion of the transaction. If the ticket is not printed (on the POS or on the PIN Pad itself), the operation will not be completed, and it will be necessary to send a cancellation of the ongoing operation by the POS.
- For those merchants who wish to work with return verification (return associated with a sale whose amount can never exceed that of the original sale), they must request the configuration from Sipay. The ticket number must be the same as that of the original sale. The verification return has a maximum return period of 3 months.
File 3000 Loading [CallSpecificFunction 20]
This operation allows the loading of a 3000 configuration file to the PIN Pads (file provided by Sipay Plus). During the process, no financial operations can be carried out.
The manufacturer recommends deleting the current parameters before performing a 3000 file upload. This deletion must be performed by the device keyboard, so if you need more information, please contact the Sipay support team.
Parameters:
The header data must be the same as in all transactions.
- Function: 20
- Modifier: 0
- Parameter1: Path and name of the 3000 file to load.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:CallSpecificFunctionRequest>
<tem:Header>
<tem:ClientId>ClientIdValue</tem:ClientId>
<tem:StoreId>StoreIdValue</tem:StoreId>
<tem:PosId>PosIdValue</tem:PosId>
<tem:Lang>Idioma</tem:Lang>
<tem:ExtraData1></tem:ExtraData1>
</tem:Header>
<tem:Function>20</tem:Function>
<tem:Modifier>0</tem:Modifier>
<tem:Parameter1>C:\path\to\file.txt</tem:Parameter1>
<tem:Parameter2></tem:Parameter2>
<tem:Parameter3></tem:Parameter3>
</tem:CallSpecificFunctionRequest>
</soap:Body>
</soap:Envelope>
PINOnline Key Loading [CallSpecificFunction 4]
Parameters:
The header data must be the same as in all transactions.
- Function: 4
- Modifier: 0
- Parameter1: Drawer number to update (1.9).
- Parameter2: Not used.
- Parameter3: Not used.
This functionality is only used on devices that work with PINOnline, and it triggers the request to update the keys with the processing entity.
It should be used when requested by the authorizing entity or when an initial PINOnline loading is to be performed on a compatible device. To carry out this action, you must contact the Sipay support team, as the device could become unusable in case of improper operation.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:CallSpecificFunctionRequest>
<tem:Header>
<tem:ClientId>ClientIdValue</tem:ClientId>
<tem:StoreId>StoreIdValue</tem:StoreId>
<tem:PosId>PosIdValue</tem:PosId>
<tem:Lang>Idioma</tem:Lang>
<tem:ExtraData1></tem:ExtraData1>
</tem:Header>
<tem:Function>4</tem:Function>
<tem:Modifier>0</tem:Modifier>
<tem:Parameter1>2</tem:Parameter1>
<tem:Parameter2></tem:Parameter2>
<tem:Parameter3></tem:Parameter3>
</tem:CallSpecificFunctionRequest>
</soap:Body>
</soap:Envelope>
Cancellation from POS [CallSpecificFunction 0]
At the moment when the waiting time is exceeded or there is an error during the transaction, it is very important to call the Cancel function with the ticket number.
After launching the cancellation call, the circuit must be followed to check with the GetNextMessage function. Getting a 1000 means that the DeviceHub has received the cancellation request correctly, but it does not indicate that it has been processed at that moment. The cancellation process is asynchronous and will be carried out when the DeviceHub has a connection with the entity.
To verify that the operation has been canceled, it is necessary to check the Sipay operations website, bearing in mind that this process can take up to 24 hours.
Parameters:
The header data must be the same as in all transactions.
- Function: 0
- Modifier: 0
- Parameter1: String type, amount of the original transaction to be canceled. (See Note 1)
- Parameter2: Ticket number of the operation to be canceled or the sequence number.
- Parameter3: Not used.
Note 1: Amount in the same format as the transaction with 10 digits, where the last 2 are cents. Ex: €1.25 -> 0000000125.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
<soap:Header/>
<soap:Body>
<tem:CallSpecificFunctionRequest>
<tem:Header>
<tem:ClientId>ClientIdValue</tem:ClientId>
<tem:StoreId>StoreIdValue</tem:StoreId>
<tem:PosId>PosIdValue</tem:PosId>
<tem:Lang>Idioma</tem:Lang>
<tem:ExtraData1></tem:ExtraData1>
</tem:Header>
<tem:Function>0</tem:Function>
<tem:Modifier>0</tem:Modifier>
<tem:Parameter1>0000000001</tem:Parameter1>
<tem:Parameter2>ticketnumber</tem:Parameter2>
<tem:Parameter3></tem:Parameter3>
</tem:CallSpecificFunctionRequest>
</soap:Body>
</soap:Envelope>