{"openapi":"3.1.0","info":{"title":"WhoBilled.me Resolution API","version":"1.0.0","summary":"Identify a billing descriptor and resolve the charge behind it.","description":"Public, keyless, rate-limited. Identify the merchant behind a statement line, read the resolution actions that merchant has authorized, and submit a structured request to them.\n\nIntended for AI agents acting on a cardholder's behalf. An agent cannot file a bank dispute — that needs credentials it should never hold — so this is the resolution path open to it. Submitting a request here is not a dispute and does not affect the cardholder's right to dispute later.\n\nNever send a full card number, CVV, SSN or password; such requests are rejected by pattern with the offending field named.","contact":{"name":"Descriptors.com","email":"support@arkonyk.com"},"termsOfService":"https://www.whobilled.me/terms"},"servers":[{"url":"https://www.whobilled.me"}],"paths":{"/api/agent/lookup":{"get":{"operationId":"lookupDescriptor","summary":"Identify the merchant behind a billing descriptor.","description":"Returns the merchant record, its provenance, the merchant's support pathways, and the resolution actions currently available. Unclaimed records offer `clarify` only.","parameters":[{"name":"q","in":"query","required":true,"description":"The descriptor exactly as it appears on the statement.","schema":{"type":"string","minLength":2,"maxLength":200},"example":"APL*APPLE 866-712-7753"}],"responses":{"200":{"description":"Match, or found:false with next steps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupResult"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/resolution":{"post":{"operationId":"submitResolutionRequest","summary":"Submit a resolution request to the merchant.","description":"Creates a durable request and returns a status_url to poll. The request starts in `pending_verification`: a confirmation link goes to `requester.contact_email` and nothing reaches the merchant until the cardholder clicks it.\n\nThe merchant receives a structured request, not an executed action — they verify the order in their own system before acting.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolutionRequest"}}}},"responses":{"201":{"description":"Request created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"200":{"description":"Duplicate — the existing request is returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccepted"}}}},"404":{"description":"No merchant matches merchant_ref."},"409":{"description":"Merchant has not claimed the record; only `clarify` is accepted."},"422":{"description":"Schema validation failed, or the payload contained forbidden card/credential data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited or merchant flood valve."}}}},"/api/resolution/status/{request_id}":{"get":{"operationId":"getResolutionStatus","summary":"Poll the state and outcome of a request.","description":"The `k` capability key is returned once at creation and is the only way to read the request. There are no callbacks in v1.","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"k","in":"query","required":true,"description":"status_key from the creation response.","schema":{"type":"string"}}],"responses":{"200":{"description":"Current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestStatus"}}}},"404":{"description":"Unknown request or wrong key."}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"field":{"type":["string","null"]},"message":{"type":"string"}}}}},"ResolutionAction":{"type":"object","properties":{"request_type":{"type":"string","enum":["receipt","refund","cancel","skip_payment","pause","clarify"]},"label":{"type":"string"},"available":{"type":"boolean"},"endpoint":{"type":"string","format":"uri"},"sla_hours":{"type":"integer"}}},"LookupResult":{"type":"object","properties":{"found":{"type":"boolean"},"descriptor":{"type":"string"},"merchant":{"type":"object","properties":{"name":{"type":["string","null"]},"website":{"type":["string","null"]},"category":{"type":["string","null"]},"mcc":{"type":["string","null"]},"address":{"type":["string","null"]}}},"record":{"type":"object","properties":{"is_claimed":{"type":"boolean"},"is_verified":{"type":"boolean"},"provenance":{"type":"string","enum":["merchant_verified","merchant_claimed","partner_sourced","enriched"]},"descriptor_id":{"type":"string"},"merchant_id":{"type":["string","null"]}}},"support_pathways":{"type":"array","items":{"type":"object"}},"resolution_actions":{"type":"array","items":{"$ref":"#/components/schemas/ResolutionAction"}},"human_url":{"type":"string","format":"uri"}}},"ResolutionRequest":{"type":"object","required":["request_type","merchant_ref","requester"],"properties":{"schema_version":{"type":"string","default":"1.0"},"request_type":{"type":"string","enum":["receipt","refund","cancel","skip_payment","pause","clarify"]},"merchant_ref":{"type":"object","description":"At least one of these identifies the record.","properties":{"descriptor_id":{"type":["string","null"],"format":"uuid"},"descriptor_string":{"type":["string","null"]},"merchant_id":{"type":["string","null"],"format":"uuid"}}},"order_ref":{"type":"object","properties":{"order_id":{"type":"string","description":"The merchant's own order id. Supplying it is the difference between a request they can act on and one they must chase."},"amount":{"type":"string","example":"19.99"},"currency":{"type":"string","example":"USD"},"charge_date":{"type":"string","format":"date"},"card_last4":{"type":["string","null"],"pattern":"^\\d{4}$","description":"Last four digits ONLY. Relayed to the merchant, never stored."}}},"requester":{"type":"object","required":["contact_email"],"properties":{"kind":{"type":"string","enum":["consumer","agent"]},"agent":{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"},"operator":{"type":["string","null"]}},"description":"Required when kind is \"agent\"."},"contact_email":{"type":"string","format":"email","description":"Where the confirmation link and the outcome are delivered."}}},"evidence":{"type":"object","properties":{"statement_descriptor_seen":{"type":["string","null"]},"statement_date":{"type":["string","null"],"format":"date"},"source":{"type":"string","enum":["statement","agent_purchase_record"]}}},"narrative":{"type":"string","maxLength":500},"idempotency_key":{"type":["string","null"]}}},"RequestAccepted":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["received","pending_verification","verified","routed","acknowledged","resolved","declined","expired"]},"status_url":{"type":"string","format":"uri"},"expected_next":{"type":"string"},"duplicate":{"type":"boolean"},"sla":{"type":"object","properties":{"acknowledge_by":{"type":"string","format":"date-time"}}}}},"RequestStatus":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["received","pending_verification","verified","routed","acknowledged","resolved","declined","expired"]},"terminal":{"type":"boolean"},"timestamps":{"type":"object"},"merchant_response":{"type":"object","properties":{"outcome":{"type":["string","null"]},"reason_code":{"type":["string","null"],"enum":["order_not_found","outside_refund_window","already_refunded","not_our_charge","duplicate_request","insufficient_detail","merchant_policy","suspected_abuse","other",null]},"note":{"type":["string","null"]}}}}}}}}