U-net Docs
guide

Checkout-bound verification

Bind a verification proof to the same holder who logged into your service, preventing a different phone from satisfying a restricted checkout.

@union-networks/verification@union-networks/server

Why binding matters

Identity-only login and attestation proof are separate events. Checkout-bound verification connects them inside trust-plane so a logged-in scoped account cannot ask someone else to scan the age QR.

The provider still sees only the scoped ID and checkout status. The private holder match stays inside U-net infrastructure.

Create a checkout verification

Use this for restricted goods, account-bound actions, or high-risk workflows where the proof must belong to the logged-in account.

tsRestricted checkout
import {
  createCheckoutVerification,
  pollCheckoutVerification,
} from '@union-networks/verification';

const checkout = await createCheckoutVerification(
  {
    serviceId: 'example-shop',
    assertionJws,
    requiredChecks: ['age_over_18'],
    restrictedResourceIds: ['wine-001'],
    ttlSeconds: 120,
  },
  { issuerBaseUrl: 'https://issuer.egress.live' },
);

if (checkout.requiresVerification && checkout.verification) {
  renderQr(checkout.verification.qrPayload);
  const finalCheckout = await pollCheckoutVerification(
    {
      checkoutId: checkout.checkout.checkoutId,
      serviceId: 'example-shop',
      assertionJws,
    },
    { issuerBaseUrl: 'https://issuer.egress.live' },
  );

  if (finalCheckout.checkout.status !== 'completed') {
    removeRestrictedItems(finalCheckout.checkout.failureReason);
  }
}
Representation

Basket can continue after restricted items are removed on failure.