DaffodilAPI
Checkout sessions

Create a Checkout Session

Creates a single-use Daffodil Checkout page for a Fund or a Campaign and returns its url. Redirect the payer there, or frame it from an origin your Account registered. The session expires after 24 hours if unpaid. With a donor_id, the Donor pays into a Fund they advise; any other donor_id is refused with 409 donor_not_advisor. Without one, the payer is a Public contributor: the page asks for their legal name, email, and billing address, lets them stay anonymous and leave a message, and takes card, ACH, or a wallet such as Apple Pay or Google Pay. A Campaign session pays into the Campaign’s Fund and needs a live Campaign that has not ended. A Public contributor can pay into a Personal fund, directly or through its Campaign, only when your Account has Personal fund campaigns (403 personal_fund_campaigns_not_enabled otherwise). The sponsor emails a Public contributor their receipt once the Contribution succeeds.

POST
/v1/checkout_sessions
AuthorizationBearer <token>

Your secret API key: dfl_live_… in production, dfl_test_… in the Sandbox.

In: header

Header Parameters

idempotency-keystring

Required on every write. A unique value you generate per intended write, such as a UUID. A retry with the same key and the same body returns the original response; the same key with a different body returns 422 idempotency_key_reused. Keys are kept for 24 hours, per Account and environment.

Length1 <= length <= 255
fund_id?string

The Fund to pay into. Send this or campaign_id.

Match^fund_[0-9A-Za-z]{22}$
campaign_id?string

The Campaign to give to; the money goes into its Fund. Send this or fund_id.

Match^camp_[0-9A-Za-z]{22}$
donor_id?string

The paying Donor, who must advise the Fund: an Advisor of the Personal Fund, or a Shared Fund member with the advise permission. The Contribution and its receipt are theirs. Omit when the payer is a Public contributor.

Match^donor_[0-9A-Za-z]{22}$
amount?integer

A fixed amount. Omit to let the payer choose. Integer cents, greater than zero.

Range0 < value
currency?Currency
prefill?object

Details to fill in for the payer. They can change them.

success_urlstring

Where the payer goes after paying. Must be https. Plain http is accepted only for localhost and 127.0.0.1, and never in the Sandbox or production.

Formaturi
Lengthlength <= 2048
cancel_url?string

Where the payer goes if they leave without paying. Must be https. Plain http is accepted only for localhost and 127.0.0.1, and never in the Sandbox or production.

Formaturi
Lengthlength <= 2048
client_reference_id?string

Your own reference for the intent behind this payment. Returned on the Contribution and its Events.

Length1 <= length <= 200
metadata?Metadata

Up to 50 key-value pairs of your own. Keys up to 40 characters, values up to 500. Returned unchanged on the Contribution and its Events.

Propertiesproperties <= 50

Empty Object

fee_coverage?FeeCoverage

Whether the payer covers processing fees: optional lets them choose, required adds the fees, none never asks.

Value in"optional" | "required" | "none"
impact_tip?boolean

Offer Daffodil’s impact tip on this session. Defaults to your Account’s setting.

Response Body

curl -X POST "https://sandbox.api.getdaffodil.com/v1/checkout_sessions" \  -H "idempotency-key: 8e03978e-40d5-43e8-bc93-6894a57f9324" \  -H "Content-Type: application/json" \  -d '{    "fund_id": "fund_2JqSDJkaCfO4pnMMD5na5G",    "donor_id": "donor_0uwRQyfMSvamIzgNByaoYN",    "amount": 25000,    "currency": "USD",    "prefill": {      "name": "Jane Doe",      "email": "jane@example.com"    },    "success_url": "https://app.example.com/give/thanks",    "cancel_url": "https://app.example.com/give",    "client_reference_id": "ac_ref_7731",    "metadata": {      "member_tier": "gold"    }  }'
{
  "id": "cs_5vl0KYPG4EdFiuWW0Ypu0Z",
  "url": "https://mission.mydaffodil.app/checkout/cs_5vl0KYPG4EdFiuWW0Ypu0Z",
  "status": "open",
  "fund_id": "fund_2JqSDJkaCfO4pnMMD5na5G",
  "campaign_id": null,
  "donor_id": "donor_0uwRQyfMSvamIzgNByaoYN",
  "amount": 25000,
  "currency": "USD",
  "fee_coverage": "optional",
  "impact_tip": false,
  "success_url": "https://app.example.com/give/thanks",
  "cancel_url": "https://app.example.com/give",
  "client_reference_id": "ac_ref_7731",
  "metadata": {
    "member_tier": "gold"
  },
  "contribution_id": null,
  "expires_at": "2026-11-12T21:42:00Z",
  "created_at": "2026-11-11T21:42:00Z"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "param": "string",
  "request_id": "string"
}