| Permalink: |
Subscription to receive a credit rating
- URL: [https://debt.webmoney.com/api/v2/creditrating/{wmid}/subscription]
- Method: PUT, GET, DELETE
- Accept types:
application/json
Managing a subscription to receive information about a credit rating when it changes¶
When the credit rating is changed (receiving or issuing a loan, making a refund on a loan taken or issued, opening a trust limit), an HTTP request is sent to the specified URL using the POST method with a body that completely matches the response format of the credit rating method.
In case of problems with the notification, three repeated attempts are made after 1min, 5min, 15min.
https is required in the url, it will be checked for accessibility in the add method by sending a POST { "ping": true }. If the verification fails, code 422 is returned.
Requires a JWT with scope: user_activity.
Request format (PUT — create or renew subscription)¶
PUT /api/v2/creditrating/{wmid}/subscription
Request Parameters¶
| Name | Type | Where path | Description |
|---|---|---|---|
| wmid | string | Participant's WMID | 12 digits |
Request body¶
{
"url": "https://example.com/webhooks/creditrating"
}
Response format (PUT / GET)¶
{
"OwnerWmid": "809399319852",
"RatingWmid": "391054290656",
"Url": "https://example.com/webhooks/creditrating",
"CreatedAtUtc": "2026-02-05T16:59:43.7230000Z",
"UpdatedAtUtc": "2026-02-05T16:59:43.7230000Z"
}
Explanation of the response fields¶
| Field | Type | Purpose |
|---|---|---|
| OwnerWmid | string | WMID of the subscription owner |
| RatingWmid | string | WMID of the participant being monitored |
| Url | string | URL for notification delivery |
| CreatedAtUtc | string | Date and time of subscription creation (ISO 8601 UTC) |
| UpdatedAtUtc | string | Date and time of the last subscription update (ISO 8601 UTC) |
h2.Request format (GET — getting the current subscription)
GET /api/v2/creditrating/{wmid}/subscription
Possible answers¶
200 OK— the subscription exists404 Not Found— there is no subscription
Request format (DELETE — delete subscription)¶
DELETE /api/v2/creditrating/{wmid}/subscription
Answer¶
204 No Content— subscription deleted
After deletion, a repeat GET call returns 404 Not Found.
Notification format (Webhook)¶
- Method: POST
- Content-Type:
application/json
The request body * exactly matches* the response format of the method:
GET /api/v2/creditrating/{wmid}
(see. description of the method of obtaining a credit rating).
Example call (curl)¶
curl -s -X PUT "https://debt.webmoney.com/api/v2/creditrating/111122223333/subscription" \
-H "Authorization: Bearer <JWT>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/webhooks/creditrating" }'