| Permalink: |
Receiving the history of issued invoices
URL¶
POST https://w3s.webmoney.com/json/V1/GetOutInvoices.ashx
Headers¶
Authorization: Bearer {JWT}— required JWT token. Issued at https://security.webmoney.com/trustlisttokens.aspx- Content-Type: application/json; charset=utf-8
Request body (JSON)¶
{
"reqn": 1730486400000,
"wminvid": 0,
"orderid": 0,
"datestart": "2025-09-01T00:00:00",
"datefinish": "2025-10-02T23:59:59"
}
Fields¶
| *. Field | *. Type | Description |
|---|---|---|
| reqn | long | Request number (recommended: Unix time in ms) |
| wminvid | long | Invoice number in WebMoney (> 0 — other filters are ignored), otherwise 0 |
| orderid | long | Merchant invoice number (used if wminvid = 0) |
| datestart | DateTime | Period start (ISO 8601: YYYY-MM-DDThh:mm:ss), required if wminvid = 0 |
| datefinish | DateTime | Period end (ISO 8601: YYYY-MM-DDThh:mm:ss), required if wminvid = 0 |
Notes:
- The merchant’s purse is derived from the JWT and is not passed in the request body.
- If
wminvid > 0, the fieldsorderid,datestart, anddatefinishare ignored.
Example of a successful response¶
{
"reqn": 1730486400000,
"invoices": [
{
"id": 987654321,
"ts": 1234567890,
"orderid": 1730486400000,
"customerwmid": "111122223333",
"storepurse": "Z123456789012",
"amount": 0.02,
"desc": "Test invoice",
"address": "",
"period": 0,
"expiration": 0,
"state": 2,
"datecrt": "2025-10-02T12:34:56.789Z",
"dateupd": "2025-10-03T09:10:11.123Z",
"wmtranid": 555777999
}
],
"retval": 0,
"retdesc": "OK"
}
Notes on response:
datecrt/dateupd— ISO 8601, UTC.
Example of an error (partial data already returned)¶
If an error occurs after the invoices array has started, the response ends with an error flag.
{
"reqn": 1730486400000,
"invoices": [
{
"id": 987654321,
"ts": 1234567890,
"orderid": 1730486400000,
"customerwmid": "111122223333",
"storepurse": "Z123456789012",
"amount": 0.02,
"desc": "Test invoice",
"address": "",
"period": 0,
"expiration": 0,
"state": 2,
"datecrt": "2025-10-02T12:34:56.789Z",
"dateupd": "2025-10-03T09:10:11.123Z",
"wmtranid": 555777999
}
],
"retval": -2,
"retdesc": "Partial data followed by error: <description>"
}
Error examples¶
401 Unauthorized:
{
"retval": 401,
"retdesc": "Authorization error: <description>"
}
403 Forbidden:
{
"retval": 403,
"retdesc": "Access denied: <description>"
}
404 Not Found:
{
"retval": 404,
"retdesc": "Resource not found: <description>"
}
500 Internal Server Error:
{
"retval": 500,
"retdesc": "Server error: <description>"
}
Possible return codes¶
| *. Code | *. Description |
| 0 | Ok |
| 401 | Authorization error |
| 405 | Method not allowed (only POST) |
| -3 | Request processing error |
| ... | Other codes are described in Interface X4 |