Work safely with donors, households, contributions, giving batches, and settlements.
Grain’s giving API is a connected resource graph:
donor ── member of ──> household │ └── contribution ──> giving batch ──> settlement │ │ └── fund └── bank and accounting status (read-only)
Lists include compact, one-level summaries. Fetch large related collections through their own paginated endpoints with donorId, householdRef, givingBatchId, or settlementId filters instead of expecting nested unbounded data.
Map your giving funds
Call GET /api/v1/funds to populate a fund dropdown. Each result contains the Grain fund id and display name; store the selected id in your integration and send it as fundId when creating contributions.
The list includes all active, assignable funds in the authenticated church, ordered by name, with no pagination. Inactive funds and summary funds that contain subfunds are excluded. A church with no assignable funds receives { "funds": [] }.Enable funds:read on your organization API key or Grain-managed OAuth app. For OAuth, add this scope to the app’s registered scopes and have users consent again; the signed-in user must have View funds permission. Send the OAuth access token as the bearer credential and include X-Organization-Id on the request. Existing keys and grants do not gain this scope automatically; create a replacement API key with fund access if needed.
Retry contribution creates safely
Send an Idempotency-Key header with POST /api/v1/contributions. Choose a stable key for each gift row, such as og-gift-38217-general, and reuse it if a request times out or the connection drops.
The first successful create and subsequent retries return 201 with the same contribution ID. Concurrent retries create one contribution.
Reusing a key with different validated data returns 409 Conflict. Use PATCH to edit the original gift, or a new key for a separate gift.
If the original contribution was deleted, its key returns 409; a retry cannot recreate it.
Keys accept 1–200 non-space ASCII characters and remain reserved for the lifetime of the organization. Keep keys free of personal information.
Keys are scoped to the organization and credential: the OAuth application, organization API key, or unmanaged OAuth user. OAuth token refresh preserves the namespace; replacing an API key starts a separate namespace.
Authentication, permissions, and input validation apply to retries. A replay returns the contribution’s current representation, including subsequent edits, with current identity-masking permissions.
Validation failures do not reserve the key. Correct the input and retry.
The header is optional for compatibility. An externalId alone does not prevent duplicates: split gifts can legitimately share it. Use a different idempotency key for each split row, and reuse that row’s key for retries. Before replaying older imports that did not use a key, reconcile your saved Grain contribution IDs; adding a key does not deduplicate an earlier unkeyed request.
Who owns the totals?
Contribution amounts, processing fees, and stored net amounts are the source for a giving batch. Grain recalculates batch gross, absolute fees, net, fund splits, and distinct gift count whenever membership or money changes.
Settlement recordedTotals are provider or client-owned values and remain independently editable.
Settlement linkedContributionTotals are calculated from current linked contributions. Compare the two objects to identify import or membership differences.
Dates such as contribution date, batch date, and estimated arrival date are calendar days. Grain returns existing v1 date fields as UTC ISO strings, with calendar days represented at UTC midnight. Audit timestamps such as createdAt, updatedAt, and committedAt are real instants.
Create a manual batch
If givingIntegrationId and externalBatchId are omitted, Grain uses its non-syncing manual giving integration and generates an external ID. Empty open batches are valid.
contributionIds replaces batch membership atomically. A contribution already owned by another batch produces 409 Conflict; move it explicitly with PATCH /api/v1/contributions/{id} before the bulk membership write.
Link a whole batch to a settlement
Settlement writes accept both individual contributionIds and whole givingBatchIds. Attaching a batch also attaches all of its contributions in the same transaction.
All donors, funds, merchants, integrations, contributions, batches, and settlements referenced by a write must belong to the authenticated organization. Partial-batch or conflicting settlement ownership returns 409 without applying a partial change.
Accounting freeze behavior
CRUD never posts a journal entry, links a bank transaction, or reconciles a settlement. MATCHED, RECONCILED, and batch SETTLED are accounting-owned states and cannot be created through ordinary API edits.Unfrozen contributions, batches, and settlements can be edited, moved, or deleted. Once a resource is posted, cleared, bank-linked, or otherwise accounting-frozen, conflicting writes return 409 Conflict. Deleting an unfrozen batch or settlement unlinks and preserves its contributions; deleting a contribution recalculates its former batch.
Household members
Use the member routes to keep current membership, position, and primary contact consistent:
POST /api/v1/households/{id}/members
PATCH /api/v1/households/{id}/members/{donorId}
DELETE /api/v1/households/{id}/members/{donorId}
Moving a donor refreshes both affected household aggregates. Send null in donor or household PATCH requests to clear documented nullable fields.
Give integrations separate contributions, batches, and settlements
scopes. Write scopes imply read, but they do not grant journal-posting
permission.
Last modified on September 15, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Grain API","description":"Developer documentation for the Grain church accounting and donor management API.","colors":{"primary":"#03440c","light":"#4A806C","dark":"#3D6B5E"},"logo":{"light":"https://mintcdn.com/grainledger/Jxl-ZANCEY95i3PU/images/grain-wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=Jxl-ZANCEY95i3PU\u0026q=85\u0026s=47f8188964661273a33f4901a311ba81","dark":"https://mintcdn.com/grainledger/Jxl-ZANCEY95i3PU/images/grain-wordmark-on-dark.svg?fit=max\u0026auto=format\u0026n=Jxl-ZANCEY95i3PU\u0026q=85\u0026s=b4689fb4f3c2b42f5e3e251f39b0bf76"},"favicon":"https://mintcdn.com/grainledger/Jxl-ZANCEY95i3PU/images/grain-logomark.svg?fit=max\u0026auto=format\u0026n=Jxl-ZANCEY95i3PU\u0026q=85\u0026s=e53c14afdfadd5aa05ef57a0c8f68985","api":{"openapi":["openapi.json"],"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","javascript","python"],"prefill":true,"autogenerate":true},"url":"full"},"search":{"prompt":"Search Grain API docs..."},"seo":{"metatags":{"og:site_name":"Grain API Docs","og:image":"https://grainledger.com/og-image.jpg?v=wheat-field-20260908","og:image:width":"1200","og:image:height":"630","twitter:card":"summary_large_image","twitter:image":"https://grainledger.com/og-image.jpg?v=wheat-field-20260908"},"indexing":"navigable"},"fonts":{"heading":{"family":"DM Sans","weight":600},"body":{"family":"DM Sans","weight":400}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"integrations":{"posthog":{"apiKey":"phc_nev4txvApsir3qS4dQB5T7JvI46Zl0ZXSQHXpgo6IhD","apiHost":"https://us.i.posthog.com","sessionRecording":false}},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"Open app","icon":"https://mintlify.s3.us-west-1.amazonaws.com/grainledger/images/grain-logomark.svg","href":"https://app.grainledger.com"},{"anchor":"Support","icon":"circle-question","href":"https://grainledger.com/support"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"grainledger","hasAudioNarration":false,"actualSubdomain":"grainledger","customDomains":["docs.grainledger.com"],"gitSource":{"type":"github","owner":"grain-ledger","repo":"grain","deployBranch":"main","contentDirectory":"api-docs","isPrivate":true,"mountPath":"","label":"","_id":"6af23ed0ed34cff0851c7334"},"entitlements":{},"buildId":"6aca5e6adf7fb4ef9ef2ce28","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":59},{"language":"default","tag":"Transactions","count":14},{"language":"default","tag":"Getting Started","count":10},{"language":"default","tag":"Households","count":8},{"language":"default","tag":"Core concepts","count":7},{"language":"default","tag":"Bills","count":5},{"language":"default","tag":"Contributions","count":5},{"language":"default","tag":"Donors","count":5},{"language":"default","tag":"Giving Batches","count":5},{"language":"default","tag":"Pledges","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"giving","slug":"/giving","pageMetadata":{"title":"Giving resources","description":"Work safely with donors, households, contributions, giving batches, and settlements.","icon":"hand-holding-heart","href":"/giving"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Work safely with donors, households, contributions, giving batches, and settlements.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Grain’s giving API is a connected resource graph:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`donor ── member of ──> household`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── contribution ──> giving batch ──> settlement`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── fund └── bank and accounting status (read-only)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Lists include compact, one-level summaries. Fetch large related collections through their own paginated endpoints with `,_jsx(_components.code,{children:`donorId`}),`, `,_jsx(_components.code,{children:`householdRef`}),`, `,_jsx(_components.code,{children:`givingBatchId`}),`, or `,_jsx(_components.code,{children:`settlementId`}),` filters instead of expecting nested unbounded data.`]}),`\n`,_jsx(Heading,{level:`2`,id:`map-your-giving-funds`,children:`Map your giving funds`}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`GET /api/v1/funds`}),` to populate a fund dropdown. Each result contains the Grain fund `,_jsx(_components.code,{children:`id`}),` and display `,_jsx(_components.code,{children:`name`}),`; store the selected `,_jsx(_components.code,{children:`id`}),` in your integration and send it as `,_jsx(_components.code,{children:`fundId`}),` when creating contributions.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.grainledger.com/api/v1/funds\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$GRAIN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"funds\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"cm789ghi012jkl\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"General Fund\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The list includes all active, assignable funds in the authenticated church, ordered by name, with no pagination. Inactive funds and summary funds that contain subfunds are excluded. A church with no assignable funds receives `,_jsx(_components.code,{children:`{ \"funds\": [] }`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Enable `,_jsx(_components.code,{children:`funds:read`}),` on your organization API key or Grain-managed OAuth app. For OAuth, add this scope to the app’s registered scopes and have users consent again; the signed-in user must have `,_jsx(_components.strong,{children:`View funds`}),` permission. Send the OAuth access token as the bearer credential and include `,_jsx(_components.code,{children:`X-Organization-Id`}),` on the request. Existing keys and grants do not gain this scope automatically; create a replacement API key with fund access if needed.`]}),`\n`,_jsx(Heading,{level:`2`,id:`retry-contribution-creates-safely`,children:`Retry contribution creates safely`}),`\n`,_jsxs(_components.p,{children:[`Send an `,_jsx(_components.code,{children:`Idempotency-Key`}),` header with `,_jsx(_components.code,{children:`POST /api/v1/contributions`}),`. Choose a stable key for each gift row, such as `,_jsx(_components.code,{children:`og-gift-38217-general`}),`, and reuse it if a request times out or the connection drops.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.grainledger.com/api/v1/contributions\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$GRAIN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Idempotency-Key: og-gift-38217-general\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --data`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{\"amount\":3.33,\"date\":\"2026-09-07\",\"fundId\":\"YOUR_FUND_ID\",\"method\":\"ONLINE\",\"externalSource\":\"OTHER\",\"externalId\":\"og-gift-38217\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The first successful create and subsequent retries return `,_jsx(_components.code,{children:`201`}),` with the same contribution ID. Concurrent retries create one contribution.`]}),`\n`,_jsxs(_components.li,{children:[`Reusing a key with different validated data returns `,_jsx(_components.code,{children:`409 Conflict`}),`. Use PATCH to edit the original gift, or a new key for a separate gift.`]}),`\n`,_jsxs(_components.li,{children:[`If the original contribution was deleted, its key returns `,_jsx(_components.code,{children:`409`}),`; a retry cannot recreate it.`]}),`\n`,_jsx(_components.li,{children:`Keys accept 1–200 non-space ASCII characters and remain reserved for the lifetime of the organization. Keep keys free of personal information.`}),`\n`,_jsx(_components.li,{children:`Keys are scoped to the organization and credential: the OAuth application, organization API key, or unmanaged OAuth user. OAuth token refresh preserves the namespace; replacing an API key starts a separate namespace.`}),`\n`,_jsx(_components.li,{children:`Authentication, permissions, and input validation apply to retries. A replay returns the contribution’s current representation, including subsequent edits, with current identity-masking permissions.`}),`\n`,_jsx(_components.li,{children:`Validation failures do not reserve the key. Correct the input and retry.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The header is optional for compatibility. An `,_jsx(_components.code,{children:`externalId`}),` alone does not prevent duplicates: split gifts can legitimately share it. Use a different idempotency key for each split row, and reuse that row’s key for retries. Before replaying older imports that did not use a key, reconcile your saved Grain contribution IDs; adding a key does not deduplicate an earlier unkeyed request.`]}),`\n`,_jsx(Heading,{level:`2`,id:`who-owns-the-totals`,children:`Who owns the totals?`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Contribution amounts, processing fees, and stored net amounts are the source for a giving batch. Grain recalculates batch gross, absolute fees, net, fund splits, and distinct gift count whenever membership or money changes.`}),`\n`,_jsxs(_components.li,{children:[`Settlement `,_jsx(_components.code,{children:`recordedTotals`}),` are provider or client-owned values and remain independently editable.`]}),`\n`,_jsxs(_components.li,{children:[`Settlement `,_jsx(_components.code,{children:`linkedContributionTotals`}),` are calculated from current linked contributions. Compare the two objects to identify import or membership differences.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Dates such as contribution date, batch date, and estimated arrival date are calendar days. Grain returns existing v1 date fields as UTC ISO strings, with calendar days represented at UTC midnight. Audit timestamps such as `,_jsx(_components.code,{children:`createdAt`}),`, `,_jsx(_components.code,{children:`updatedAt`}),`, and `,_jsx(_components.code,{children:`committedAt`}),` are real instants.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-manual-batch`,children:`Create a manual batch`}),`\n`,_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`givingIntegrationId`}),` and `,_jsx(_components.code,{children:`externalBatchId`}),` are omitted, Grain uses its non-syncing manual giving integration and generates an external ID. Empty open batches are valid.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.grainledger.com/api/v1/batches\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$GRAIN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --data`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"externalReference\": \"Sunday online gifts\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"batchDate\": \"2026-08-16\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"contributionIds\": [\"contribution_1\", \"contribution_2\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`contributionIds`}),` replaces batch membership atomically. A contribution already owned by another batch produces `,_jsx(_components.code,{children:`409 Conflict`}),`; move it explicitly with `,_jsx(_components.code,{children:`PATCH /api/v1/contributions/{id}`}),` before the bulk membership write.`]}),`\n`,_jsx(Heading,{level:`2`,id:`link-a-whole-batch-to-a-settlement`,children:`Link a whole batch to a settlement`}),`\n`,_jsxs(_components.p,{children:[`Settlement writes accept both individual `,_jsx(_components.code,{children:`contributionIds`}),` and whole `,_jsx(_components.code,{children:`givingBatchIds`}),`. Attaching a batch also attaches all of its contributions in the same transaction.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --fail-with-body`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` POST`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.grainledger.com/api/v1/settlements\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`$GRAIN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --data`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"externalReference\": \"August online giving\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"estimatedArrivalDate\": \"2026-08-21\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"totalGross\": 1025,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"totalFees\": 25,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"totalNet\": 1000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"paymentCount\": 8,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"givingBatchIds\": [\"batch_1\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`All donors, funds, merchants, integrations, contributions, batches, and settlements referenced by a write must belong to the authenticated organization. Partial-batch or conflicting settlement ownership returns `,_jsx(_components.code,{children:`409`}),` without applying a partial change.`]}),`\n`,_jsx(Heading,{level:`2`,id:`accounting-freeze-behavior`,children:`Accounting freeze behavior`}),`\n`,_jsxs(_components.p,{children:[`CRUD never posts a journal entry, links a bank transaction, or reconciles a settlement. `,_jsx(_components.code,{children:`MATCHED`}),`, `,_jsx(_components.code,{children:`RECONCILED`}),`, and batch `,_jsx(_components.code,{children:`SETTLED`}),` are accounting-owned states and cannot be created through ordinary API edits.`]}),`\n`,_jsxs(_components.p,{children:[`Unfrozen contributions, batches, and settlements can be edited, moved, or deleted. Once a resource is posted, cleared, bank-linked, or otherwise accounting-frozen, conflicting writes return `,_jsx(_components.code,{children:`409 Conflict`}),`. Deleting an unfrozen batch or settlement unlinks and preserves its contributions; deleting a contribution recalculates its former batch.`]}),`\n`,_jsx(Heading,{level:`2`,id:`household-members`,children:`Household members`}),`\n`,_jsx(_components.p,{children:`Use the member routes to keep current membership, position, and primary contact consistent:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`POST /api/v1/households/{id}/members`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`PATCH /api/v1/households/{id}/members/{donorId}`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`DELETE /api/v1/households/{id}/members/{donorId}`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Moving a donor refreshes both affected household aggregates. Send `,_jsx(_components.code,{children:`null`}),` in donor or household PATCH requests to clear documented nullable fields.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Give integrations separate `,_jsx(_components.code,{children:`contributions`}),`, `,_jsx(_components.code,{children:`batches`}),`, and `,_jsx(_components.code,{children:`settlements`}),`\nscopes. Write scopes imply read, but they do not grant journal-posting\npermission.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Giving resources","description":"Work safely with donors, households, contributions, giving batches, and settlements.","icon":"hand-holding-heart","href":"/giving"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Map your giving funds","slug":"map-your-giving-funds","depth":2,"children":[]},{"title":"Retry contribution creates safely","slug":"retry-contribution-creates-safely","depth":2,"children":[]},{"title":"Who owns the totals?","slug":"who-owns-the-totals","depth":2,"children":[]},{"title":"Create a manual batch","slug":"create-a-manual-batch","depth":2,"children":[]},{"title":"Link a whole batch to a settlement","slug":"link-a-whole-batch-to-a-settlement","depth":2,"children":[]},{"title":"Accounting freeze behavior","slug":"accounting-freeze-behavior","depth":2,"children":[]},{"title":"Household members","slug":"household-members","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"grainledger","siteName":"Grain API","title":"Giving resources - Grain API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-15T18:46:17.639Z","gitLastModified":"2026-09-15T18:45:47.000Z","originalFileLocation":"giving.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Work safely with donors, households, contributions, giving batches, and settlements.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Grain API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Giving resources - Grain API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Work safely with donors, households, contributions, giving batches, and settlements.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Grain API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.grainledger.com/giving\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://grainledger.com/og-image.jpg?v=wheat-field-20260908\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Giving resources - Grain API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Work safely with donors, households, contributions, giving batches, and settlements.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://grainledger.com/og-image.jpg?v=wheat-field-20260908\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/grainledger/PJpRtk0ZdVq1mTks/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Grain API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#03440c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.grainledger.com/giving\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/giving.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.grainledger.com/#organization\",\"name\":\"Grain API\",\"url\":\"https://docs.grainledger.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/grainledger/Jxl-ZANCEY95i3PU/images/grain-wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=Jxl-ZANCEY95i3PU\u0026q=85\u0026s=47f8188964661273a33f4901a311ba81\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.grainledger.com#website\",\"name\":\"Grain API\",\"url\":\"https://docs.grainledger.com\",\"publisher\":{\"@id\":\"https://docs.grainledger.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.grainledger.com/giving#webpage\",\"url\":\"https://docs.grainledger.com/giving\",\"name\":\"Giving resources\",\"description\":\"Work safely with donors, households, contributions, giving batches, and settlements.\",\"dateModified\":\"2026-09-15T18:45:47.000Z\",\"isPartOf\":{\"@id\":\"https://docs.grainledger.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.grainledger.com/giving#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.grainledger.com/giving#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core concepts\",\"item\":\"https://docs.grainledger.com/authentication\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Giving resources\",\"item\":\"https://docs.grainledger.com/giving\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.grainledger.com/giving#article\",\"headline\":\"Giving resources\",\"name\":\"Giving resources\",\"description\":\"Work safely with donors, households, contributions, giving batches, and settlements.\",\"url\":\"https://docs.grainledger.com/giving\",\"mainEntityOfPage\":{\"@id\":\"https://docs.grainledger.com/giving#webpage\"},\"image\":\"https://grainledger.com/og-image.jpg?v=wheat-field-20260908\",\"dateModified\":\"2026-09-15T18:45:47.000Z\",\"publisher\":{\"@id\":\"https://docs.grainledger.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.grainledger.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Grain API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Grain API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/giving.md","siteName":"Grain API","nav":{"global":{"anchors":[{"anchor":"Open app","icon":"https://mintlify.s3.us-west-1.amazonaws.com/grainledger/images/grain-logomark.svg","href":"https://app.grainledger.com"},{"anchor":"Support","icon":"circle-question","href":"https://grainledger.com/support"}]},"tabs":[{"tab":"Getting Started","icon":"rocket","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"book-open","href":"/intro"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"MCP (Model Context Protocol)","icon":"robot","href":"/mcp-server"}]},{"group":"Core concepts","pages":[{"title":"Authentication","icon":"key","href":"/authentication"},{"title":"Organizations","icon":"building","href":"/organizations"},{"title":"Pagination","icon":"list","href":"/pagination"},{"title":"Errors","icon":"triangle-exclamation","href":"/errors"},{"title":"Transactions","description":"Create bank and card transactions, code them to accounts, funds, and dimensions, attach receipts, and approve them.","icon":"receipt","href":"/transactions"},{"title":"Giving resources","icon":"hand-holding-heart","href":"/giving"},{"title":"Pledge card imports","description":"Submit structured pledge card data and review it in Grain before creating pledges.","href":"/pledge-card-imports"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/funds/list-funds"}]}]},"basePath":"","title":"Giving resources - Grain API","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}