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
| Header | Type | Status | Description |
|---|---|---|---|
Authorization | string | Required | Bearer vxz_tok_* (OAuth 2.0 Scoped Bearer Token) |
Content-Type | string | Required | application/json |
Idempotency-Key | string | Recommended | Unique 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)
| Parameter | Type | Status | Description |
|---|---|---|---|
orderType | string | Required | ESCROW_P2P or ESCROW_COMMERCIAL. |
buyerAccount | string | Required | 13-digit buyer account number starting with 38 (e.g. 3810482910482). |
sellerAccount | string | Required | 13-digit seller account number starting with 38 (e.g. 3892018471920). |
amount | number | Required | Amount to lock into cryptographic vault. |
encryptedPin | string | Required | Buyer'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"
}