get_donations_session_by_id
Calls GET /api/donations/session/{id} as the signed-in person · REST reference
Read a Stripe Checkout session for the thank-you page
Deliberately PUBLIC - the donor's own thank-you page loads it with no session, straight after the Stripe redirect. It proxies Stripe and returns only the non-sensitive receipt fields Stripe already emails the donor, plus two read from the graph while the session may act on the gift: customer_email as the gift records it, and emailCorrectable. Declared before the authenticated /:id route below, so that route's platform-staff gate does not capture it.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
idpath | string | required | Stripe Checkout session id (cs_...). |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_donations_session_by_id",
"arguments": {
"id": "string"
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
Stripe's summary of the session.
{
"amount_total": 1,
"currency": "string",
"customer_email": "string",
"customer_name": "string",
"emailCorrectable": true,
"gift_amount": 1,
"id": "string",
"payment_status": "string",
"recurring": true
}Fields
| Field | Type | Description |
|---|---|---|
amount_total | integer | null | Total charged in CENTS, straight from Stripe. |
currency | string | null | |
customer_email | string | null | The donor's address as the recorded gift holds it — corrected, once the donor corrected it through POST /api/donations/session/{id}/donor-email. Stripe's customer_details.email (else the session's customer_email), the address typed at checkout, before the webhook records the gift, when the graph cannot be asked, or once the session is unpaid or past its 7 days. |
customer_name | string | null | |
emailCorrectable | boolean | Whether POST /api/donations/session/{id}/donor-email would still be accepted: the session is paid and at most 7 days old, the gift names a donor, and its one correction is unused. True before the webhook records the donation (the POST then answers 409 NOT_YET_RECORDED until it does); false when the graph could not be asked. Hide the "wrong email?" link when false. |
gift_amount | integer | null | The gift alone in CENTS — what reaches the foundation: amount_total less the processing fee the donor chose to cover (the session's cover_processing_fees / processing_fee metadata). Null when Stripe has no total or that metadata is missing or unreadable. The thank-you page's share shows this, never the total. |
id | string | |
payment_status | string | Stripe's own value, e.g. paid / unpaid / no_payment_required. |
recurring | boolean | Whether the gift recurs — the recurring flag create-checkout-session stamps on the session. A recurring gift is charged by this platform on its schedule, not by a Stripe subscription. |
When it fails
A failed call returns isError: true with the API's message as text.
404Stripe has no such session (statusCode 404 / code resource_missing).
502Stripe answered, and answered badly. The upstream message stays in the log.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "get_donations_session_by_id",
"description": "GET /api/donations/session/{id} — Deliberately PUBLIC - the donor's own thank-you page loads it with no session, straight after the Stripe redirect. It proxies Stripe and returns only the non-sensitive receipt fields Stripe already emails the donor, plus two read from the graph while the session may act on the gift: `customer_email` as the gift records it, and `emailCorrectable`. Declared before the authenticated `/:id` route below, so that route's platform-staff gate does not capture it.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Stripe Checkout session id (cs_...)."
}
},
"required": [
"id"
]
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}