Checkify
Documenti per sviluppatori

Incorpora SDK riferimento

Browser API per Verifica Checkify Pass. URL CDN: https://checkify.me/sdk/v1/checkify.min.js

Installa

<script src="https://checkify.me/sdk/v1/checkify.min.js"></script>

Dopo il caricamento, window.Checkify.version segnala la versione SDK (attualmente 1.0.1).

Montaggio automatico HTML

Il SDK monta automaticamente gli elementi con questi attributi al caricamento della pagina:

<div
  data-checkify-pass="YOUR_PASS_ID"
  data-checkify-request="human"
  data-checkify-text="Verify with Checkify"
  data-checkify-return-url="https://yoursite.com/done"
></div>

Deprecato: data-checkify-launcher funziona ancora ma registra un avviso sulla console. Utilizza invece il tipo di richiesta Pass +.

MetodoDescrizione
data-checkify-passYour Checkify Pass public ID (required)
data-checkify-requestRequest type: human, age_over_18, age_over_21, age_over_25, or age_over_N
data-checkify-textButton label text
data-checkify-return-urlOptional URL to return to after app handoff
data-checkify-launcherDeprecated launcher ID — use data-checkify-pass instead

Checkify.configure(options)

Imposta le impostazioni predefinite globali prima di montare i widget.

Checkify.configure({
  baseUrl: 'https://checkify.me',
  completeUrl: '/checkify/complete'
});

Checkify.bindForm(form, options)

Renders è un pulsante di verifica, scrive un token su un input nascosto e disabilita l'invio fino alla verifica.

Checkify.bindForm('#my-form', {
  passId: 'YOUR_PASS_ID',
  requestType: 'human',
  buttonTarget: '#checkify-wrap',
  submitButton: '#submit',
  hiddenInput: '#checkify_token',
  disableSubmitUntilVerified: true
});

Checkify.createHumanGate(options)

Porta a pagina intera o contenitore che blocca il contenuto fino al completamento della verifica.

Checkify.createHumanGate({
  passId: 'YOUR_PASS_ID',
  requestType: 'human',
  container: '#gate-root',
  title: 'Verify to continue'
});

Flusso URL di ritorno

Quando gli utenti completano la verifica nel Checkify app, potrebbero tornare al tuo sito con checkify_request_id nella stringa di query. Il SDK chiama Checkify.checkReturnedVerification() automaticamente al caricamento.

Checkify.verify(options)

Start verification programmatically without auto-mounting HTML. Returns a promise that resolves when the user completes or cancels.

const result = await Checkify.verify({
  passId: 'YOUR_PASS_ID',
  requestType: 'human',
  container: document.getElementById('checkify-root')
});
console.log(result.requestId); // send to your server as request_id

Eventi

window.addEventListener('checkify:verified', (e) => {
  console.log('Verified', e.detail);
});

window.addEventListener('checkify:error', (e) => {
  console.error('Checkify error', e.detail);
});

Status polling (optional)

Most integrations should verify on form submit with POST /v1/qr/results/verify. For custom frontends without the embed, you may poll status while the user completes verification in the app.

Verifica server

Metodi

MetodoDescrizione
Checkify.mount(root?)Widget Mount Pass sotto l'elemento root opzionale
Checkify.bindForm(...)Assistente integrazione modulo
Checkify.createHumanGate(...)Porta di verifica umana UI
Checkify.verify(options)Flusso di verifica programmatica
Checkify.checkReturnedVerification()Gestisci l'URL di ritorno dopo il trasferimento dell'app