Parameter | Type | Description | Example |
---|---|---|---|
order_id |
string(1024) | Order ID which is generated by merchant.
mandatory
|
ID1234 |
merchant_id |
integer(12) | Merchant unique ID. Generated by hutko during merchant registration.
mandatory
|
1 |
signature |
string(40) | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response
mandatory
|
1773cf135bd89656131134b98637894dad42f808
|
version |
string(10) | Protocol version.
Default value: 1.0
|
1.0 |
amount |
integer(12) | Reversal amount
mandatory
|
1020 (EUR) means 10 euros and 20 cents |
currency |
string(3) | Order currency. Supported values: EUR — Euro USD — US Dollar GBP — Pound sterling UAH — Ukrainian Hryvnia mandatory
|
USD |
comment |
string(1024) | Merchant comment on reversal reason UTF-8 | “Customer returned product back” |
Parameter | Type | Description | Example |
---|---|---|---|
order_id |
string(1024) | Order ID which is generated by merchant. | ID1234 |
merchant_id |
integer(12) | Merchant unique ID. Generated by hutko during merchant registration. | 1 |
revers_status |
string(50) | Reversal processing status. Can contain next values: created — reversal has been created, but not processed yet declined — reversal is declined by hutko payment gateway or by bank or by external payment system approved — reversal completed successfully |
approved |
response_status |
string(50) | Request processing status. If parameters sent by merchant did not pass validation then failure , else success |
|
signature |
string(40) | Order signature. Required to verify merchant request consistency and authenticity. Signature generation algorithm please see at Signature generation for request and response |
1773cf135bd89656131134b98637894dad42f808
|
response_code |
integer(4) | Response decline code | 1008 |
response_description |
string(1024) | Response decline reason | Parameter `amount` is mandatory |
Reversal request always generated by merchant using host-to-host request to URL https://pay.hutko.org/api/reverse/order_id
Response is always returned in request context in the same content-type. So if request is sent in JSON, response will be sent in JSON format too.
Content Type: application/json
Request
{ "request":{ "order_id":"test7926651365", "currency":"USD", "amount":"1", "merchant_id":"1", "signature":"b1ed592ff76ddca287503b11c1aad70bb1c67f37" } }
Normal response
{ "response":{ "order_id":"test309906285", "response_status":"success", "response_code":"", "reverse_status":"approved", "response_description":"", "merchant_id":"1" } }
Response in case of error
{ "response":{ "response_status":"failure", "error_message":"Order Not Found", "error_code":"1018" } }