DaffodilAPI
Sandbox

Fail a pending Contribution

Makes a pending Contribution fail, as if its payment bounced: after a 2–15 second delay it becomes failed and contribution.failed is sent. Its Fund is never credited. Answers at once with the Contribution, still pending. A card or ACH Contribution settles by itself 2–15 seconds after it is created; this request replaces that outcome when it arrives first. Refused with 409 contribution_not_pending when it is not pending. Sandbox only: exists on sandbox.api.getdaffodil.com and answers 404 not_found everywhere else.

POST
/v1/sandbox/contributions/{id}/fail
AuthorizationBearer <token>

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

In: header

Path Parameters

idstring
Match^contrib_[0-9A-Za-z]{22}$

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

Response Body

curl -X POST "https://sandbox.api.getdaffodil.com/v1/sandbox/contributions/contrib_4jV68U95QzmwbX04gqFKu5/fail" \  -H "idempotency-key: 8e03978e-40d5-43e8-bc93-6894a57f9324"
{
  "id": "contrib_4jV68U95QzmwbX04gqFKu5",
  "fund_id": "fund_2JqSDJkaCfO4pnMMD5na5G",
  "campaign_id": null,
  "checkout_session_id": "cs_5vl0KYPG4EdFiuWW0Ypu0Z",
  "source": "card",
  "source_fund_id": null,
  "status": "succeeded",
  "amount": 25000,
  "currency": "USD",
  "contributor": {
    "type": "donor",
    "donor_id": "donor_0uwRQyfMSvamIzgNByaoYN",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "address": null
  },
  "is_anonymous": false,
  "message": null,
  "client_reference_id": "ac_ref_7731",
  "metadata": {
    "member_tier": "gold"
  },
  "receipt_url": "https://mission.mydaffodil.app/pub/receipts/eyJvIjoi.Hq3xY9",
  "created_at": "2026-11-11T21:42:00Z",
  "succeeded_at": "2026-11-13T15:05: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"
}