Escrow Safe Trade is live: protect your next high-value deal Learn more
Products Payment links & checkoutM-Pesa, cards, invoices, split payoutsEscrow Safe TradeMilestone and release-based escrowWallets & P2PPersonal and business walletsChama, Lengo & DeniGroup savings, goals and IOUsBusiness toolkitAccounting, payroll, POS, ticketingBulk payments & payrollPay many people in one uploadSubscriptions & billingRecurring plans and renewalsRent, loans & donationsCollections and campaignsAll products
Solutions MerchantsBuyersChama groupsBusiness solutionsIndustries
Pricing
Developers Developer overviewQuickstart, auth and sandboxREST APIsCheckout, invoices and requestsWebhooksSigned, real-time eventsWallet-as-a-ServiceVirtual sub-accountsDocumentationGuides and API reference
Security
Company About usCareersPartnersEvents & ticketsBlogHelp centreContact us
Log in Get started Talk to sales
Accept payments

Donations

Fundraising campaigns with a public donate page that accept M-Pesa, wallet and card gifts.

Base URLhttps://api.paysasa.com/api/v1Authx-api-keyFormatJSON

First-class fundraising for verified businesses. Create campaigns with a public donate page, collect gifts over M-Pesa STK, wallet, or PayBill (DN-XXXXX), and issue sequential receipts. Requires the Donations module and donations_enabled on the business. Authenticate with a business API key, or a signed-in session plus business_id.

Endpoint Description
GET /donations/campaigns List campaigns
POST /donations/campaigns Create draft campaign (purpose + beneficiary required)
PATCH /donations/campaigns/:id Update campaign; set status to active|paused|closed
GET /donations/gifts List gifts (optional campaign_id, q)
GET /donations/campaigns/:id/export CSV export of gifts/receipts
GET /donations/public/:slug Public campaign payload
POST /donations/public/:slug Wallet pay (signed-in donor)
POST /donations/public/:slug/mpesa-checkout Create M-Pesa STK checkout session
Shell
const res = await fetch("https://api.paysasa.com/api/v1/donations/campaigns", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "apk_live_…",
},
body: JSON.stringify({
business_id: "biz_…",
title: "Community Fundraiser",
purpose: "School fees support",
beneficiary_name: "Acme Foundation",
amount_mode: "open",
min_amount: 10000,
}),
});
const { campaign } = await res.json();
// Public page: /donate/{campaign.slug}
// PayBill BillRef: campaign.public_reference (DN-XXXXX)

Buy Me a Coffee tips use Payment Links with link_purpose=buy_me_coffee (not this Donations API).