Resend webhook

post https://api.cryptomus.com/v2/payment/resend Copy

Resend the webhook by invoice. You can resend the webhook only for finalized invoices, that is, invoices in statuses: wrong_amount, paid, paid_over.

To resend the webhook on the invoice, the url_callback must be specified at the time of invoice creation.

Request

Query parameters

NameParameter typeDefinition
uuid*uuidrequired_without_all: order_id, txidInvoice uuid
order_id*stringmin:1max:128alpha_dashrequired_without_all: uuid, txidInvoice order ID
txid*stringmin:1max:256required_without_all: uuid, order_idTransaction IDRequired unless uuid or order_id is provided.

Parameter type

uuidrequired_without_all: order_id, txid

Definition

Invoice uuid

Parameter type

stringmin:1max:128alpha_dashrequired_without_all: uuid, txid

Definition

Invoice order ID

Parameter type

stringmin:1max:256required_without_all: uuid, order_id

Definition

Transaction IDRequired unless uuid or order_id is provided.

* - mandatory parameter

You must provide at least one of the required parameters. If you provide three, the account will be identified using order_id.

Request example


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"
        }'
Copy

Response

Response example


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

Possible errors

Validation errors

code : 422

example responses:

If you will not pass a uuid and order_id and txid, you will receive this message. It means that at least one of the parameters is required.


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}
Copy

If the invoice is not found


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

If the url_callback was not specified when creating an invoice, and no notification was send, there is nothing to resend and you will receive this error message:


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

The maximum number of resendings is 10, if you exceed this limit, you will receive an error message. If you want to resend the notification over the limit, you can contact the support.


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