Integration Guides
Payment Fraud
Prevent payment fraud, reduce chargebacks, and improve approval rates.
Payment fraud costs businesses billions annually. This guide shows how to use VerifyStack at the checkout step to catch fraudulent transactions while keeping false positives low.
Integration Flow
Payment flowtext
User clicks "Pay Now"
→ vs.decide({ action: 'checkout', userId, amount, currency })
→ decision: allow → process payment
→ decision: challenge → 3DS / additional verification
→ decision: deny → block transactionServer-Side Validation
Payment endpointjavascript
// Server-side: validate before processing payment
const response = await fetch('https://verifystack.io/api/v1/decide', {
method: 'POST',
headers: {
'X-API-Key': process.env.VERIFYSTACK_SECRET_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
userId: user.id,
action: 'checkout',
email: user.email,
amount: cart.total,
currency: 'USD',
metadata: {
itemCount: cart.items.length,
shippingCountry: address.country
}
})
}).then(r => r.json());
const decision = response.data;
if (decision.decision === 'deny') {
return res.status(403).json({ error: 'Transaction blocked' });
}
if (decision.decision === 'challenge') {
return res.json({ require3DS: true, requestId: decision.requestId });
}
// Proceed with payment processing
const payment = await stripe.charges.create({ ... });Chargeback Feedback Loop
When you receive a chargeback, submit it as feedback to improve future detection:
Submit chargeback feedbackbash
curl -X POST https://verifystack.io/api/v1/feedback \
-H "X-API-Key: sk_live_xxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"decisionId": "dec_original_decision_id",
"actualOutcome": "chargeback",
"confidence": 1.0,
"notes": "Chargeback received from payment processor, amount $299.99"
}'Key Signals for Payments
- Shipping/billing address mismatch
- High-value orders from new accounts
- Velocity: multiple orders in short time windows
- Device previously associated with chargebacks
- VPN/proxy usage during checkout