Получить статус отмены¶
Статус отмены следует получать через запрос Get order status .
reversal_amount В ответе о статусе заказа накапливаются все отмены, которые были успешно обработаны для данного заказа.
В случае обработки полной отмены (full reversal) значение reversal_amount будет равно actual_amount.
В случае обработки частичного возврата или нескольких возвратов сумма возврата (reversal_amount) будет равна сумме всех обработанных частичных возвратов.
Пример частичной отмены заказа
Запрос статуса заказа:
curl -L 'https://pay.payme.uz/api/status/order_id' \
-H 'Content-Type: application/json' \
-d '{
"request": {
"order_id": "test_12343242111",
"version": "1.0.1",
"merchant_id": "4056281",
"signature": "64bbd2d53ee60f88b8184751cc05bd0a846f5768"
}
}'
Ответ о статусе заказа:
reversal_amount выделено. Это меньше, чем actual_amount, что означает, что заказ был частично отменен.
{
"response": {
"rrn": "111111111111",
"masked_card": "444455XXXXXX6666",
"sender_cell_phone": "",
"sender_account": "",
"currency": "UZS",
"fee": "",
"reversal_amount": "48",
"actual_amount": "15118",
"settlement_amount": "0",
"response_description": "",
"sender_email": "",
"order_status": "approved",
"response_status": "success",
"order_time": "28.08.2024 21:20:02",
"actual_currency": "UZS",
"order_id": "test_12343242111",
"tran_type": "purchase",
"eci": "7",
"settlement_date": "",
"payment_system": "card",
"approval_code": "123456",
"merchant_id": 4056281,
"settlement_currency": "",
"payment_id": 814277784,
"card_bin": 444455,
"response_code": "",
"card_type": "VISA",
"amount": "1000",
"signature": "8c06dd297c43833ded498b342a6225423f8494b3",
"product_id": "",
"merchant_data": "",
"rectoken": "",
"rectoken_lifetime": "",
"verification_status": "",
"parent_order_id": "",
"fee_oplata": "0",
"additional_info": "{\"capture_status\": null, \"capture_amount\": null, \"reservation_data\": null, \"transaction_id\": 2011273408, \"bank_response_code\": null, \"bank_response_description\": null, \"client_fee\": 0.0, \"settlement_fee\": 0.0, \"bank_name\": null, \"bank_country\": null, \"card_type\": \"VISA\", \"card_product\": \"empty_visa\", \"card_category\": null, \"timeend\": \"28.08.2024 21:20:05\", \"ipaddress_v4\": \"178.54.60.26\", \"payment_method\": \"card\", \"is_test\": true}",
"response_signature_string": "**********|15118|UZS|{\"capture_status\": null, \"capture_amount\": null, \"reservation_data\": null, \"transaction_id\": 2011273408, \"bank_response_code\": null, \"bank_response_description\": null, \"client_fee\": 0.0, \"settlement_fee\": 0.0, \"bank_name\": null, \"bank_country\": null, \"card_type\": \"VISA\", \"card_product\": \"empty_visa\", \"card_category\": null, \"timeend\": \"28.08.2024 21:20:05\", \"ipaddress_v4\": \"178.54.60.26\", \"payment_method\": \"card\", \"is_**********\": true}|1000|123456|444455|VISA|UZS|7|0|444455XXXXXX6666|4056281|**********_12343242111|approved|28.08.2024 21:20:02|814277784|card|success|48|111111111111|0|purchase"
}
}