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}
MethodPUT
Content-Typeapplication/json

Refund order Request parameter

NameLocationTypesRequiredinstruction
order_idpathstringYesThe unique order number used by the merchant (merchantorderid when creating the order)

Body parameters

NameLocationTypesRequiredinstruction
refundorderidbodystringYesUnlimited format, unique refund order number used by merchant
signaturebodystringYesRequest signature
timestampbodystringYesTimestamp
refund_amountbodynumberYesThe refund amount, cents, cannot be greater than the order amount, only partial payment channels support non-full refunds.
providerbodystringNoPayment gateway
midbodystringNoThe 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"}