Skip to main content
POST
/
payment
/
open
/
institution
/
v1
/
pay
/
order
/
close
Close prepay order
curl --request POST \
  --url https://openplatform.gateapi.io/payment/open/institution/v1/pay/order/close \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "merchantTradeNo": "118223456797"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "data": {
    "result": "SUCCESS"
  },
  "errorMessage": ""
}

Documentation Index

Fetch the complete documentation index at: https://docs.gate.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

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

Notes

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-SHA256 signature for request validation

Example:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"

X-GatePay-Timestamp
string
required

Timestamp in milliseconds, must be within 5 minutes of server time

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random nonce for replay attack prevention

Example:

"3525756760"

X-GatePay-On-Behalf-Of
string
required

Required delegated-subject header. Provide the initiating account ID for this request. For institution merchant APIs, this is typically the target sub-account ID; for institution charge and transfer APIs, it can be either an institution account ID or a sub-account ID.

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 32 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.