Skip to content

Examples

Example for creating a token

Address:

https://test-token-eu.sihot.com/4711/createToken

Body:

{
    "cardNo":"4242424242424242",
    "valid":"2018-03-30",
    "cvc":"283",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"mvo",
    "datetime":"2017-06-12 10:19",
    "cardText":"Max Mustermann",
}

Response:

{
    "returnCode":"0",
    "tokenExpiry":"2018-03-30",
    "tokenNo":"6049741010489423024",
    "serviceProvider":"TokenStup",
    "cardType":"4",
    "cardTypeCode":"VISA"
}

Example for making a payment

Address:

https://test-token-eu.sihot.com/4711/pay

Body:

{
    "tokenNo":"6049741010489423024",
    "amount":"200",
    "currency":"EUR",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"msc",
    "datetime":"2017-06-12 10:19",
    "text":"res# 2700681/1"
}

Response:

{
    "returnCode":"0",
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "serviceProvider":" TokenStup",
    "cardTypeCode":"VISA",
    "cardType":"4",
    "cardNo":"424242xxxxxx4242”
}

Example for a reversal

Address:

https://test-token-eu.sihot.com/4711/reversal

Body:

{
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "amount":"200",
    "currency":"EUR",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"msc",
    "datetime":"2017-06-12 10:19",
    "text":"res# 2700681/1",
    "serviceProvider":"TokenStup"
}

Response:

{
    "returnCode":"0",
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "serviceProvider":" TokenStup",
    "cardTypeCode":"VISA",
    "cardType":"4"
}

Example of an authorization

Address:

https://test-token-eu.sihot.com/4711/authorize

Body:

{
    "tokenNo":"6049741010489423024",
    "currency":"EUR",
    "amount":"200",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"msc",
    "datetime":"2017-06-12 10:19",
    "text":"res# 2700681/1",
    "serviceProvider":"TokenStup"
}

Response:

{
    "returnCode":"0",
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "authorizationCode":"614082",
    "cardTypeCode":"VISA",
    "cardType":"4",
    "serviceProvider":"TokenStup"
}

Example for settling an authorization

Address: https://test-token-eu.sihot.com/4711/settleAuthorization

Body:

{
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "authorizationCode":"614082",
    "currency":"EUR",
    "amount":"200",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"msc",
    "datetime":"2017-06-12 10:19",
    "text":"res# 2700681/1",
    "serviceProvider":"TokenStup"
}

Response:

{
    "returnCode":"0",
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "serviceProvider":"SaferPay"
}

Example for cancelling an authorization

Address:

https://test-token-eu.sihot.com/4711/cancelAuthorization

Body:

{
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "authorizationCode":"614082",
    "hotelID":"1",
    "hotelIDType":"SIHOT.WEB",
    "user":"msc",
    "datetime":"2017-06-12 10:19",
    "text":"res# 2700681/1",
    "serviceProvider":"TokenStup"
}

Response:

{
    "returnCode":"0",
    "transactionID":"F1022CBA-C2E7-45EB-AC6D-533C788EF91E",
    "serviceProvider":"TokenStup"
}

Example for initpay

Address:

https://test-token-eu.sihot.com/4711/initpay

Body:

{
    "hotelID": "1",
    "hotelIDType": "SIHOT.PMS",
    "user": "BO",
    "datetime": "2022-03-04T09:09:47",
    "serviceProvider": "spayengine",
    "cardText": null,
    "resNo": "20008505/1",
    "currency": "EUR",
    "amount": "20",
    "cardInfoRefID": "2270",
    "description": "",
    "callbackSuccessUrl": "http://localhost:8080/committest",
    "callbackAbortUrl": "http://localhost:8080/aborttest"
}

Response:

{
    "viewUrl": "https://localhost:443/1234/spayengine/payment?PD=eyJvYyI6bnVsbCwiYW1vdW50IjoiMjAiLCJyZWZUeXBlIjpudWxsLCJyZWZJZCI6bnVsbH0%3D&HN=1&requestID=c0a802bb-81ca-12b8-8181-cae2ea2c0000",
    "requestID": "c0a802bb-81ca-12b8-8181-cae2ea2c0000",
    "dateTime": "2022-03-04T09:09:47",
    "stateRetrivalUrl": "https://localhost:443/1234/paystatus?requestid=c0a802bb-81ca-12b8-8181-cae2ea2c0000&serviceProvider=spayengine",
    "returnCode": "0",
    "serviceProvider": "spayengine"
}

Example for paymentCommit

Address:

https://merchant.address.com/4711/paymentCommit

Body:

{
    "cardInfoRefID": "pay-ref-123",
    "requestID": "c0a802bb-81ca-12b8-8181-cae2ea2c0000",
    "returnCode": "0",
    "securityID" : "dummy",
    "serviceProvider": "spayengine",
    "amount": 100,
    "cardNumber": "XXXXXXXXXXXX0045",
    "cardTypeCode": "MASTERCARD",
    "currency": "AUD",
    "description": "Test to SIT env SIHOT Terminal",
    "emvTerminal": "SIT49500250",
    "receipt": "MID: 516013512495149#TID: 49500250 #Version: 02.03.95 #===============================#JUN 22, 22 18:24 #BATCH: 000027 #INV: 66 #STAN: 000298 #ACCOUNT TYPE CREDIT #RRN: 000020646964 #TOKEN: 5978253153770450 #MASTERCARD #A0000000041010 #MasterCard #............0045(c) #SALE AUD $1.00 #-------------------------------#APPROVED 0  #APPROVAL CODE 005571 #TC: 1122334455667788 #APSN:03 ATC:0001 #MERCHANT COPY #------------------------------- #@MID: 516013512495149 #TID: 49500250 #Version: 02.03.95 #===============================#JUN 22, 22 18:24 #BATCH: 000027 #INV: 66 #STAN: 000298#ACCOUNT TYPE CREDIT #RRN: 000020646964 #TOKEN: 5978253153770450 #MASTERCARD #A0000000041010 #MasterCard #............0045(c) #SALE AUD $1.00 #-------------------------------#APPROVED 00 #PPROVAL CODE 005571 #TC: 1122334455667788 #APSN:0 ATC:0001 #CUSTOMER COPY #-------------------------------#",
    "receiptCardHolder": "",
    "token": "5978253153770450",
    "tokenValidUntil": "2025-12-31",
    "transactionID": "000020646964"
}

Response:

{
    "returnCode": "0",
    "returnText": "",
    "paymentObjID" :"1234"
}

Example for paystatus

Address:

https://test-token-eu.sihot.com/4711/paystatus?requestid=c0a802bb-81ca-12b8-8181-cae2ea2c0000&serviceProvider=spayengine

Response (in progress):

{
    "state": 0
}

Response (in completed):

{
    "state": 1,
    "result": "PAYOBJID=123456"
}