Inspiration

I am from Mali and I live in France. Like millions of people in the diaspora, I send money home every month. Remittances to West Africa still cost a lot in fees, and once the cash arrives, the sender has no idea what it really paid for. So many families do it another way: they ask a friend who is travelling to carry a bag of rice, oil, soap and medicine. That is slow, unreliable, and it depends on someone flying at the right time.

I wanted to keep what families like about that bag (real goods, chosen with care) and remove everything that makes it painful. Panier Famille is the result: you send a basket, not cash.

What it does

Panier Famille is an agentic commerce app for the diaspora.

  1. You talk to the agent. "Send my mother Fatoumata in Bamako what she needs for the month: rice, oil, sugar and her blood pressure medicine. Budget \$80." You can write in English or French.
  2. The agent shops for you. It searches the catalog of local Bamako merchants (grocery, market, pharmacy, energy), builds a basket that fits the budget, explains its choices, and shows a basket card with a budget gauge. Some things cannot be bought by an agent, like prescription medicine. In that case it adds a pharmacy voucher, so the family picks up the right medicine with a prescription.
  3. It asks: once or every month? For a one-time basket, the agent creates an itemized PayPal order. For a monthly basket, it creates a PayPal subscription plan priced at the basket total.
  4. You approve with PayPal. The agent never pays on its own. The PayPal checkout appears in the chat and you confirm.
  5. A local partner prepares and delivers. The Bamako partner dashboard lists every paid basket. The partner starts preparing, then confirms delivery by taking a photo with their phone. The delivery is recorded on the PayPal transaction with a tracking number.
  6. You see the proof, and you stay protected. The tracking page shows progress, the delivery photo and a full timeline. If something went wrong, one button triggers a full PayPal refund. A monthly basket can be stopped anytime.

How I built it

  • Next.js 16 (App Router) deployed on Vercel, with Neon Postgres for baskets.
  • AI SDK with Claude as the shopping agent. The agent has a small, deliberate set of tools: search_catalog, propose_basket, create_checkout, start_monthly_basket and PayPal's get_order.
  • PayPal Agent Toolkit powers the PayPal side:
    • Orders v2: create_order builds an itemized order from the basket, pay_order captures it after approval.
    • PayPal JS SDK: the buttons render inside the chat for approval.
    • Shipment Tracking: delivery is recorded on the transaction with the partner's tracking number.
    • Refunds: a full refund on the capture when the sender reports a problem.
    • Subscriptions: a product, a monthly plan, then a subscription for the monthly basket, with status sync and cancellation.
  • AG Grid for the partner dashboard: sortable, filterable baskets with status pills and one-tap actions (start preparing, confirm delivery with a photo).
  • Tailwind CSS with a palette inspired by Malian indigo dyeing and bazin cloth: deep indigo and saffron on clean white.

The most important design decision is the line between the agent and the money. The agent can search, propose and prepare a payment. It cannot approve, capture or refund. Those actions only happen in server routes triggered by a human: the sender approving in PayPal, the partner confirming delivery, the sender asking for a refund. The basket total is also computed on the server from the catalog, never taken from the model, so the agent cannot invent a price or go over budget.

Challenges I ran into

  • PayPal in Mali. PayPal accounts in Mali can pay but cannot easily receive or withdraw money. So I put PayPal where it is strong: on the sender side, in France, the US or Canada. The platform collects the payment and pays the local merchants through mobile money, which is how businesses in Mali are paid today. In the demo this payout is simulated.
  • Tool formats. The Agent Toolkit's AI SDK adapter returns tools in an older format than the AI SDK version I used, so I wrapped each PayPal tool to fit. I also learned that some results are wrapped in an envelope ({status, response}) and had to unwrap them properly. Before that, my first capture showed "Payment failed: success".
  • Keeping the agent honest. A language model is not a calculator, and a basket that is "about \$80" is not good enough when it is someone's money. So the model never sets a price: the server computes every total from the catalog, and propose_basket refuses a basket over budget, which makes the agent adjust and try again.
  • Real network conditions. I built a lot of this on an unstable connection. When a request failed halfway, the conversation history could break on the next message. I made the chat route resilient to that, which also matters for real users on mobile networks in Mali.

Accomplishments that I'm proud of

  • The full loop works end to end in the PayPal sandbox: agent, checkout, capture, preparation, delivery photo, shipment tracking, refund, and monthly subscription.
  • It feels like a complete product, not a proof of concept: a sender page, a tracking page and a partner dashboard that works on a phone, where the partner actually is.
  • The agent is useful and also safe. It never touches the money without a human.

What I learned

  • How to design an agent around clear permissions: what it can prepare versus what only a human can approve.
  • The PayPal developer platform beyond checkout: tracking, refunds and subscriptions all fit together into a complete commerce flow.
  • That a good payment product for Africa often starts by asking where each person already has an account, and meeting them there.

What's next for Panier Famille

  • PayPal webhooks for monthly renewals, so each new billing cycle automatically creates a new basket for the partner.
  • Real merchant payouts by mobile money (Orange Money, Moov Money).
  • A pilot with a few real shops in Bamako, then more cities (Dakar, Abidjan) where the same diaspora problem exists.

Built With

Share this project:

Updates

Submission history