PAYMENTS
Stripe Integration
Accept card payments via Stripe and automatically generate PEAC-Receipts that map PaymentIntents to verifiable compliance proofs.
HTTP 402 with Stripe
Originary bridges Stripe’s traditional card payment flow with the HTTP 402 payment required pattern. When an agent requests a gated resource, respond with 402 and a Stripe PaymentIntent. After payment confirmation, issue a PEAC-Receipt.
Payment evidence is mapped to payment.evidence in the receipt, containing the Stripe charge ID, amount, and verification status.
5-Minute Quickstart
- Connect your Stripe account in the Originary dashboard
- Deploy your
peac.txtpolicy file - Gate resources with HTTP 402 + Stripe PaymentIntent
- Use Stripe webhooks to confirm payment
- Issue PEAC-Receipt with Stripe charge evidence
Code Example
// Create PaymentIntent
const paymentIntent = await stripe.paymentIntents.create({
amount: 100,
currency: 'usd'
})
// Challenge with 402
res.status(402).json({
protocol: 'stripe',
client_secret: paymentIntent.client_secret
})
// After webhook confirms payment
res.setHeader('PEAC-Receipt', signedJWT)
res.json({ content: protectedData })Ready to accept card payments?
Connect Stripe and start generating receipts for every transaction.
Get Started for $1