The client pays for the order on the restaurant website, which has integration with the payment system:
Request
PUT /orders/api/v1/orders/{orderId}/pay |
Request example
PUT https://delivery.ucs.ru/orders/api/v1/orders/102/pay |
Body:
[ { "code":"16D72549-14D8-4F31-9E2A-0A833D4F5EED", "amount":978, "paidAt":"2022-04-05T15:12:58.658+03:00", "name":"" } ] |
The code parameter — the GUID of r_keeper currency which will be used for paying the order created with the use of API.
Response examples
The response contains the payment settings error:
{ "code": "ERR_EXTERNAL_ERROR_WS", "msg": "WS error: Error code: WsaOrderError. RkInternal: Cash station [3373] There is not enough money to fully pay the order.", "requestId": "0HMGNRL7KKKDF:00000001", "errors": null } |
Successful payment:
{ "result": {} } |
Request
PUT /orders/api/v1/orders/{orderId}/complete |
Request Example:
PUT https://delivery.ucs.ru/orders/api/v1/orders/107/complete |
Response Examples:
The attempt to close the unpaid order:
Status code: 500
{ "code": "rk7_close_order", "msg": "RkInternal: Cash station [3071] Cannot save order 1.73, it is not fully paid", "requestId": "f3e391f697a9e2a72fe67c6ba69db771", "errors": null } |
Successful order closure:
Status code: 200 OK
{ "result": {} } |