B scan C - refund
PUT {{base_url}}/api/v1/bscanc/orders/:order_id
Refund order
Refund order API
URL | /api/v1/bscanc/orders/{order_id} |
---|
Method | PUT |
Content-Type | application/json |
Refund order Request parameter
Name | Location | Types | Required | instruction |
---|
order_id | path | string | Yes | The unique order number used by the merchant (merchantorderid when creating the order) |
Body parameters
Name | Location | Types | Required | instruction |
---|
refundorderid | body | string | Yes | Unlimited format, unique refund order number used by merchant |
signature | body | string | Yes | Request signature |
timestamp | body | string | Yes | Timestamp |
refund_amount | body | number | Yes | The refund amount, cents, cannot be greater than the order amount, only partial payment channels support non-full refunds. |
provider | body | string | No | Payment gateway |
mid | body | string | No | The merchant ID of this order is only valid when there are multiple sub-merchants under the same account. |
Request body example
{
"refund_order_id": "refund_bscanc_truemoney2",
"refund_amount": 100,
"signature": "string",
"timestamp": "string"
}
Response result
Successful response example
{
"cleared": false,
"channel": "truemoney",
"status": "Refunded",
"merchant_order_id": "refund_bscanc_truemoney2",
"signature": "6A8139EF256F9AAF3D7DEDE137DC619D017814FFFFEF4ED2FE9F54C41F338E1B",
"timestamp": "string",
"reference": "bscanc_truemoney2",
"amount": -100,
"id": "289",
"force_clear": false,
"api_name": "general",
"currency": "THB",
"order_type": "Refund",
"locked": false,
"channel_order_id": "210817182114545BVWB1",
"error_message": "The order is refunded.",
"gateway_order_id": "snut289",
"error_code": "REFUNDED",
"acquirer_order_id": "90020210817192114495338",
"log_entry_url": "https://snut.vip.ksher.net/web#action=153&view_type=form&model=rest.log&id=1166"
}
Request Body
{"refund_order_id"=>"refund_bscanc_20220526112700", "refund_amount"=>100, "signature"=>"{{signature}}", "timestamp"=>"string", "mid"=>"mch38026"}