Use encryption key: Calculate signature
All calls to Tipalti's API web service carry an encryption key. Every request to Tipalti must contain authentication information to establish the identity of the organization making the request. The authentication process is accomplished by signing the headers using a calculated signature.
To calculate the signature:
- Create an "authorization string" by concatenating the payer name, payee ID (for payee functions) and current UTC Coordinated Universal Time time in Unix format (i.e., seconds since 1/1/1970).
- Concatenate additional information per the web service definition (i.e., EAT Encryption Additional Terms).
For PayeePayable, the requested EAT is the amount. If the amount is 50, the above example would change to MyPayerNamePayee999122265707150.
- UTF8 encode the string.
- Encrypt with HMACSHA256.Use the master encryption key assigned to you by Tipalti.
Example
Output key:
1Ph7zfqqDasBCw0WTxxDaDpdTAOXLbxSVJeLswfK7Ppx7tkw60YLDzHFNpcSx8Mz
Concatenate EAT parameters
EAT parameters are concatenated to the authorization string as strings.
Only one EAT parameter is concatenated to create the string for encryption.
The description for every function lists the EAT parameter. The following are examples of a string for encryption of payer functions.
Example
[payer name][timestamp][EAT parameter]
[payer name][idap][timestamp][EAT parameter]
To convert EAT parameters to strings:
- String: Leave as is.
- Integer: Convert to string.
- Floating point: Round down, convert to integer, then to string.
- Date/ time: Convert to Unix time, then to string.
- Add date: 1/1/2015, convert to Unix time, then to string.
- Add time: 00:00, convert to Unix time, then to string.
- Character: Convert to string.