Overview
โAPI Basics
๐ The Escrow API is structured around RESTful principles. It uses standard HTTP response codes, authentication via API keys, and JSON-encoded request and response bodies.
โBase URL
https://dev.api.usexcrow.com/v1/plain
โAuthentication
All requests must include a valid API key in the header.
Example:
Authorization: Bearer YOUR_API_KEYhttp
The API provides endpoints to create wallets, handle funding and withdrawals, and manage multi-party escrow contracts. It ensures secure payment flows by allowing users to initiate, fund, hold, and release transactions through the escrow vault.
โ๐ฆ Contract Types
โ1. Classic Contracts
Use Case: Peer-to-peer transactions, marketplace purchases, service agreements.
In a Classic Contract:
- Funds are held in escrow after both parties agree.
- The sender deposits the funds.
- The receiver delivers the agreed service/product.
- Upon confirmation, funds are released.
- Optional dispute resolution is available.
โ2. Wager Contracts
Use Case: Competitions, predictions, gamified applications.
In a Wager Contract:
- Two or more users stake an amount on a conditional outcome.
- A condition resolver (either automated or admin-defined) determines the winner.
- Funds are automatically distributed based on outcome.
- Useful in gaming, sports betting, or competitive freelance projects.
โ๐ Common Workflows
โClassic Transaction Flow
- Client A creates a contract with Client B as the counterparty.
- Client A funds the contract.
- Client B delivers the product or service.
- Client A confirms delivery.
- Funds are released to Client B.
โWager Contract Flow
- User A creates a wager with defined rules and conditions.
- User B accepts and stakes matching funds.
- An outcome is submitted either manually or automatically.
- The system validates the result and releases funds to the winner(s).