POST /orders & GET /orders
Create orders from quotes and list partner orders.
POST /orders
Create an escrow order from a valid quote.
Request
curl -X POST \
-H "X-API-Key: mp2p_test_xxx" \
-H "Content-Type: application/json" \
-d '{
"quoteId": "qt_abc123",
"partnerUserRef": "user_12345",
"sellerClabe": "012345678901234567"
}' \
https://mexicop2p.org/api/v1/ordersRequest body
| Field | Type | Required | Description |
|---|---|---|---|
quoteId | string | Yes | Valid, unexpired quote ID |
partnerUserRef | string | Yes | Must match the quote's user ref |
sellerClabe | string | Yes | 18-digit CLABE (standardized Mexican bank account number) where the buyer sends pesos via SPEI |
Response 201
{
"id": "ord_xyz789",
"escrowOrderId": "0x1a2b3c4d5e6f...",
"status": "PENDING_DEPOSIT",
"token": "USDC",
"amountUsdc": 100,
"totalMxn": 1725.00,
"exchangeRate": 17.25,
"sellerClabe": "012345678901234567",
"amlRiskLevel": "LOW",
"expiresAt": "2025-06-15T13:03:00.000Z",
"createdAt": "2025-06-15T12:03:00.000Z"
}Errors
| Code | HTTP | When |
|---|---|---|
VALIDATION_ERROR | 400 | Missing required fields |
INVALID_CLABE | 400 | CLABE failed validation |
INVALID_QUOTE | 404 | Quote not found or not yours |
QUOTE_EXPIRED | 410 | Quote TTL elapsed |
QUOTE_USED | 409 | Quote already used for another order |
QUOTE_USER_MISMATCH | 400 | Quote's user ref doesn't match |
NOT_FOUND | 404 | Partner user not found |
VOLUME_LIMIT_EXCEEDED | 403 | Tier volume limit exceeded |
GET /orders
List orders for your partner account with optional filters.
Request
curl -H "X-API-Key: mp2p_test_xxx" \
"https://mexicop2p.org/api/v1/orders?status=ACTIVE&limit=10&offset=0"Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | — | Filter by order status |
partnerUserRef | string | — | Filter by user reference |
limit | number | 20 | Max results (1–100) |
offset | number | 0 | Pagination offset |
Response 200
{
"orders": [
{
"id": "ord_xyz789",
"escrowOrderId": "0x1a2b3c...",
"status": "ACTIVE",
"token": "USDC",
"amount": 100,
"totalMxn": 1725.00,
"pricePerUnit": 17.25,
"fxRateUsdMxn": 17.20,
"amlRiskLevel": "LOW",
"partnerUserRef": "user_12345",
"createdAt": "2025-06-15T12:03:00.000Z",
"completedAt": null,
"expiresAt": "2025-06-15T13:03:00.000Z"
}
],
"total": 1,
"limit": 10,
"offset": 0,
"hasMore": false
}