标记付款状态为已付款

post https://api.cryptomus.com/v1/payment/mark-as-paid 复制

允许用户将付款标记为已付款。

此操作仅适用于以下状态组合的付款:status = active 且 payment_status = wrong_amount_waiting,或 status = completed 且 payment_status = wrong_amount。

由于支付处理流程是异步的,因此无法保证立即更新状态。当调用该端点时,会创建一个相应的异步任务以进行后续处理。

要求

查询参数

姓名参数类型定义
uuidstringuuidrequired_without: order_id付款的UUID
order_idstringrequired_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}
复制