Docs

File DA-026 View as Markdown

Stripe

Needs a public key on the snippet: tokens don't work keyless. See Capabilities.

// browser
const daToken = await doubleagent.stripeToken().catch(() => '');
// server: before confirming
import { createDoubleAgent } from '@doubleagent-so/node';
const da = createDoubleAgent();
const claims = await da.verifyToken(daToken, { site: 'st_…' }).catch(() => null);
if (claims) await da.stripe.attachVerdict(stripe, paymentIntentId, claims);
// metadata: da_class, da_score, da_agent, da_sid. Checkout: payment_intent_data.metadata

Radar rules (these need Radar for Fraud Teams):

Review if ::da_class:: = 'bot'
Request 3D Secure if ::da_class:: = 'agent' and :amount_in_usd: > 500

Metadata compares as strings, so don't write rules on da_score. A missing token means unknown, not bot.

The metadata isn't relabelled automatically yet (the SDK sends no PaymentIntent id). Use the Debrief and call attachVerdict again.