For developers
Escrow, disputes, and settlement as an API call.
SafePay's agreement engine is the same one running the SafePay web app, exposed directly so you can build the trust layer of your own product on top of it instead of around it.
Core concepts
Four objects, one consistent model.
Once these four concepts click, the rest of the API follows the same pattern everywhere.
Agreements
The core object in the API. An agreement holds the terms of a deal: what the seller wants to receive, delivery terms, a deadline, and the conditions that trigger release. Everything else in the API happens in relation to an agreement.
Milestones
An agreement can hold a single payment or a list of milestones, each with its own amount and release conditions. Milestones are evaluated independently, so a dispute on one doesn't block the completion of a milestone that's already done.
Disputes
Either party can open a dispute through the API while an agreement is active. Resolutions post back as an event, and the settlement plan they produce can distribute funds across more than one recipient, not just a binary release or refund.
Webhooks
Every state transition an agreement goes through fires a webhook: funded, delivered, disputed, released, and more. Your application stays in sync with SafePay without polling for status.
POST /v1/agreements
{
"seller_receives": { "amount": 200, "currency": "USD" },
"delivery_terms": "Logo design, final files",
"deadline": "2026-08-15",
"release_conditions": [
"buyer_approval",
"inspection_window"
]
}Built for real integration
Not a demo API. The same one SafePay runs on.
No separate limited tier for partners. What you can build with the API is the same platform SafePay's own web app is built on.
Idempotent by default
Every write accepts an idempotency key, so retries after a timeout never double-charge or double-release.
Sandbox environment
Test the full agreement lifecycle, including disputes and milestone releases, without moving real funds.
Provider-agnostic
Currency conversion, custody, and settlement route through swappable providers behind the same API surface.
Get early access to the API
We're onboarding a small group of developers ahead of general availability. Join the waitlist and mention what you're building.