Skip to main content
POST
Close prepay order

Overview

This page documents the POST /v1/pay/order/close endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

Notes

  • Authentication uses the standard GatePay signed headers.
  • This page documents the standard merchant endpoint.
  • Orders in the following statuses cannot be closed: PAID / EXPIRED / ERROR / REJECTED / CANCELLED.
  • For shared signing rules, see /api-reference/version/100/en/common/securityAndSignature.

Headers

X-GatePay-Certificate-ClientId
string
required

Merchant client ID, obtained from GatePay platform

Example:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
required

HMAC-SHA512 signature for request validation

Example:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"

X-GatePay-Timestamp
string
required

Millisecond timestamp; the difference from server time must not exceed 30 seconds.

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random nonce for replay attack prevention

Example:

"3525756760"

Body

application/json

Request body for closing a prepay order. At least one of merchantTradeNo or prepayId must be provided.

merchantTradeNo
string

Merchant order number, up to 100 bytes.

prepayId
string

Prepay ID. Only one of prepayId and merchantTradeNo needs to be provided.

Response

200 - application/json

Close prepay order result

Response body for closing a prepay order.

status
string
required

SUCCESS or FAIL.

code
string
required

Error code.

data
object

Closing result.

errorMessage
string

Error information.