Payload formats for receipt provider callbacks to OpenCard — required headers, HMAC signatures, and XML receipt body for resolved and deleted callback events.
When you send a collected receipt to OpenCard, the body format depends on the callback type configured for your integration.
import hmac, hashlibsignature = hmac.new( client_secret.encode(), request_body_bytes, # raw bytes, not re-serialized hashlib.sha256).hexdigest()# Set as X-Data-Signature header
const crypto = require('crypto');const sig = crypto.createHmac('sha256', clientSecret) .update(rawBodyBuffer) .digest('hex');
Hash the raw request body bytes exactly as received. Re-serializing JSON will break the signature.
transaction.true.vat — corrected VAT from merchant receipttransaction.line.items — purchase line itemsOpenCard handles EMS delivery — you only send receipts to OpenCard.