lootably-postback-hash
v2.0.0
Published
A library for generating Lootably postback hashes
Downloads
110
Maintainers
Readme
Lootably Postback Hash
A TypeScript library for generating Lootably SHA256 postback hashes.
Installation
npm install lootably-postback-hash
Usage
import { generateSHA256PostbackHash } from 'lootably-postback-hash';
const hash = generateSHA256PostbackHash({
userID: 'example_user_123',
ip: '192.0.2.1',
revenue: '0.5000',
currencyReward: '100.00',
postbackSecret: process.env.LOOTABLY_POSTBACK_SECRET,
});
console.log('Generated hash:', hash);
Note: Ensure that the environment variable LOOTABLY_POSTBACK_SECRET
is set before running the script.
Parameters
The generateSHA256PostbackHash
function accepts an object with the following properties:
userID
(string): The user's ID from the postback.ip
(string): The user's IP address from the postback.revenue
(string): The revenue amount from the postback.currencyReward
(string): The currency reward amount from the postback.postbackSecret
(string): The secret key for your Lootably placement.debug
(boolean, optional): If true, logs debug information.
API Documentation
For detailed information about the Lootably API and postback system, please refer to the Lootably Postback Documentation.
Contact
If you have any questions or need assistance, please email us at [email protected] or reach out to your Lootably contact.