Skip to main content
Campaigns are the central container for all mechanics. You define the available prizes, their probabilities, user limits, and when they activate.

Create a campaign

Response:

Parameters

string
required
Internal campaign name. Only visible in your console.
string
required
Your backend URL where Nippy will send events. Must be HTTPS.
string
required
Secret for verifying the HMAC-SHA256 webhook signature. Minimum 16 characters.
number
default:"1"
Maximum spins per user. Use -1 for unlimited.
number
default:"0"
Wait time between spins for the same user. Use 0 for no cooldown.
array
required
List of available prizes. Probabilities must add up to exactly 100.

Prize types

The probabilities of all gifts in a campaign must add up to exactly 100. If they don’t, creation fails with a validation error.

Create activation rules

Rules define which business event triggers a mechanic automatically. When the bank calls nippy.track(), the engine evaluates the campaign’s rules and executes the action if the condition is met.

Rule: unlock spin for purchases over $100

Rule: grant points for purchases over $500

Available condition operators

Available actions

List campaigns