3.4. /api/v2/close-day

Introduction

Gate Close Day is initiated through HTTPS POST request by using URLs and the parameters specified below. Use OAuth HMAC-SHA1 for authentication. See Statuses.

API URLs

Integration

Production

https://sandbox.payneteasy.eu/paynet/api/v2/close-day/ENDPOINTID

https://gate.payneteasy.eu/paynet/api/v2/close-day/ENDPOINTID

Parameter Name

Description

Value

day_close_request_id

Unique request identifier. Can contain letters and numbers.

Necessity: Required
Type: String
Length: 8-32

sale_approved_count

The number of confirmed sale transactions.

Necessity: Optional
Type: String
Length: -

sale_approved_sum

The amount of confirmed sale transactions.

Necessity: Optional
Type: String
Length: -

reversal_approved_count

The number of confirmed reversal transactions.

Necessity: Optional
Type: String
Length: -

reversal_approved_sum

The amount of confirmed reversal transactions.

Necessity: Optional
Type: String
Length: -

Response Parameters

Note

Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value.

Parameter Name

Description

Value

status

Close Day transaction status.

Type: String

gateId

Close Day Gate ID.

Type: Long

isDayClosing

Close Day mark. If true - Gate is blocked.

Type: Boolean

gateCloseDate

Close Day Gate day.

Type: String

epntId

Property assigned by the bank to the Endpoint when it is configured in the bank’s system.

Type: Long

saleApprovedCount

The number of confirmed sale transactions.

Type: String

saleAmount

The amount of confirmed sale transactions.

Type: String

reversalApprovedCount

The number of confirmed reversal transactions.

Type: String

reversalAmount

The amount of confirmed reversal transactions.

Type: String

code39

The result of Close day. The bank’s response to the making procedure of Gate close day.

Type: String

RRN

The Close Day number grouped by Endpoint ID.

Type: String

theRequestSerialNumber

Serial number of the Close Day request.

Type: String

Request Example

POST /paynet/api/v2/close-day/39914 HTTP/1.1
Host: sandbox.payneteasy.eu
User-Agent: curl/7.83.0
Accept: */*
Content-Length: 119
Content-Type: application/x-www-form-urlencoded
Connection: close

"day_close_request_id": {string},
"sale_approved_count": {string},
"sale_approved_sum": {string},
"reversal_approved_count": {string},
"reversal_approved_sum": {string}

Success Response Example

Information about the closed day will appear in the response from Payment Gateway as it is received from the processors (in case of simultaneous closure of several Gates). After the Gate day closes, the response status will be set to ‘finished’, regardless of whether the closing of the day on all Gates was completed successfully, or part of the Gates (or all) closed with an error.
 HTTP/1.1 200 OK
 Server: server
 Date: Mon, 22 Aug 2022 13:15:19 GMT
 Content-Type: text/html;charset=utf-8
 Connection: close
 Vary: Accept-Encoding
 X-XSS-Protection: 1
 X-Content-Type-Options: nosniff
 Strict-Transport-Security: max-age=31536000
 Content-Language: en-US
 Strict-Transport-Security: max-age=31536000
 Content-Length: 1412


"response": {
  "status": "finished",
      "gates": [ {
            "gateId": 193,
            "isDayClosing": false,
            "gateCloseDate": "Mon Dec 10 14:44:21 MSK 2018",
            "epntId": 1,
            "saleApprovedCount": "2334",
            "saleAmount": "87328428482.00",
            "reversalApprovedCount": "123",
            "reversalAmount": "12393423.00",
            "code39": "000",
            "RRN": "2034829434"
            }, {
            "gateId": 82,
            "isDayClosing": false,
            "gateCloseDate": "Mon Dec 10 14:44:21 MSK 2018",
            "epntId": 1,
            "saleApprovedCount": "2334",
            "saleAmount": "87328428482.00",
            "reversalApprovedCount": "123",
            "reversalAmount": "12393423.00",
            "code39": "000",
            "RRN": "2034829434"
            }, {
            "gateId": 317,
            "isDayClosing": false,
            "gateCloseDate": "Mon Dec 10 14:44:21 MSK 2018",
            "epntId": 1,
            "saleApprovedCount": "2334",
            "saleAmount": "87328428482.00",
            "reversalApprovedCount": "123",
            "reversalAmount": "12393423.00",
            "code39": "000",
            "RRN": "2034829434"
      }
      ]
    },
    "theRequestSerialNumber": "00000000-0000-0000-0000-00000000002c"

Warning

If via Close Day API the Gates remain in a locked state (in the response body for “status”: “finished” for Gate - “isDayClosing”: true), use the lock removal tool in Payment Gateway UI.

Fail Response Example

If during the Close Day procedure, Connecting Party sends a repeat request for Close Day with a new request ID, the Payment Gateway will return a response with the status ‘error’ and a description of the error. It is pointless to reuse the identifier of this request to further initiate the closing of the day, since the error status is the final status and the request identifier will always be associated with this request.
If Connecting Party initiates a request with a new Endpoint request ID, for which it was Close Day was already performed, and some of the Gates associated with the Endpoint closed with an error (and are in a closed state), the Payment Gateway will send a response with the status ‘error’ and the corresponding error description.
HTTP/1.1 200 OK
Server: server
Date: Mon, 22 Aug 2022 12:59:09 GMT
Content-Type: text/html;charset=utf-8
Connection: close
Vary: Accept-Encoding
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Content-Language: en-US
Strict-Transport-Security: max-age=31536000
Content-Length: 154

   "response": {
     "status": "error",
     "errorCode": "99",
     "errorMessage": "gate is closing already"
   },
   "theRequestSerialNumber": "00000000-0000-0000-0000-000000000020"

Warning

To resolve this problem, perform the Close Day operation manually in Payment Gateway UI.

Request Builder

HTTP method
URL
parameters
version
consumer key
consumer secret
timestamp

nonce

signature method

normalized parameters
signature base string
signature
authorization header