Skip to content

Offers: send, receive and respond to price offers in chat #22

Closed

Description

@Microck

Parent

#1

Why this reverses a recorded decision

docs/cli-spec.md §13 lists "offers and anything touching wallet, shipping or payments" as (never), and docs/spec-wallapop-cli-v1.md repeats it. The owner reversed that on 2026-09-16: offers are now in scope. Wallet, shipping and payments stay out. §13 and the ADR trail must be updated in the same PR that ships this, so the spec stops contradicting the code.

What to build

Price offers are a first-class Wallapop chat action, not a text message. Today the CLI drops them silently: Chat.Subscribe filters on u.type and keeps only text and server-message, so an offer arriving mid-conversation shows as nothing at all in chat open and chat show.

  • chat offer CONV AMOUNT sends a price offer on a conversation
  • chat offer accept CONV / chat offer decline CONV respond to the other side's offer
  • Offers appear in chat show, chat list and the chat open stream with their amount, currency and state (pending, accepted, declined, expired)
  • Unknown future message types are surfaced rather than discarded, so the next chat feature Wallapop adds does not vanish

Acceptance criteria

  • The real wire shapes are recorded live against the owner's two accounts (PubNub meta type and payload for an offer, and whatever REST endpoint the web calls to create and respond to one), and written into docs/cli-spec.md the way the other recorded shapes are
  • internal/fakewallapop serves those recorded shapes; tests assert on them
  • Sending, receiving, accepting and declining are each verified live between the two accounts, on the owner's own throwaway listing
  • Chat.Subscribe no longer discards message types it does not recognise
  • docs/cli-spec.md §13 and docs/spec-wallapop-cli-v1.md are corrected, with an ADR recording why the decision changed
  • Money-adjacent actions beyond offers (wallet, shipping, payments) stay out, and the MCP server in MCP stdio server and harness install #8 does not expose offer sending

Blocked by

Activity

  1. Microck commented on Sep 16, 2026

    @Microck
    OwnerAuthor

    Note

    🤖 Claude Opus 5 responding on behalf of Microck

    Scope narrowed by the owner on 2026-09-16, after discovery showed the ticket's original premise was wrong.

    What discovery found

    Offers are not a chat message type. Read from the shipped web client (web-static.wallapop.com/angular/es/, 2026-09-16):

    • The chat's PubNub layer handles exactly two meta types, text and server-message, which are the two the CLI already keeps. Offers reach chat as server-message third-voice payloads: message.payload = {type, payload: "<json string>"}, the inner JSON being {text, type, actionURL, buttons:[{"loc-value", action}]}, with inner types including delivery, delivery_generic, delivery_transaction_claim_period_started, drop_price and price_drop.
    • Every offer write lives under api/v3/delivery/..., which is Wallapop's shipping product, and accepting leads to api/v3/payments/c2b/stripe.

    So "offers, but wallet, shipping and payments stay out" is not a line Wallapop's API draws. Accepting an offer commits to a real shipped sale against a real card.

    Revised scope

    In: send an offer, decline an offer, and display offers wherever messages are displayed.

    Out for now: accepting. That is the branch that charges a card, and it is deferred to its own ticket so it gets approved on its own terms rather than riding in on this one.

    Recorded live, default account, 2026-09-16

    GET https://api.wallapop.com/bff/delivery/make-an-offer?item_id=vjrewv00elzk needs Authorization: Bearer, X-DeviceOS: 0 and X-AppVersion: 0. Without the last it is a bare 400, the same quirk savedsearch has. It answers:

    {"restriction":{"max_offers_per_day":10,"remaining_offers_per_day":10,"max_offer_percentage":30},
     "item":{"title":"...","price":{"amount":1.00,"currency":"EUR"}},
     "items_price":{"amount":1.00,"currency":"EUR"},"offer":null,
     "suggested_offers":[]}

    max_offer_percentage: 30 is a floor: an offer has to be at least 70 percent of the asking price. Repeatable item_id covers bundles, and &offer_id= reloads an existing offer.

    From the bundle, not yet exercised

    • POST api/v3/delivery/buyer/offers with {offer_id, offer_price_amount, offer_price_currency, item_ids}
    • PATCH api/v3/delivery/offers/{offerId}/status with {status}, values ACCEPTED and DECLINED
    • PATCH api/v3/delivery/offers/{offerId}/offer-price with {offer_price_amount, offer_price_currency}, the counter-offer
    • GET bff/delivery/offer-details for the status card

    Revised acceptance criteria

    • chat offer CONV AMOUNT sends an offer; the daily cap and the 70 percent floor are usage errors before anything is sent, not surprises from the API
    • chat offer decline CONV declines one
    • Offers show up in chat show, chat list and the chat open stream with amount, currency and state
    • Chat.Subscribe stops discarding message types it does not recognise, so the next thing Wallapop adds does not vanish
    • Sending and declining are verified live between the owner's two accounts on his own listing
    • Accepting is not implemented, and the spec says why
    • docs/cli-spec.md §13 and docs/spec-wallapop-cli-v1.md are corrected, with an ADR recording the reversal and the accept carve-out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions