Donor Agent Protocol (DAP) v0.1
An Evidence-First Donation Layer
The Donor Agent Protocol (DAP) is a simple, evidence-first donation layer built on modern web standards. It reuses proven payment protocol models without unnecessary complexity, providing auditable, non-repudiable evidence for every donation while keeping the user experience simple.
Focus of v0.1: A minimal, verifiable foundation for one-time and recurring donations using Verifiable Credentials. No new on-chain assets, mandatory attestations, or complex tax encodings.
The Three Core Objects
DAP is built on exactly three Verifiable Credentials (VCs). These are JSON objects with a cryptographic proof, creating a secure and verifiable chain of evidence for every transaction.
1. DonationIntentMandate (DIM)
The donorβs cryptographically signed authorization to donate. It captures the who, how much, and for what purpose.
Key Fields: recipient.did, amount, privacy, restricted, ttl, mode.
2. DonationPaymentMandate (DPM)
The payment "sidecar" that is consumed by payment processors (like AP2 or legacy rails). It's linked directly to the DIM.
Key Fields: intent_ref (hash of DIM), agent_presence, payment.method.
3. DonationReceipt (DR)
A verifiable receipt issued by the recipient or platform after the donation has settled successfully.
Key Fields: donation_id, recipient.did, gross, net, settled_at.
How It Works: The Donation Flow
The interaction between the donor, platform, and recipient is simple and secure. Each step generates a piece of verifiable evidence.
Quick Start
π¬ Try it in Slack (No Code Required)
The fastest way to experience DAP is through our Slack bot. Simply invite the bot to your workspace and start creating cryptographically-signed donation credentials:
# In any Slack channel:
/donate 50 pseudonymous campaign-1
# Get help:
/donate help
# See available campaigns:
/donate list
What you get: The bot instantly generates and displays three verifiable credentials (DIM, DPM, VP) right in Slack. Perfect for demos, testing, or learning how DAP works without writing any code.
π» Developer Integration
Integrating with DAP is straightforward using the TypeScript SDK. Create and sign mandates with just a few lines of code.
import { DonorAgent, InMemoryVault, Mandates, Validators } from "@gfm/donor-protocol-sdk";
const agent = new DonorAgent({ did: "did:key:zDonorKey", storage: new InMemoryVault() });
// 1. Build and sign the Donor's Intent (DIM)
const dimDraft = Mandates.createDonationIntent({
recipientDid: "did:org:charity-123",
amount: { value: 50, currency: "USD" },
privacy: "anonymous_to_organizer",
restricted: true,
ttl: new Date(Date.now() + 1000*60*60*24*30).toISOString(),
mode: "HUMAN_PRESENT"
});
Validators.assertDIM(dimDraft);
const dim = await agent.signIntent(dimDraft);
// 2. Build and sign the Payment Mandate (DPM)
const dpmDraft = agent.buildPaymentMandate({ intent: dim, paymentMethod: "card" });
Validators.assertDPM(dpmDraft);
const dpm = await agent.signPaymentMandate(dpmDraft);
// 3. Present VCs to the platform
const vp = await agent.present({ audienceDid: "did:web:oa.gfm.org", vcs: [dim, dpm] });
Try DAP in Slack
Experience the Donation Agent Protocol without writing code. Our Slack bot lets you create real, cryptographically-signed credentials with simple commands.
π Slack Bot Features
- β Create DIM/DPM/VP - Generate all three credentials instantly
- β Privacy Controls - Choose public, pseudonymous, or anonymous
- β 8 Mock Campaigns - Test with realistic donation scenarios
- β ES256 Signatures - Real cryptographic signing, not mock data
- β Platform Agnostic - Deploy anywhere (Vercel, AWS, Docker, etc.)
Quick Commands
/donate help
Shows complete interactive guide with all commands, privacy levels, campaigns, and examples.
/donate list
Displays all available campaigns you can donate to with their IDs.
/donate <amount> <privacy> <campaign-id>
Creates a new donation credential. Example: /donate 50 pseudonymous campaign-1
Example Output
When you run /donate 50 pseudonymous campaign-1, you get three cryptographically-signed credentials:
π DIM
Donation Intent Mandate
Your signed consent with amount, privacy level, purpose, and 30-day TTL.
π³ DPM
Donation Payment Mandate
Payment execution object linked to your DIM via hash.
π¦ VP
Verifiable Presentation
Complete credential package with replay protection.
Getting Started
- Deploy the bot - Follow the deployment guide in the
donor-agent-slackbot/folder - Invite to channel - Add the bot to your Slack workspace
- Type
/donate help- See the complete interactive guide - Make your first donation - Try
/donate 10 pseudonymous campaign-1
π‘ Pro Tip: The Slack bot is perfect for demos, workshops, or testing integrations. All credentials are real and follow the DAP v0.1 spec exactlyβthey're just not connected to actual payment processors.
Frequently Asked Questions
Do I need to understand Verifiable Credentials?
No deep dive is required. You can treat DIM, DPM, and DR as simple JSON objects that carry a cryptographic signature.
What's the difference between DIM and DPM?
The DIM represents the donor's intent and consent. The DPM is the short-lived object used for payment execution.
Can this run without AP2?
Yes. The DPM can function as auditable metadata in legacy payment rails (Card, ACH). Mandate hashes can be passed in PSP metadata fields.
How are donor keys managed?
The protocol is designed for device-bound keys via WebAuthn (Passkeys) for human-present signing, ensuring high security and great UX.
Liability & Disputes
When is the Donor liable?
The Donor is liable for any donation made by an agent that acts within the scope of the signed Donation Intent Mandate (DIM), including the specified amount, purpose, and recurrence.
When is the Agent or Platform liable?
The Donor Agent or Platform (the DAP implementor) is liable for any misbehavior, mandate violations, operational errors, or security compromises that lead to an improper donation.
What is the Organizer/Recipient's liability?
The Organizer or Recipient is liable for the non-delivery of promised goods/services or the misuse of funds. The Donation Receipt (DR) serves as cryptographic evidence of their receiving the donation.
How does this affect Payment Processors (PSPs)?
PSPs and issuers still hold their normal fraud and chargeback risk. However, they gain the right to reject invalid or out-of-scope mandates, which significantly reduces their uncertainty.
What is the main benefit of this liability model?
The key benefit is a clear, signed audit trail (DIM β DPM β DR). This moves accountability earlier in the flow to the Donor and Agent, clarifying proof of authority for all parties before settlement.