MEXICOP2P

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/orders

Request body

FieldTypeRequiredDescription
quoteIdstringYesValid, unexpired quote ID
partnerUserRefstringYesMust match the quote's user ref
sellerClabestringYes18-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

CodeHTTPWhen
VALIDATION_ERROR400Missing required fields
INVALID_CLABE400CLABE failed validation
INVALID_QUOTE404Quote not found or not yours
QUOTE_EXPIRED410Quote TTL elapsed
QUOTE_USED409Quote already used for another order
QUOTE_USER_MISMATCH400Quote's user ref doesn't match
NOT_FOUND404Partner user not found
VOLUME_LIMIT_EXCEEDED403Tier 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

ParameterTypeDefaultDescription
statusstringFilter by order status
partnerUserRefstringFilter by user reference
limitnumber20Max results (1–100)
offsetnumber0Pagination 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
}

On this page