Installing Upzelo
3 Steps to get started quickly.
1. Insert the Upzelo JS Snippet
<script
id="upzpdl"
src="https://assets.upzelo.com/upzelo.min.js"
appId="Upzelo App ID"
></script>2. Server-side authentication
<?php
declare(strict_types=1);
$retentionApiKey = 'upz_1234'; // Replace with retentionApi key.
$customerId = 'cus_1234'; // Replace with a real customer ID
echo hash_hmac('sha256', $customerId, $retentionApiKey);
// bd9d2eca979333103b3d93a80e8efcbd0f8421813fdb9feefffde2206b4115e8package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"fmt"
)
func main() {
// Set the retentionApi Key
retentionApiKey := "upz_1234"
// Set the customerId
customerId := "cus_1234"
// Generate an HMAC hash.
hash := hmac.New(sha256.New, []byte(retentionApiKey))
hash.Write([]byte(customerId))
hmac := hex.EncodeToString(hash.Sum(nil))
fmt.Println(hmac)
// bd9d2eca979333103b3d93a80e8efcbd0f8421813fdb9feefffde2206b4115e8
}3. Link your cancel button
Last updated