重新发送Webhook

post https://api.cryptomus.com/v2/payment/resend 复制

通过发票重新发送Webhook。您只能将Webhook重新发送到最终的发票,即状态发票: wrong_amountpaid paid_over

要重新发票上的Webhook,必须在发票创建时指定 url_callback

要求

查询参数

姓名参数类型定义
uuid*uuidrequired_without_all: order_id, txid发票UUID
order_id*stringmin:1max:128alpha_dashrequired_without_all: uuid, txid发票订单ID
txid*stringmin:1max:256required_without_all: uuid, order_id交易 ID除非提供了 uuid 或 order_id,否则为必填项。

参数类型

uuidrequired_without_all: order_id, txid

定义

发票UUID

参数类型

stringmin:1max:128alpha_dashrequired_without_all: uuid, txid

定义

发票订单ID

参数类型

stringmin:1max:256required_without_all: uuid, order_id

定义

交易 ID除非提供了 uuid 或 order_id,否则为必填项。

* - 强制性参数

您必须至少提供一项必填参数。如果您提供三项,系统将使用以下方式识别帐户: order_id.

请求示例


curl https://api.cryptomus.com/v2/payment/resend \
    -X POST \
    -H 'merchant: 8b03432e-385b-4670-8d06-064591096795' \
    -H 'sign: fe99035f86fa436181717b302b95bacff1' \
    -H 'Content-Type: application/json' \
    -d '{
            "uuid": "8b03432e-385b-4670-8d06-064591096795"
        }'
复制

回复

响应示例


1{
2    "state": 0,
3    "result": []
4}
复制

可能的错误

验证错误

代码 : 422

示例回复:

如果您不传递 uuidorder_idtxid 参数,您将收到此消息。这意味着至少需要一个参数。


1{
2      "state": 1,
3      "errors": {
4        "uuid": ["validation.required_without_all"],
5        "order_id": ["validation.required_without_all"],
6        "txid" : ["validation.required_without_all"]
7      }
8}
复制

如果找不到发票


1{
2	"state": 1,
3	"message": "Payment not found"
4}
复制

如果在创建发票时没有指定url_callback,并且没有发送通知,则没有任何内容可以重新发送,您将收到此错误信息:


1{
2	"state": 1,
3	"message": "Notification not found"
4}
复制

最大重新启动数为10,如果您超过此限制,则将收到一条错误消息。如果要重新将通知重新限制,则可以联系支持。


1{
2	"state": 1,
3	"message": "Too much resend"
4}
复制