Skip to main content
POST
/
payment
/
open
/
institution
/
v1
/
pay
/
order
/
refund
Refund
curl --request POST \
  --url https://openplatform.gateapi.io/payment/open/institution/v1/pay/order/refund \
  --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 '
{
  "refundRequestId": "156123911",
  "prepayId": "1647438500687506",
  "refundAmount": "0.8"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "data": {
    "refundRequestId": "156123911",
    "prepayId": "1647438500687506",
    "orderAmount": "1.91",
    "refundAmount": "0.8",
    "channelId": ""
  },
  "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/refund 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 creating a refund order.

refundRequestId
string
required

Merchant-generated refund request ID. The ID must be unique and no more than 32 characters long.

prepayId
string
required

ID of the completed payment order.

refundAmount
string
required

Refund amount, which cannot exceed the total order amount.

refundReason
string

Reason for the refund, up to 256 characters.

Response

200 - application/json

Refund request result

Response body for refund API.

status
string
required

The status of the response, which can be either SUCCESS or FAIL.

code
string
required

The error code.

errorMessage
string

The error message.

data
object

The information of the refund order.