Skip to main content

POST /aged-wallets/pay/:orderId

Pay an INTERNAL order from one of your own wallets. The wallet is charged the order total and the worker then delivers the aged wallets.

Accepts an optional Idempotency-Key header.

Use case​

Skip the manual transfer: pay directly from an Orbitt wallet.

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 charging again. 5xx/429 answers are not stored, so those retries run again.

Path params​

ParamRequiredDescription
orderIdyesAged-wallets order id.

Body​

FieldTypeRequiredDescription
fromWalletstringyesPublic key of one of your wallets. It needs the order total plus 0.001 SOL for the network fee.

Response 200​

The updated order object (same shape as in initialize).

Errors​

StatusMeaning
400Validation failed; or insufficient balance (body adds nBalanceSOL and nRequiredSOL); or malformed Idempotency-Key.
403fromWallet is a Smart Sell–only wallet.
404fromWallet or the order not found / not yours.
409Order is EXTERNAL, not waiting for payment, or its deposit address already holds SOL; or the Idempotency-Key request is still running.
410The order expired before payment.
502Payment could not be confirmed. Read status before paying again — the transfer may still land.
503Idempotency storage unavailable.

Example​

curl -X POST "$BASE_URL/aged-wallets/pay/<orderId>" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Idempotency-Key: aged-pay-0001" \
-H "Content-Type: application/json" \
-d '{ "fromWallet": "<wallet public key>" }'