POS Integration Service

Architecture

How the system works

Integration check List

Setup

BASE_URL='https://sandbox-api.payosy.com

API credentials for the test environment will be shared by mail.

Sale Flow

Sale APIs are used to turn orders into fiscal receipts. You can use them on both Sardis (400TR) Instant Sale API allows printing receipts and payment items at request time. Sale APIs are used to turn orders into fiscal receipts. The 3rd party Client Apps should provide a callback URL for sale flow. Otherwise, payment details cannot be sent.

curl --request POST \
  --url BASE_URL/api/instantorder \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-ibm-client-id: REPLACE_THIS_KEY' \
  --header 'x-ibm-client-secret: REPLACE_THIS_KEY' \
  --data '{
   "terminalid": "EC0000000002",
   "id": "1213",
   "asyncACK": false,
   "isCopy":0,
   "typeCode":0,
   "note":" YİNE BEKLERİZ",
   "currencyCode":0,
   "basketID":"1213",
   "taxTypeCode":0,
   "customerInfo":{
      "taxID":"99999999999",
      "name":"Mustafa Koray AKÇOCUK",
      "isLock":true,
      "room":"1",
      "street":"Koray Akcocuk Cd.",
      "buildingName":"Koray Binası",
      "buildingNumber":"16",
      "citySubdivisonName":"Alanya",
      "cityName":"Antalya",
      "postalZone":"07110",
      "region":"Güller Pınarı",
      "country":"Turkiye",
      "taxScheme":"Alanya",
      "telephone":"0 232 333 33 33",
      "telefax":"0 232 111 11 11",
      "email":"xxxx@xxxx.com"
   },
   "items":[
      {
         "name":"ÜLKER ÇİKOLATALI GOFRET",
         "priceType":0,
         "price":150,
         "taxPercent":800,
         "taxType":0,
         "quantityType":"NIU",
         "quantity":3000,
         "adjust":{
            "discountOrSurcharge":0,
            "type":0,
            "value":50,
            "description":"HOPI"
         }
      },
      {
         "name":"ELEKTRIK",
         "priceType":0,
         "price":15522,
         "taxPercent":1800,
         "taxType":0,
         "quantityType":"KWH",
         "quantity":2000
      },
      {
         "name":"SÜT",
         "priceType":0,
         "price":500,
         "taxPercent":1800,
         "taxType":0,
         "quantityType":"NIU",
         "quantity":50000
      }
   ],
   "paymentItems": [ 
       { 
           "amount":100,
           "operatorId":64,
           "type":3,
           "description": "CREDIT"
       },
       { 
           "amount":100,
           "operatorId":0,
           "type":1,
           "description": "CASH"
       }
   ],
   "adjust":{
      "discountOrSurcharge":0,
      "type":0,
      "value":50,
      "description":"HOPI"
   }
}'

a. Receipt with the following parameters is created.

b. Send order to device with client id and secret. If “asyncACK” is true then you will receive this as HTTP 200 Response’s Body. Order Received message by device

{
    "status": 0,
    "id": "1213",   // unique id of the order
    "msg": "OK"
}

c. When payment is completed, receipt details will be sent to the callback URL that provided at the subscription. Successful complete example:

{ 
    "id":"1213",
    "terminalid":"EC0000000002",
    "responseType":1, // operation instant sale
    "status":0,
    "msg": "OK",
    "invoiceID":"ERT2019000019890",
    "UUID":"4C76822B-D007-446E-8617-4432F94E2F61",
    "InstanceIdentifier":"4C76822B-D007-446E-8617-4432F94E2F61",
    "paymentCount": 1,
    "paymentItems": [ 
        { 
            "amount":100,
            "operatorId":64,
            "type":3,
            "description": "CREDIT"
        }
    ]
}
  • Main fields of callback response

Status Codes

Access to API's

Last updated