> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digitalreceiptprotocol.org/llms.txt
> Use this file to discover all available pages before exploring further.

# How It Works

> A simple walkthrough of how DRP works in everyday transactions

## A Real Transaction

### Meet Sarah

Sarah is grabbing coffee before work. She's about to experience DRP without even realizing it—the entire process happens automatically in seconds.

***

<Steps>
  <Step title="Sarah Orders Coffee">
    Sarah orders her usual latte at Coffee Shop downtown. Total: \$4.20

    **What happens:**

    * She taps her credit card to pay
    * The payment processes normally through her bank (Chase)
    * She doesn't need to do anything special
  </Step>

  <Step title="Receipt Gets Created">
    The coffee shop's point-of-sale system automatically creates a detailed receipt

    **What's included:**

    * Coffee Shop name and address
    * Date and time: December 15, 2025 at 8:47 AM
    * Items: 1 Latte (\$4.20)
    * Payment method: Visa ending in 1234

    **The magic:** This receipt gets cryptographically signed by Coffee Shop, like a tamper-proof seal that proves it's authentic and hasn't been altered.
  </Step>

  <Step title="Receipt Gets Encrypted">
    Before sending the receipt anywhere, it gets encrypted specifically for Sarah

    **How it works:**

    * When Sarah first got her Chase banking app, it created a special "lock" (public key) just for her
    * Coffee Shop uses Sarah's lock to encrypt the receipt
    * Only Sarah has the "key" (private key) to unlock and read it
    * Even Coffee Shop can't read the encrypted version
    * Her bank can't read it either
    * Nobody can—except Sarah
  </Step>

  <Step title="Receipt Travels Securely">
    The encrypted receipt gets sent to Chase through secure channels

    **The journey:**

    * Coffee Shop → DRP Network → Chase Bank → Sarah's Banking App
    * The receipt stays encrypted the entire journey
    * Chase adds their own signature confirming the transaction happened
    * This dual signature (Coffee Shop + Chase) prevents fraud
  </Step>

  <Step title="Sarah Sees Her Receipt">
    Sarah opens her Chase banking app during her commute

    **What she sees:**

    * "Coffee Shop - \$4.20" in her recent transactions
    * She taps to view details
    * Her phone automatically decrypts the receipt using her private key (stored securely in her iPhone's secure chip)
    * She sees the full itemized receipt: 1 Latte, \$4.20
    * The receipt is verified authentic by both Coffee Shop and Chase signatures
  </Step>
</Steps>

***

## What Makes This Special?

### True Ownership

Sarah's receipt isn't stored on Coffee Shop's server or Chase's database where they control it. The encrypted receipt lives in her banking app, and **only she has the key to read it**.

<Info>
  Think of it like a safety deposit box. The bank holds the box, but only you have the key. Without your key, the contents are useless to anyone else.
</Info>

### Forever Accessible

* **If Sarah switches banks:** She can export her encrypted receipts and import them into her new banking app
* **If Coffee Shop closes:** She still has the verified, signed receipt
* **For expense reports:** She can share specific receipts with her employer without giving them access to everything
* **For returns:** She has undeniable proof of purchase

### Fraud Protection

Because both Coffee Shop and Chase cryptographically signed the receipt:

* **Can't be forged:** Any tampering breaks the signatures
* **Can't be disputed:** Both parties verified the transaction
* **Can't be altered:** The encryption is tamper-proof

***

## Behind the Scenes (Simple Version)

Here's what happens technically, explained without jargon:

<AccordionGroup>
  <Accordion title="How does encryption protect Sarah's privacy?">
    When Sarah's banking app was first installed, it generated two keys:

    **Private key (the "unlock key"):**

    * Stays on Sarah's phone forever
    * Stored in her iPhone's secure chip (Secure Enclave) or Android's secure storage (KeyStore)
    * Never transmitted anywhere
    * Only Sarah's phone can use it

    **Public key (the "lock"):**

    * Shared with merchants and her bank
    * Used to encrypt receipts specifically for Sarah
    * Useless without Sarah's private key

    It's like Sarah gave everyone a special lock that only her personal key can unlock. They can lock boxes for her, but only she can open them.
  </Accordion>

  <Accordion title="What if Sarah loses her phone?">
    Two scenarios:

    **If she backs up her banking app:**

    * Her new phone restores the private key from secure backup
    * All her old receipts are accessible again

    **If she doesn't have backup:**

    * Old receipts can't be decrypted (by design—this is the security tradeoff)
    * Her bank generates a new key pair for future receipts
    * She starts fresh with new receipts going forward

    Most banking apps handle this automatically with secure cloud backup.
  </Accordion>

  <Accordion title="How fast does this happen?">
    **Real-time.** The entire process—from payment to encrypted receipt in Sarah's app—takes less than 2 seconds. She doesn't wait. She doesn't do anything special. It just works.
  </Accordion>

  <Accordion title="Does this cost Sarah anything?">
    **No.** DRP is open-source infrastructure, like HTTP (the technology that powers websites). There are no fees, no subscriptions, no charges. Her bank includes it as part of their normal banking app features.
  </Accordion>

  <Accordion title="What if Coffee Shop or Chase makes a mistake in the receipt?">
    Because receipts are signed by both parties:

    * If the amounts don't match, Sarah sees a warning
    * If Coffee Shop's signature is invalid, her app flags it
    * If Chase's confirmation doesn't match, it shows as unverified

    This dual-signature system catches errors and prevents fraud automatically.
  </Accordion>
</AccordionGroup>

***

## Common Use Cases

### Expense Reports (Corporate Users)

**Before DRP:**

1. Save paper receipt
2. Photograph it later
3. Manually enter details into expense system
4. Attach photo
5. Wait for approval
6. Re-submit if receipt is unclear

**With DRP:**

1. Transaction happens
2. Encrypted receipt appears in banking app
3. One tap shares receipt with expense system
4. All details pre-filled (merchant, amount, items, date)
5. Approved automatically if within policy
6. Done in seconds

### Returns & Warranties

**Before DRP:**

* "Do you have your receipt?"
* Sarah searches through emails, crumpled papers, or tries to remember which card she used
* Often can't find it
* Store gives store credit instead of refund

**With DRP:**

* Opens banking app
* Searches "Coffee Shop December"
* Shows encrypted, verified receipt on her phone
* Instant refund because receipt can't be forged

### Budgeting & Financial Planning

**Before DRP:**

* Bank shows: "Coffee Shop - \$4.20"
* Sarah doesn't remember what she bought

**With DRP:**

* Bank shows: "Coffee Shop - \$4.20"
* Tap for details: 1 Latte
* Sarah realizes she's spending \$21/week on coffee
* Automatic categorization: "Food & Drink → Coffee"
* Budget tracking with actual items purchased

***

## Privacy Protections

<CardGroup cols={2}>
  <Card title="Merchants Can't See Other Receipts" icon="store">
    Coffee Shop can only send Sarah receipts for transactions she made with them. They can't see her receipts from other merchants.
  </Card>

  <Card title="Banks Can't Read Content" icon="building-columns">
    Chase can see she spent \$4.20 at Coffee Shop (they already know this from the payment). But they can't decrypt and read the itemized receipt without Sarah's private key.
  </Card>

  <Card title="No Third-Party Storage" icon="server">
    Receipts aren't stored on external servers. They're in Sarah's banking app, encrypted. No company database has readable copies.
  </Card>

  <Card title="Selective Sharing" icon="share-nodes">
    Sarah can share specific receipts (like for expense reports) without giving access to her entire transaction history.
  </Card>
</CardGroup>

***

## What Sarah Experiences

### Day-to-Day

* **Nothing changes** in how she pays for things
* **No extra steps** at checkout
* **No apps to manage** beyond her normal banking app
* Receipts just appear automatically, encrypted and verified

### When She Needs a Receipt

* **Opens banking app** instead of digging through email or paper
* **Finds it instantly** with search
* **Shares easily** for returns, expenses, or disputes
* **100% confident it's authentic** because of cryptographic signatures

### Peace of Mind

* Her transaction history is **truly hers**
* **Portable** between banks if she switches
* **Private** by default with encryption
* **Verified** by both merchant and bank signatures

***

## Next Steps

<CardGroup cols={2}>
  <Card title="For Consumers" icon="user" href="/essentials/end-user">
    Learn how to use DRP-enabled banking apps and manage your receipts
  </Card>

  <Card title="For Banks" icon="building-columns" href="/essentials/card-issuers">
    See how to integrate DRP into your banking app
  </Card>

  <Card title="For Merchants" icon="shopping-cart" href="/essentials/merchants">
    Discover how DRP reduces chargebacks and builds customer loyalty
  </Card>

  <Card title="Try the Demo" icon="flask" href="/demo/overview">
    Experience DRP in action with our interactive demo
  </Card>
</CardGroup>
