Skip to main content

trusted-issuance-auth

Signed Requests (Trusted Issuance)

This endpoint requires your account's calling IP to be whitelisted, and a signed x-timestamp / x-signature header pair proving the request genuinely originates from your backend (not just anyone holding a leaked x-api-key). Both are mandatory on every request.

HeaderDescription
x-timestampCurrent Unix timestamp (seconds). Must be within 5 minutes of server time.
x-signaturehex(HMAC-SHA256(apiSecret, apiKey + ":" + timestamp)), computed with your Client Secret.
IP whitelisting is mandatory

Your calling IP must be whitelisted on your merchant account, or every request to this endpoint is rejected with 403 Forbidden. Contact tech team or support@onmeta.in to whitelist the IP's.

Signature is mandatory

x-timestamp and x-signature are required on every request. If either header is missing, incomplete, stale, or doesn't match, the request is rejected with 401 Unauthorized.

Code for generating x-timestamp / x-signature

const crypto = require("crypto");

function signTrustedIssuance(apiKey, apiSecret, timestamp) {
const payload = `${apiKey}:${timestamp}`;
return crypto.createHmac("sha256", apiSecret).update(payload).digest("hex");
}

const apiKey = "<CLIENT_ID>";
const apiSecret = "<CLIENT_SECRET>";
const timestamp = Math.floor(Date.now() / 1000).toString();
const signature = signTrustedIssuance(apiKey, apiSecret, timestamp);

console.log({ timestamp, signature });

Where to find your Client Secret

Log in to your Merchant DashboardSetupAPI's Setup. Use the Client Secret (not the Client ID) as apiSecret. Keep this value private and never expose it in client-side code or public repositories.