Forum Academy Marketplace Showcase Pricing Features

Generating a signature via Hash HMAC method, using SHA2-512

Anyone ever tried doing this with bubble?

Hi I’m trying to generate a signature using these directions:

Every request to the Transaction API must be signed with your shared secret.

The signature is generated via Hash HMAC method, using SHA2-512 as hashing algorithm and is expected to be BASE64 encoded.

If you are using one of the Gateway Client SDKs you don’t have to care about generating and passing signatures, everything is already done for you.

The signature message is built by concatenating the following data with a line break “\n”

  • HTTP Method (“POST”)
  • MD5 hash of payload (the XML itself)
  • Content-Type header (e.g. “text/xml; charset=utf-8”)
  • Timestamp as sent in Date header
  • Additional custom headers (usually empty)
  • Request URI string (usually “/transaction”)

Afterwards you build the HMAC digest with SHA512 of this message with the shared secret as key. The digest should be generated in binary (not hexadecimal) and then base64 encoded.