Skip to main content

Payments & Escrow API

Cards (PI/Checkout), bank links, crypto-compatible escrow.

C
Written by Catalin Fetean
Updated over 3 weeks ago

Audience: Finance, Devs
Outcomes: Deposits verified by webhook; safe milestone releases.

Cards — Payment Intents

curl -X POST $API_BASE/api/payments/intents -b cookies.txt \ -H 'Content-Type: application/json' \ -d '{"orderId":"ord_123","amount":150000,"currency":"USD","reference":"ORD123-DEP"}'

Cards — Hosted Checkout

curl -X POST $API_BASE/api/payments/stripe/checkout-session -b cookies.txt \ -H 'Content-Type: application/json' \ -d '{"orderId":"ord_123","amount":150000,"currency":"USD", "successUrl":"https://app.example.com/success","cancelUrl":"https://app.example.com/cancel", "reference":"ORD123-DEP"}' # → { "url": "https://checkout.stripe.com/c/..." }

Bank — open banking link

curl -X POST $API_BASE/api/payments/bank/link -b cookies.txt \ -H 'Content-Type: application/json' \ -d '{"orderId":"ord_123","amount":150000,"currency":"EUR","returnUrl":"https://app.example.com/return","reference":"ORD123-DEP"}'

Escrow (crypto-compatible)

# Deploy / monitor / release curl -X POST $API_BASE/api/escrow/deploy-contract -b cookies.txt -H 'Content-Type: application/json' \ -d '{"orderId":"ord_123","buyerAddress":"0xBuyer","sellerAddress":"0xSeller","totalAmount":"150000","currency":"USDC"}' curl -X POST $API_BASE/api/escrow/monitor-deployment -b cookies.txt -H 'Content-Type: application/json' \ -d '{"txHash":"0xHASH","orderId":"ord_123"}' curl -X POST $API_BASE/api/escrow/release -b cookies.txt -H 'Content-Type: application/json' \ -d '{"orderId":"ord_123","milestoneId":"m1","amount":50000}'

Rule of truth: mark deposits Succeeded only when the webhook confirms.

Did this answer your question?