Skip to content

Send test webhook

POST
/open/webhook/test

Send a signed webhook.test event right now and see whether your endpoint accepted it. When the wallet has a webhook_url it goes there, in the webhook layout with one sample transaction (code WHT00, zero amount, reference WEBHOOK-TEST). A wallet without a webhook_url gets it on its callback URL, in the callback layout. The address must be an https URL on port 443 (WHT06 otherwise, and nothing is sent). A test event is sent once, with no retries, and appears in Webhook deliveries. Each wallet can send 10 tests a minute and 100 a day (WHT07). The response never includes your endpoint's reply, and a failed connection is reported only as "Connection failed", so a test cannot be used to probe addresses or ports.

See Webhooks and Webhooks and callbacks for the event lists, signing and retry schedule.

history

Request History

Your request history will appear here.

Headers

X-API-USER stringrequired

Your Moolre username.

X-API-KEY stringrequired

Your wallet private API key. A public key is refused.

Body Params

accountnumberstringrequired

Your Moolre wallet account number.

Responses

The test event was sent. data.delivered tells you whether your endpoint accepted it (a 2xx answer). data.http is your endpoint's HTTP status (null when no answer came), data.duration_ms is how long the attempt took, and data.error is a short generic text when it failed: "Connection failed" (refused, timed out, unreachable or a TLS failure), "HTTP nnn" (a non-2xx status) or endpoint_rejected. data.response is always null; the key stays so existing clients keep working.

statusinteger
1 for success
codestring
Response code, WHT01
messagestring
Response message
dataobject
Result
gonull
Navigation hint
metaobject
Always present. meta.requestid is the unique id of this request (also the X-Request-Id header); quote it to support. meta.notices is an array, empty when there is nothing to report. meta.replayed is true only on an idempotent replay.
{  "status": 1,  "code": "WHT01",  "message": "Test webhook delivered.",  "data": {    "event_id": "evt_0123456789abcdef01234567",    "delivered": true,    "http": 200,    "duration_ms": 142,    "error": null,    "response": null  },  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

The wallet has neither a webhook_url nor a callback URL. Set one with Update account.

statusinteger
0 for failure
codestring
Response code, for example WHT02
messagestring
Error message
datastring | object | null
The failing field, or details
metaobject
Always present: meta.requestid (the unique id of this request) and meta.notices (an array)
{  "status": 0,  "code": "WHT02",  "message": "No webhook_url or callback URL is set on this wallet.",  "data": "callback",  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

The webhook_url or callback is an http URL or uses another port. Nothing was sent. Change it to an https URL without a port with Update account.

statusinteger
0 for failure
codestring
Response code, for example WHT06
messagestring
Error message
datastring | object | null
The failing field, or details
metaobject
Always present: meta.requestid (the unique id of this request) and meta.notices (an array)
{  "status": 0,  "code": "WHT06",  "message": "Test webhooks are sent only to https URLs on port 443. Change the callback URL of this wallet to an https URL without a port, then try again.",  "data": "callback",  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

The wallet has sent 10 test webhooks in the last minute or 100 in the last day. Try again later.

statusinteger
0 for failure
codestring
Response code, for example WHT07
messagestring
Error message
datastring | object | null
The failing field, or details
metaobject
Always present: meta.requestid (the unique id of this request) and meta.notices (an array)
{  "status": 0,  "code": "WHT07",  "message": "Too many test webhooks. Try again later (10 per minute, 100 per day).",  "data": null,  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}

Fields every response can carry

On failures, read code, message and data (the first failing field). meta is always present and holds requestid (also the X-Request-Id header), notices and, only on idempotent replays, replayed. There is no outcome field: use status, code and data.txstatus. Send X-Moolre-Http-Status: strict to receive real HTTP status codes. See Responses and request IDs and Errors and status codes.

Language

curl --request POST \     --url 'https://api.moolre.com/open/webhook/test' \     --header 'X-API-USER: Your Username' \     --header 'X-API-KEY: YOUR_API_KEY' \     --header 'Content-Type: application/json' \     --data '{  "accountnumber": ""}'

Response

Body

{  "status": 1,  "code": "WHT01",  "message": "Test webhook delivered.",  "data": {    "event_id": "evt_0123456789abcdef01234567",    "delivered": true,    "http": 200,    "duration_ms": 142,    "error": null,    "response": null  },  "go": null,  "meta": {    "requestid": "req_c68f4c66115c26725c796242",    "notices": []  }}