Create Vault

Locks trade funds in programmatic escrow vaults between two 13-digit accounts starting with 38. Funds are locked from the buyer's single wallet balance using their transaction PIN until inspection confirmation.

POST/v1/p2p/orders/createLive & Sandbox

Request Headers

HeaderTypeStatusDescription
AuthorizationstringRequiredBearer vxz_tok_* (OAuth 2.0 Scoped Bearer Token)
Content-TypestringRequiredapplication/json
Idempotency-KeystringRecommendedUnique key for this operation, 8–80 characters. Send it to make retries safe: repeating the same key returns the original result instead of performing the operation twice. Without it the API derives a key from the request body and replays the original result for a few minutes, so an accidental double submit is still ignored.

Body Parameters (JSON)

ParameterTypeStatusDescription
orderTypestringRequiredESCROW_P2P or ESCROW_COMMERCIAL.
buyerAccountstringRequired13-digit buyer account number starting with 38 (e.g. 3810482910482).
sellerAccountstringRequired13-digit seller account number starting with 38 (e.g. 3892018471920).
amountnumberRequiredAmount to lock into cryptographic vault.
encryptedPinstringRequiredBuyer's encrypted transaction PIN authorizing vault creation.

Request Code Snippets (cURL, Node, Python, PHP, Go)

Request Example
curl -X POST https://developer.vixzz.com/v1/p2p/orders/create \
  -H "Authorization: Bearer vxz_tok_c2b_8f9k3m9s2a1l" \
  -H "Content-Type: application/json" \
  -d '{
    "orderType": "ESCROW_P2P",
    "buyerAccount": "3810482910482",
    "sellerAccount": "3892018471920",
    "amount": 120000,
    "currency": "KES",
    "expiryMinutes": 60,
    "encryptedPin": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3f9...",
    "disputeResolution": "AUTOMATED_ARBITRATION"
  }'

JSON Return Response Body (200 OK)

Response
{
  "success": true,
  "orderId": "ESC_VXZ_749201",
  "status": "VAULT_LOCKED",
  "lockedAmount": 120000,
  "currency": "KES",
  "releaseKey": "REL_VXZ_SHA256_8819",
  "expiresAt": "2026-09-07T03:30:00.000Z"
}