AGENT VIEW · Mokabla · Question · idempotent-bill-payment
AgentGate · request ag_43bfbfb4be38

Who you are, as far as this app can tell

declared   ClaudeBot · Anthropic   · not verified

The user agent is ClaudeBot (Anthropic), which identifies itself as an AI agent.

Signals: Known agent user agent

This classification is final for the session. The human pages are not served to agents.

This page

page
question
human URL
https://www.mokabla.com/en/c/fawry/idempotent-bill-payment

State

question
object · slug, title, difficulty, tags, is_free, locked, frequency, last_reported_at, url, agent, company, body_md, follow_ups_md
paid
false
access
Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions.
{
  "question": {
    "slug": "idempotent-bill-payment",
    "title": "Idempotent Payment",
    "difficulty": "medium",
    "tags": [
      "coding",
      "technical",
      "backend"
    ],
    "is_free": true,
    "locked": false,
    "frequency": 1,
    "last_reported_at": "2026-08-08T20:54:15.530427Z",
    "url": "https://www.mokabla.com/en/c/fawry/idempotent-bill-payment",
    "agent": {
      "page": "https://www.mokabla.com/agent/en/c/fawry/idempotent-bill-payment",
      "question": "https://www.mokabla.com/agent/_call/get_question?company=fawry&question=idempotent-bill-payment"
    },
    "company": {
      "slug": "fawry",
      "name_en": "Fawry"
    },
    "body_md": "## Problem\nA POS terminal pays an electricity bill through our Spring service. Terminals sit on flaky 3G, so they\nretry the same `POST /payments` whenever they do not get a response. Implement `PaymentService.pay(request)`\nso a bill is charged at most once no matter how many copies of the request arrive, including two copies\nhitting different pods at the same time. Each request carries a terminal-generated `requestId`, a\n`billRef` and an `amount`. The first call performs the debit and stores the outcome; every later call with\nthe same `requestId` returns the same outcome without touching the biller. Reusing a `requestId` with a\ndifferent `amount` must be rejected.\n\n## Examples\n**Example 1**, `pay({requestId: \"t9-0012\", billRef: \"EL-4471\", amount: 350})` → `{status: \"PAID\",\ntxnId: \"TX1\"}`; the identical call again → `{status: \"PAID\", txnId: \"TX1\"}` and the biller was called\nexactly once.\n\n**Example 2**, `pay({requestId: \"t9-0012\", billRef: \"EL-4471\", amount: 400})` after Example 1 →\n`{status: \"REJECTED\", reason: \"IDEMPOTENCY_MISMATCH\"}`.\n\n## Constraints\n- Two identical requests may hit two pods within the same millisecond; the database is the only shared state\n- The biller call can take up to 8 s; do not hold a DB lock for its duration\n- Idempotency records expire after 24 h\n\n## What they look for\nA unique constraint on `request_id` used as the lock (insert an `IN_PROGRESS` row first and catch the\nduplicate-key exception), a state machine `IN_PROGRESS → PAID / FAILED`, what to return while a twin\nrequest is still in progress (409 or wait), and how `@Transactional` boundaries interact with the slow\nbiller call. Bonus: hash the payload to detect mismatches instead of comparing fields one by one.",
    "follow_ups_md": "- The biller is itself not idempotent. What do you send it?\n- A terminal replays a request after 25 hours. Charge again or refuse?"
  },
  "paid": false,
  "access": "Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions."
}

Actions you may take here

actioninputpermission
get_question
One question with its body. Bodies are paid content unless the question is free.
company: string, question: stringAllowedcall →
list_questions
The questions reported at a company: titles, tags, difficulty, whether each is free or paid.
company: string, page: number?Allowedcall →
buy_access
Buy 30 days of access to a company.
company: stringRefused
R1 This action is for people only
people: https://www.mokabla.com/en/pricing
post_comment
Comment on a question.
question: string, text: stringRefused
R1 This action is for people only
people: https://www.mokabla.com/en/companies

Allowed actions answer in JSON. Add ?format=json or send Accept: application/json to get this whole page as data.

Navigate (pre-filled links you can follow)

Notices

This classification is final for the session: it came from a strong signal, not a guess. The human pages are not served to agents.
Unverified agents are read-only. Signed requests (Web Bot Auth) are the path to write access.