# Digital Receipt Protocol ## Docs - [API Reference](https://docs.digitalreceiptprotocol.org/api-reference/introduction.md): The DRP API enables secure, encrypted receipt transmission between merchants, card issuers, and end users. All APIs use RESTful principles with JSON payloads and industry-standard authentication. - [Grant Decrypt Access](https://docs.digitalreceiptprotocol.org/api-reference/keys/grant-access.md): Issue a short-lived access token (2-3 minutes) for receipt decryption. The source IP is logged for audit purposes. Maximum 5 active tokens per user. - [Generate Key Pair](https://docs.digitalreceiptprotocol.org/api-reference/onboarding/generate-keys.md): Generate an RSA-2048 key pair for a new user. The private key should be securely stored by the client and never transmitted again after this response. - [Register User](https://docs.digitalreceiptprotocol.org/api-reference/onboarding/register.md): Register a new user with their hashed PAN and public key. The hashed PAN is a unique identifier derived from the user's Primary Account Number. The public key must be from a previously generated key pair. - [Create Payment](https://docs.digitalreceiptprotocol.org/api-reference/payments/create.md): Create a payment (Stripe/Square) with encrypted receipt metadata. This endpoint encrypts the receipt, creates a payment intent/order on the gateway, and attaches DRP metadata for later retrieval. - [Decrypt Receipt](https://docs.digitalreceiptprotocol.org/api-reference/payments/decrypt.md): Decrypt a receipt by looking up the payment transaction on the gateway (Stripe/Square). Requires a valid access token and the user's private key. - [Encrypt Receipt](https://docs.digitalreceiptprotocol.org/api-reference/receipts/encrypt.md): Encrypt a digital receipt for a specific recipient using hybrid encryption: - AES-256-GCM for the receipt data (symmetric) - RSA-OAEP-SHA256 for key wrapping (asymmetric) If the recipient is not onboarded, the receipt will be encrypted with the escrow key instead (indicated by `isEscrowed: true` in the response). - [Sequence Diagram](https://docs.digitalreceiptprotocol.org/api-reference/sequence-diagram.md): The full flow of DRP, from payment intent, to viewing the receipt in your card issuer app. - [Technical Flow](https://docs.digitalreceiptprotocol.org/api-reference/technical-flow.md): Step-by-step API integration guide with request/response examples. Copy values from each response to use in subsequent steps. - [Interactive Demo](https://docs.digitalreceiptprotocol.org/demo/overview.md): Experience encrypted receipts in a simulated banking app - [Card Issuers](https://docs.digitalreceiptprotocol.org/essentials/card-issuers.md): Integrate DRP to cut chargeback costs 16-23%, differentiate your corporate card offering, and provide customers cryptographic receipt ownership without operational overhead. - [End Users](https://docs.digitalreceiptprotocol.org/essentials/end-user.md): Take true ownership of your digital receipts with cryptographic security. Access itemized transaction history across all your cards without merchant silos or privacy compromises. - [Merchants](https://docs.digitalreceiptprotocol.org/essentials/merchants.md): Send cryptographically signed digital receipts that prevent chargebacks, streamline returns, and keep customers coming back. Free, open-source integration for any POS system. - [POS Systems](https://docs.digitalreceiptprotocol.org/essentials/pos-systems.md): Integrate DRP once, enable all your merchants to send encrypted receipts to customer banking apps. Differentiate your POS system and increase merchant retention. - [How It Works](https://docs.digitalreceiptprotocol.org/how-it-works.md): A simple walkthrough of how DRP works in everyday transactions - [Digital Receipt Protocol (DRP)](https://docs.digitalreceiptprotocol.org/index.md): An open, consent-driven standard for encrypted, portable, and verifiable digital receipts. Built for banks, merchants, and POS providers. - [POS Plugins](https://docs.digitalreceiptprotocol.org/pos-plugins/overview.md): Ready-to-use DRP plugins for popular POS systems - [Square Plugin](https://docs.digitalreceiptprotocol.org/pos-plugins/square.md): Install DRP on Square POS, Square Register, and Square Terminal - [Quick Start Guide](https://docs.digitalreceiptprotocol.org/quickstart.md): Get started with DRP integration in minutes - [Integration Examples](https://docs.digitalreceiptprotocol.org/sdks/examples.md): Complete code examples for integrating with the Digital Receipt Protocol API - [Go SDK](https://docs.digitalreceiptprotocol.org/sdks/go.md): Official Go SDK for high-performance backends and microservices - [JavaScript/Node.js SDK](https://docs.digitalreceiptprotocol.org/sdks/javascript.md): Official JavaScript SDK for Node.js, browsers, and React Native - [SDKs & Libraries](https://docs.digitalreceiptprotocol.org/sdks/overview.md): Official SDKs and libraries for integrating with the Digital Receipt Protocol - [Python SDK](https://docs.digitalreceiptprotocol.org/sdks/python.md): Official Python SDK for Django, Flask, FastAPI, and Python-based applications ## Optional - [Official Site](https://www.digitalreceiptprotocol.org) - [GitHub](https://github.com/digitalreceiptprotocol)