Inspiration

Cross-border trade is built on trust, but misunderstandings can arise long before a payment is made.

A buyer might assume shipping is included, expect a different delivery date, request an unapproved discount or interpret a quotation in another currency. For small businesses, these disagreements can lead to delays, disputes and financial losses.

We built TradeTrust AI around a simple idea:

What if merchants could detect and resolve commercial disagreements before committing to an invoice or payment?

Our guiding principle is Clarity Before Commitment.

What it does

TradeTrust AI is an AI-assisted commercial review prototype designed for cross-border small and medium-sized businesses.

It combines an interactive buyer experience with protected merchant-side workflows.

1. Buyer enquiry and quotation

Buyers can adjust quantities, shipping options and requested discounts, then generate an illustrative quotation.

2. Commercial disagreement detection

The application compares buyer expectations against quoted terms and identifies differences involving:

  • Currency and quantity
  • Subtotal and pricing
  • Shipping responsibility
  • Delivery expectations
  • Requested discounts

Each review helps explain what needs clarification before the transaction proceeds.

3. Authenticated merchant review

Protected local merchant records demonstrate how an approved USD 109 quotation can be evaluated against a buyer's changing expectations.

The recorded demonstration includes reviews identifying three and six items requiring attention, with approval blocked when significant disagreements remain.

4. Controlled AI advisory preparation

The application prepares authorized commercial context for AI-assisted review while preserving authentication and access-control boundaries.

Cloudflare Workers AI inference has also been verified separately.

5. PayPal Sandbox integration

The prototype includes guarded PayPal Sandbox draft-invoice functionality. A USD 109 sandbox invoice draft was created and verified separately.

The public demonstration uses sample data and simulated decisions. It does not represent a completed PayPal payment or claim that the AI and PayPal verification steps occurred in one connected transaction.

How we built it

Frontend: React, TypeScript, Vite and custom CSS.

Backend: Cloudflare Workers with protected API routes.

Database: Cloudflare D1 for structured commercial records and local demonstration workflows.

AI: Cloudflare Workers AI, including a separately verified inference capability and controlled advisory-context preparation.

Payments: PayPal Sandbox and invoice API integration with authorization safeguards.

We designed the application to separate sample interactions, authenticated merchant operations and external payment-provider actions.

Challenges we encountered

The biggest challenge was preserving merchant control while introducing automation into a payment-related workflow.

We addressed risks involving commercial-term inconsistencies, unauthorized approvals, authentication, AI context boundaries and the separation of invoice preparation from payment execution.

Another challenge was producing a demonstration that accurately distinguished simulated workflows from separately verified provider integrations.

Accomplishments

  • Built an interactive quotation and commercial-review interface.
  • Implemented multiple disagreement scenarios with explainable findings.
  • Demonstrated authenticated merchant records and protected D1-backed reviews.
  • Implemented safeguards that block approval when unresolved discrepancies require attention.
  • Developed controlled AI advisory-context preparation.
  • Verified Workers AI inference and PayPal Sandbox draft-invoice operations separately.
  • Published an open-source repository with setup and demonstration documentation.

What we learned

AI should help merchants understand risks, not silently make financial commitments for them.

In cross-border commerce, resolving a disagreement before invoicing can be just as important as simplifying payment itself.

What's next

Our next goals are to connect authenticated commercial reviews more directly with authorized PayPal invoice preparation, extend multilingual AI-assisted clarification, improve end-to-end demonstration reproducibility and expand support for international SME trade workflows.

Source and demonstration

GitHub: https://github.com/khubaanscyberlabs/tradetrust-ai

Video: https://youtu.be/fW-h9LAEjR0

The repository provides the public sample workflow and setup instructions. Protected merchant functionality requires separate local configuration.

Built With

Share this project:

Updates

Submission history