POST
Payments/payments/{paymentUuid}/cancelإلغاء عملية دفع
يلغي عملية الدفع عندما تسمح حالتها الحالية.
مستوى الوصولauthenticatedالحدpay_apiمنع التكرارheader:Idempotency-KeyالمصادقةBearerAuth
المصدر
LuxApi/Modules/PayAPI/Controllers/PaymentController.php::cancelLuxPayProjects @ 146e98baa44eالمعاملات
X-Request-IDheaderClient correlation identifier. LuxPay may generate one when omitted.
Example:req_01J...paymentUuidpathPayment UUID.
Example:cf1b7e8e-5bba-4ddb-b2e4-6f4a10d24857Idempotency-KeyheaderUnique key for safely retrying this mutation. Reuse only for the same logical request.
Example:pay_01JABC...أمثلة الكود
العنوان المعروض Sandbox Placeholder حتى يتم تزويد النطاق الرسمي. لا تلصق رمز Production في متصفح عام.
curl --request POST \
--url 'https://sandbox-api.luxpay.example/v1/payments/cf1b7e8e-5bba-4ddb-b2e4-6f4a10d24857/cancel' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: pay_01JABC...'الاستجابات
200Successful response.
successboolean
Example:
truedataPaymentResult
{
"success": true,
"data": {
"success": false,
"transaction_id": "string",
"status": "string",
"provider": "string",
"provider_ref": "string",
"amount": 1,
"currency": "string",
"fee_amount": 1,
"net_amount": 1,
"message": "string",
"error_code": "string",
"is_duplicate": false,
"metadata": {}
}
}