SazitoSazito SDKv1.4.0
Guides

Troubleshooting

Diagnose common SDK integration failures quickly.

error.type === 'validation'

Usually indicates missing local prerequisite state:

  • no cart credentials before invoice creation
  • no invoice credentials before payment actions
  • no shipping credentials before address retrieval

error.type === 'network'

Check:

  • runtime has fetch
  • timeout is high enough
  • environment can reach Sazito APIs from your deployment network

Inspect res.error.details.cause for the underlying failure:

if (res.error?.type === 'network') {
  const cause = res.error.details?.cause;
  console.error(cause?.code, cause?.message); // e.g. ENOTFOUND, UNABLE_TO_VERIFY_LEAF_SIGNATURE
}

Authentication failures

  • Call setAuthToken before methods that require authentication.
  • Pass the raw JWT, without a Bearer prefix.

Debug mode

Enable debug: true on both the SDK client and checkout config to print the complete payment-verification trace:

const client = createSazitoClient({
  domain: 'mystore.sazito.com',
  debug: true,
});

<SazitoCheckoutPage
  config={{ debug: true }}
/>

Debug logs help follow payment verification, polling, and checkout UI state. Related entries share a correlation ID such as callback-...; credentials and customer personal information are redacted.

On this page