/api/qmail/db/payments/get
GET
Read the recipient-payment locker code and claim status attached to a received email. Use this before calling /api/qmail/raida/payments/claim.
Description
Some emails carry an attached payment — the sender stores coins in a RAIDA locker, and the email body contains the locker code only the recipient can claim. This endpoint reports whether the email has such a payment, the locker code, and whether it has been claimed yet.
Parameters
| Param | Type | Required | Description |
email_id | 32-char hex GUID | Yes | The email's GUID (from db/messages/list). |
Response
Email has a payment
{
"command": "payments-get",
"success": true,
"email_id": "0c4f8e2a91b34d57a76e1d2c3b4a5968",
"has_payment": true,
"locker_code": "AB12CD34EF56GH78",
"locker_code_hex": "4142313243443334454635364748373800000000000000000000000000000000",
"payment_status": 0,
"payment_status_text": "unclaimed",
"can_retry": true
}
Email has no payment
{
"command": "payments-get",
"success": true,
"email_id": "0c4f8e2a91b34d57a76e1d2c3b4a5968",
"has_payment": false,
"message": "No recipient payment attached to this email"
}
| Field | Description |
locker_code | ASCII printable form of the locker key. |
locker_code_hex | 32-byte locker key as 64 hex chars. |
payment_status | 0 = unclaimed, 1 = claimed, 2 = failed. |
payment_status_text | String label for payment_status. |
can_retry | True when status is not 1 (claimed). Use this to decide whether to call payments/claim. |
Errors
| HTTP | Message |
| 400 | Missing 'email_id' parameter |
| 400 | Invalid email_id format (expected 32 hex chars) |
| 404 | Email not found |
| 500 | Database error |
Example
curl "http://localhost:8081/api/qmail/db/payments/get?email_id=0c4f8e2a91b34d57a76e1d2c3b4a5968"