Morphosis HMAC v1
Each draft API request proves possession of a merchant signing secret without sending that secret over the network. Generate the signature from the exact request bytes before transmission. Five request headers identify the key, version, time, nonce, and signature. One canonical string binds them to the method, request target, and body.Required headers
POST /v2/payments also requires an Idempotency-Key, but that header is not
part of the v1 canonical string. Use a stable key for one logical payment.
Canonical request
Join these six values with a single line-feed character:/v2/payments, not a host name or full URL.
Compute the signature
JSON formatting changes the body bytes. Serialize once, sign those bytes, and
send the same bytes. Do not parse and reserialize the body after signing.
Replay resistance
- Generate a cryptographically random nonce for every request.
- Send current Unix time in whole seconds.
- Never reuse a nonce, even when another field changes.
- Keep merchant clocks synchronized.
- Compare signatures in constant time in any verification tooling.