Skip to main content

POST /aged-wallets/initialize

Open an aged-wallets order. Creates the order with a fresh deposit address and a 30-minute payment window.

Only one unpaid order may be open per user. Accepts an optional Idempotency-Key header (see below).

Use case​

Start a purchase. Pay it afterwards by sending SOL to sDepositAddress (EXTERNAL) or with pay (INTERNAL).

Headers​

HeaderRequiredDescription
Idempotency-Keyno8–128 chars of A-Za-z0-9_-. A retry with the same key within 24 h returns the first response (with Idempotent-Replayed: true) instead of creating a second order. 409 while the first request is still running.

Body​

FieldTypeRequiredDescription
eWalletTypestringyesUNFUNDED or FUNDED.
nCountintegeryesBundle size: one of 10, 20, 30, 50, 100.
ePayModestringyesEXTERNAL (pay the deposit address) or INTERNAL (charged from one of your wallets via pay).

Response 201​

{
"orderId": "665f1c2e9b1d4a0012345678",
"eStatus": "PENDING_PAYMENT",
"eWalletType": "UNFUNDED",
"nCount": 10,
"nPricePerWalletSOL": 0.01,
"nTotalSOL": 0.1,
"ePayMode": "EXTERNAL",
"sDepositAddress": "<deposit address>",
"dExpiresAt": "2026-10-30T12:30:00.000Z",
"dPaidAt": null,
"dFulfilledAt": null,
"sError": null,
"sPaymentSignature": null,
"aWallets": [],
"dCreatedAt": "2026-10-30T12:00:00.000Z"
}

aWallets stays empty until the order is FULFILLED.

Errors​

StatusMeaning
400Validation failed, or malformed Idempotency-Key.
409An unpaid order is already open (pendingOrderId in the body), or the Idempotency-Key request is still running.
503Service disabled or that kind is sold out; or idempotency storage unavailable.

Example​

curl -X POST "$BASE_URL/aged-wallets/initialize" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Idempotency-Key: aged-order-0001" \
-H "Content-Type: application/json" \
-d '{ "eWalletType": "UNFUNDED", "nCount": 10, "ePayMode": "EXTERNAL" }'