POST /classic/pay
Pay the pending classic order from one of the user's wallets.
Sends the SOL the initiated bots still lack from the wallet to the user's payment address. The worker starts the bots once the payment address holds the order total. Sync — waits for tx confirmation and returns the signature.
The amount is the payment worker's own total (sum of package nSOL,
including any discount the user holds), so it
matches amountToPaySol from /classic/initiated.
If the payment address already holds enough SOL, nothing is sent.
Use case
Skip the manual transfer after /classic/initialize:
pay the pending order straight from a wallet listed by
/wallets/all.
Headers
| Header | Required | Description |
|---|---|---|
Idempotency-Key | no | 8–128 chars of [A-Za-z0-9_-]. A retry with the same key within 24 hours returns the first response (with Idempotent-Replayed: true) instead of sending a second payment. 409 while the first request is still running; 503 if idempotency is unavailable. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
sWalletAddress | string | yes | Source pubkey; must be user-owned. |
Response 200
{
"message": "Payment sent",
"paymentAddress": "…",
"sFrom": "…",
"nSol": 9,
"signature": "3k…"
}
When the payment address already covers the order:
{
"message": "The payment address already covers this order",
"paymentAddress": "…",
"nSol": 0
}
| Field | Description |
|---|---|
nSol | SOL sent: the order total minus what the payment address already held. |
Errors
| Status | Meaning |
|---|---|
400 | Invalid sWalletAddress; insufficient balance (response includes nBalanceSol, nRequiredSol); or the wallet would be left below the rent-exempt minimum. |
403 | The wallet was imported through /wallets/import and is reserved for Smart Sell. |
404 | No initiated classic bot, or wallet not found / not owned. |
500 | The order total could not be computed, or the user has no payment address. |
502 | The transfer was not confirmed. |
503 | Balance could not be fetched; retry later. |
Example
curl -X POST "$BASE_URL/classic/pay" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Idempotency-Key: pay-66b4-0002" \
-H "Content-Type: application/json" \
-d '{ "sWalletAddress": "…" }'