Acceptance flow
1
Retrieve T&C document info
After initializing the SDK, fetch the current Terms & Conditions document for the authenticated user:
2
Check acceptance status
Check whether the user has already accepted the current version:
3
Display the document
Use Alternatively, embed the document in an iframe for an in-app experience:
terms.documentUrl to show the document to the user. You can open it in a new tab:4
Record acceptance
When the user clicks your accept button, call
terms.accept():Handling T&C version updates
When Squire publishes a new version of the Terms & Conditions,getTermsAndConditionsDocumentInfo() automatically returns the new version with an updated documentUrl and isAccepted set to false. Users who accepted a previous version must accept the new one before they can record again. Run the same acceptance flow described above whenever isAccepted is false.