Skip to main content

Overview

When a QR Ph transaction reaches a terminal state, Modulus delivers a webhook to the callbackUrl you registered. The delivery is an HTTPS POST with an encrypted body. You decrypt it with your Encryption Key to read the transaction details.

Delivery request

  • The body is { "Token": "<JWE>" }. The Token is a compact JWE.
  • The Activation-Code header identifies which of your sub-merchant accounts the event belongs to.
  • Decrypt Token with your Encryption Key (alg A256KW, enc A256CBC-HS512), the same key used elsewhere in the QR Ph API. See Encryption & JWE Tokens for the decryption code.
There is no separate signature header. The JWE’s authenticated encryption protects integrity, but it does not prove freshness, so deduplicate as described below.

Decrypted payload

The webhook does not carry a referenceNumber that echoes your QR request. Correlate on merchantReferenceNumber. A referenceNumber only appears in error responses, where it is a newly generated support id unrelated to your reference.

Example (decrypted)

Acknowledging and retries

Return 200 or 201 to acknowledge. Only 200 and 201 acknowledge; a 202 or 204 does not. If your endpoint does not respond with 200 or 201, Modulus retries the same delivery up to 3 more times, about 15 minutes apart (4 attempts total).

Idempotency

There is no unique delivery or event id in the payload; retries reuse the same encrypted body. Deduplicate on the pair:
Every attempt for the same event shares both values. See Receiving Webhooks for the acknowledge-then-process pattern.