Giftie
SDK reference

Configuration

Current fields exposed by the Giftie browser SDK.

Pass configuration to window.Giftie(config). Functions remain on the host page; other non-empty values are serialized into the iframe URL.

Recording and identity

FieldTypeDefaultBehavior
domainstringlocalhost in the implementationStable site or Shopify domain. Supply it in production.
mode'video' | 'audio''video'Initial recording mode. Other values fall back to video.
occasionSelectorbooleanfalseShows the occasion selector when true.
enableFiltersbooleantrueSet to false to disable camera filters.
lensGroupIdstringnoneAdds an approved camera lens group. Coordinate custom groups with Giftie.

Brand and controls

FieldTypeDefault
imageUrlstringnone
accentColorCSS color string#91A0EB
textOnBlockColorCSS color string#ffffff
buttonTextColorCSS color string#ffffff
buttonBgColorCSS color stringaccentColor
buttonBorderColorCSS color stringaccentColor
buttonBorderRadiusnumber or numeric string, pixels8
buttonPaddingXnumber or numeric string, pixels24
buttonPaddingYnumber or numeric string, pixels12
buttonBorderWidthnumber or numeric string, pixels1
buttonFontSizeCSS length or number12px
buttonLetterSpacingCSS length or number0px

Color values are URL-encoded by the loader. Use ordinary CSS color strings, for example #C4652A.

Callbacks

FieldSignatureWhen it runs
onLoad() => voidThe widget iframe's browser load event fires.
onClose() => voidAn accepted close has begun, before the loader resets its lifecycle state.
onVideoSave(payload: GiftieSavePayload) => voidA video or audio recording is saved, before the loader begins automatic close.

The loader invokes callbacks directly and does not await returned promises. Async work can therefore continue after the modal starts closing, and each callback must catch its own promise rejection. Synchronous throws are different: a throw from the configuration onVideoSave stops the instance save hook and automatic close, while a synchronous onClose throw happens before lifecycle state reset and can leave the loader inconsistent. There is no structured onError callback in the current release.

Outside the current integration surface

Old samples contain fields such as userId, theme, and autoCloseAfterSave. The current released widget does not consume them as documented configuration. Do not depend on unlisted fields without explicit confirmation from Giftie for your integration.

Configuration values are not a secret channel. Do not include access tokens, personal data, private order fields, or customer messages.

Copyright © 2026