Create Refund
Description
This endpoint will help merchants to create a refund transaction.
Endpoint
REST API: POST
https://live.cpayapi.com/openapi/v1/refund
Parameters
Header
Name
Type
Mandatory
Description
Content-Type
string
application/json
Body
Name
Type
Mandatory
Description
mid
int64
yes
unique id generated by us
orderID
string(64)
yes
unique order id generated by cpay
amount
string(32)
yes
refund amount, 0 < amount <= payment amount
Response
Name
Type
Description
msg
string
description of code
traceid
string
unique request id generated by cpay
data.orderID
string
unique order id generated by cpay
data.orderStatus
int
10: in processing 20: refund completed and successful 30: refund failed
data.refundAmount
string
refund amount
data.remark
string
if orderStatus is 30, this field returns the error message
Example
Request
Response
Successful response example, transaction status is PROCESSING.
Last updated