Purpose

Adds a prepayment to the specified order

Request typeasynchronous/synchronous
Supported agent version, SH

WSA v2.8.5.8

PluggetSystemTypeRKMid


Request format

{
    "taskType": "AddPrepayOrder",
    "params": {
        "sync": {
            "objectId": number,
            "timeout": number
        },
        "orderGuid": "string",
 
        "amount": 500,
        "currencyGuid": "16D72549-14D8-4F31-9E2A-0A833D4F5EED"
 
 
    }
}

Parameter

Type

Mandatory

Description

taskTypestring+Task Type (AddPrepayOrder)
sync

Synchronous method call (either synchronous or asynchronous)
|-timeoutint-Agent response timeout in seconds, default is 120 seconds
|-objectIdint+Restaurant code in the licensing system
orderGuidguid+Order guid in r_keeper
amountdouble+Prepayment amount
currencyGuidguid-

Guid of the currency in which the prepayment is made. If not specified, the currency specified in the order creation parameters is used. 



If the currency is not specified and not sent in the request, an error is returned.

Prepayment must be allowed in the settings of the specified currency.

Response format

// Successful response {
    "taskResponse": {},
    "responseCommon": {
        "taskGuid": "string",
        "taskType": "AddPrepayOrder",
        "objectId": number,
        "agentGuid": "string"
    }
}
  
// Response with an error
{
  "responseCommon": {
    "taskGuid": "string",
    "taskType": "AddPrepayOrder",
    "objectId": number
  },
  "error": {
    "wsError": {
      "code": "string",
      "desc": "string"
    },
    "agentError": {
      "code": "string",
      "desc": "string"
    }
  }
}



Example request

{
    "taskType": "AddPrepayOrder",
    "params": {
        "sync": {
            "objectId": "199990246",
            "timeout": 120
        },
        "orderGuid": "8fcf1323-a26c-4afc-a8a4-7023372b4ebb",
        "amount": 500,
        "currencyGuid": "16D72549-14D8-4F31-9E2A-0A833D4F5EED"
    }
}



Example response

{
    "taskResponse": {},
    "responseCommon": {
        "taskGuid": "3bc26173-c9a8-486b-9f7a-e68b4159b5c8",
        "taskType": "AddPrepayOrder",
        "objectId": 199990246,
        "agentGuid": "d564619a-50c3-3d87-0816-de67ed9c8e18"
    }
}