15. Refund transaction
Header Parameters
Nonce string required
random 16 bytes alphanumerics
Credential string required
Please follow the OpenAPI authentication section
Example: d900da8b-6e16-4a85-8a66-05d29ac53f24/20240501120123/Wonder-RSA-SHA256
Signature string required
Please follow the OpenAPI authentication section
Example: lM42cgyuLS98Dieydc8K2OD3KwYkOXibpV9pFvr/R0i/830M/FPKUKbav2UBBN3M3EdPk/PpvKQlvBNT+NbEg20CKuiDTZWDc3r7KiA1pdZsui/57XCVhC2s01W8jEM+G5lS362+p8+E0K6UKQDrJMyVpbDT31XSkSJIxae+uDi2nJr4DnIkemeU2LlNDRPPGe9NeX7z3B3N3LwIiQgKMyauPqAjro0UrZykQM9pv4UySRSU2cT8EcjQmyKxbzyuR2A47PyeodJvotlIthdfCHIxG52D06tpRJlRVbUdvxSg14bFiPbr3FwCvruZlbR15gOanJCqE4wp4fC8qEXXsg==
Content-type string required
Example: application/json
x-request-id string
Example: d900da8b-6e16-4a85-8a66-05d29ac53f24
x-i18n-lang string
from zh-HK, zh-CN, or en
application/json
Request Body
order object required
transaction object required
refund object required
Responses
- 200
Response Headers
application/json
Schema
Example (from schema)
Schema
error_code string required
error_message string required
data object required
{
"error_code": "string",
"error_message": "string",
"data": {
"order": {
"source": "string",
"type": "string",
"number": "string",
"reference_number": "string",
"due_date": "string",
"initial_total": 0,
"initial_tips": 0,
"subtotal": 0,
"paid_total": "string",
"unpaid_total": "string",
"state": "string",
"correspondence_state": "string",
"currency": "string",
"return_url": "string",
"notify_url": "string",
"line_items": [
{
"uuid": "string",
"purchasable_type": "RearTips",
"purchase_id": 0,
"price": 0,
"quantity": 0,
"total": 0,
"label": "string"
}
],
"transactions": [
{
"type": "Sales",
"uuid": "string",
"currency": "string",
"amount": "string",
"success": true,
"is_pending": true,
"captured": true,
"allow_void": true,
"allow_refund": true,
"void_is_pending": true,
"payment_method": "string",
"note": "string",
"payment_data": {
"acquirer_name": "string",
"acquirer_type": "string",
"auth_code": "string",
"brn": "string",
"card_id": "string",
"card_number_len": 0,
"card_read_mode": "string",
"credit_card_type": "string",
"first_6_digits": "string",
"last_4_digits": "string",
"merchant_id": "string",
"new_gateway_txn_id": "string",
"payment_method": "string",
"receipt_id": "string",
"rrn": "string",
"transaction_state": "string"
},
"original_transaction_uuid": "string"
}
],
"payment_method_option": {
"online": {}
}
}
}
}
POST /svc/payment/api/v1/openapi/orders/refund
Request
Request
curl / cURL
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
python / requests
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
go / native
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
nodejs / axios
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
ruby / Net::HTTP
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
csharp / RestSharp
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
php / cURL
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
java / OkHttp
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'
powershell / RestMethod
curl -L -X POST 'https://developer.wonder.today/svc/payment/api/v1/openapi/orders/refund' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"order": {
"number": "string",
"reference_number": "string"
},
"transaction": {
"uuid": "string"
},
"refund": {
"amount": "string",
"note": "string"
}
}'