Monopay webhook
const url = 'https://beta-api.plune.ai/v1/billing/webhooks/monopay';const options = { method: 'POST', headers: {'X-Sign': 'example', 'Content-Type': 'application/json'}, body: '{"invoiceId":"p2_9ZgpZVsl3","status":"success","amount":4200,"ccy":980,"modifiedDate":"2026-11-13T10:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/billing/webhooks/monopay \ --header 'Content-Type: application/json' \ --header 'X-Sign: example' \ --data '{ "invoiceId": "p2_9ZgpZVsl3", "status": "success", "amount": 4200, "ccy": 980, "modifiedDate": "2026-11-13T10:00:00Z" }'Called by Monopay, not by a person or a CI. No session and no token: X-Sign is the base64 of a DER ECDSA signature over SHA-256 of the raw body, checked with the merchant’s public key (GET /api/merchant/pubkey, cached), checked on the raw bytes of the body before any JSON is read. A verified event is stored once (provider + its own key) and applied to the tier by the worker; a repeat delivery answers 200 and changes nothing. While MONOPAY_TOKEN is unset on the server the route answers 503 provider_not_configured and stores nothing. The body is held to 512 KiB.
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”The base64 of a DER ECDSA signature over SHA-256 of the raw body, checked with the merchant’s public key (GET /api/merchant/pubkey, cached)
Request Body required
Section titled “Request Body required ”object
Example
{ "invoiceId": "p2_9ZgpZVsl3", "status": "success", "amount": 4200, "ccy": 980, "modifiedDate": "2026-11-13T10:00:00Z"}Responses
Section titled “ Responses ”The event is stored (stored), or the same delivery was already (duplicate). Sent only after the write committed.
object
Example
{ "outcome": "stored"}The signature is right but the body is not an event of this provider
object
Example generated
{ "error": "example"}The signature is missing or does not match; the body is empty
The body is over 512 KiB
object
Example generated
{ "error": "example"}MONOPAY_TOKEN is not set on this server (code: provider_not_configured), or the key to check with could not be fetched from monobank (code: provider_unreachable) - the provider sends again
object
Example generated
{ "error": "example"}