標記付款狀態為已付款
post https://api.cryptomus.com/v1/payment/mark-as-paid 複製
允許用戶將付款標記為已付款。
此操作僅適用於下列狀態組合的付款:status = active 且 payment_status = wrong_amount_waiting,或 status = completed 且 payment_status = wrong_amount。
由於支付處理流程是異步的,因此無法保證立即更新狀態。當呼叫該端點時,會建立一個對應的非同步任務以進行後續處理。
要求
查詢參數
| 姓名 | 參數類型 | 定義 |
|---|---|---|
| uuid | stringuuidrequired_without: order_id | 付款的 uuid |
| order_id | stringrequired_without: uuid | 您系統中的訂單 ID參數應為由字母、數字、底線和短劃線組成的字串,不能包含空格和特殊字元。 |
參數類型
stringuuidrequired_without: order_id定義
付款的 uuid參數類型
stringrequired_without: uuid定義
您系統中的訂單 ID參數應為由字母、數字、底線和短劃線組成的字串,不能包含空格和特殊字元。
請求範例
curl --location 'https://api.cryptomus.com/v1/payment/mark-as-paid' \
-X POST \
-H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
"order_id": "test_107"
}'複製回覆
回應範例
1{
2 "state": 0,
3 "result": {
4 "success": true,
5 "message": "The request has been accepted and queued for processing."
6 }
7}複製可能的錯誤
驗證錯誤
程式碼 : 422
範例回覆:
1{
2 "message": "Payment not found.",
3 "state": 1
4}複製內部伺服器錯誤
程式碼 : 500
範例回覆:
1{
2 "message": "Server error, #1",
3 "code": 500,
4 "error": null
5}複製