Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nippy.la/llms.txt

Use this file to discover all available pages before exploring further.

claim() completes delivery for prizes that are not credited automatically.

Usage

const result = await nippy.claim({
  spinId: 'spin-abc',
  userId: 'user-123'
})

Parameters

spinId
string
required
ID of the spin that generated the prize. Example: spin-abc.
userId
string
required
Must match the userId from the original spin. Example: user-123.

Response

claimId
string
Unique claim ID.
status
string
Claim status. Expected value: claimed.
gift
object
Claimed prize.
gift.giftId
string
Claimed prize ID.
gift.name
string
Claimed prize name.
gift.type
string
Prize type. Examples: won_digital, won_physical.
gift.pointsValue
number | null
Points associated with the prize, if applicable.
claimedAt
string
ISO 8601 timestamp when the claim was completed.
Reservations have an expiration date. If the user does not claim before prizeReservation.expiresAt, the prize is released back to inventory.