API reference/Donations
Get a gift
Try itOne gift with every payment received for it.
GET
/api/v1/sites/{site_id}/donations/{donation_id}Authentication
An API key as Authorization: Bearer or x-api-key. It needs the donations:read scope — read gifts made through a site's Donate section.
donations:readRead onlyMCP tool: get_donation
Parameters
Named placeholders go in the path; the rest in the query string.
site_idstringPath · required- The site's id.1 to 100 characters
donation_idstringPath · required- The donation's id.1 to 100 characters
Response
200 with JSON on success (schema on the right). Errors use the standard envelope.
curl -X GET 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/donations/DONATION_ID' \
-H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"{
"site_id": "SITE_ID",
"donation_id": "DONATION_ID"
}{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The site's gift number (#1, #2 …)."
},
"frequency": {
"type": "string",
"enum": [
"once",
"monthly"
]
},
"status": {
"type": "string",
"enum": [
"paid",
"active",
"canceled"
],
"description": "paid = a one-time gift received; active = a monthly gift still giving; canceled = a monthly gift stopped."
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The gift (each month's, for a monthly one)."
},
"currency": {
"type": "string"
},
"donor": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
}
},
"required": [
"name",
"email"
],
"additionalProperties": false
},
"note": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "What the gift is for — the Donate section's “purpose” when it was given."
},
"page_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"received_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Money received for this gift so far."
},
"refunded_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of that, given back by card refund (refund_donation_payment, or in Stripe)."
},
"last_paid_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"canceled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string"
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"refunded_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Given back by card refund — confirmed by Stripe."
},
"paid_at": {
"type": "string"
}
},
"required": [
"id",
"amount_cents",
"refunded_cents",
"paid_at"
],
"additionalProperties": false
},
"description": "Each charge, oldest first."
},
"is_sample": {
"type": "boolean"
}
},
"required": [
"id",
"number",
"frequency",
"status",
"amount_cents",
"currency",
"donor",
"note",
"purpose",
"page_path",
"received_cents",
"refunded_cents",
"last_paid_at",
"canceled_at",
"created_at",
"payments",
"is_sample"
],
"additionalProperties": false
}