Permalink: |
Receiving invoices for payment
URL¶
POST /V1/GetInInvoices.ashx
Headers¶
Authorization: Bearer {JWT}
— required JWT token. Issued at https://security.webmoney.com/ .Content-Type:application/json; charset=utf-8
Request body (JSON)¶
{ "reqn": 1730486400000, "wminvid": 0, "datestart": "2025-09-01T00:00:00", "datefinish": "2025-10-02T23:59:59" }
*. Field | *. Type | Description |
---|---|---|
reqn | long | Request number (recommended Unix time in ms) |
wminvid | long | Invoice number in WebMoney (> 0 — other filters ignored), otherwise 0 |
datestart | DateTime | Start date (ISO 8601 `YYYY-MM-DDThh:mm:ss`), required if `wminvid = 0` |
datefinish | DateTime | End date (ISO 8601 `YYYY-MM-DDThh:mm:ss`), required if `wminvid = 0` |
Notes:
- Recipient WMID is taken from the JWT claim
slave
. - If
wminvid > 0
, thedatestart
anddatefinish
fields are ignored.
Successful response example¶
{ "reqn": 1730486400000, "invoices": [ { "id": 987654321, "ts": 1234567890, "orderid": 1730486400000, "storewmid": "000000000001", "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" }
datecrt/dateupd — ISO 8601 format, UTC.
Partial data with error example¶
If an error occurs after the array invoices
has started being returned, the response is completed with an error flag:
{ "reqn": 1730486400000, "invoices": [ { "id": 1, "orderid": 1, "storewmid": "000000000001", "storepurse": "Z...", "amount": 1.00, "state": 0 } ], "retval": -2, "retdesc": "Partial data followed by error: <description>" }
Error examples¶
401 Unauthorized:
{ "reqn": 1730486400000, "retval": 401, "retdesc": "Authorization error: <description>" }
400 Bad Request:
{ "reqn": 1730486400000, "retval": -3, "retdesc": "Request processing error: <description>" }
Possible return codes¶
*. Code | Description |
---|---|
0 | Ok |
401 | Authorization error |
405 | Method not allowed (POST only) |
-2 | Partial data returned, then error |
-3 | Request processing error |
… | Other codes are described in Interface X10 |