post
/donations/checkoutCreate donation checkout session
Creates a Stripe checkout session for a one-time or recurring donation.
create_donation_checkout
Request body
application/json
json
{
"type": "object",
"properties": {
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"description": "Donor email address"
},
"amount_cents": {
"type": "integer",
"format": "int53",
"description": "Donation amount in minor units for the selected currency"
},
"currency": {
"enum": [
"usd",
"eur",
"brl",
"inr",
"pln",
"try"
],
"type": "string",
"x-enumNames": [
"usd",
"eur",
"brl",
"inr",
"pln",
"try"
],
"description": "Currency for the donation"
},
"interval": {
"anyOf": [
{
"enum": [
"month",
"year"
],
"type": "string",
"x-enumNames": [
"month",
"year"
]
},
{
"type": "null"
}
],
"description": "Billing interval (null for one-time donation)"
},
"is_business": {
"type": "boolean",
"description": "Whether the donation is from a business. When true, Stripe Checkout requires a billing address for tax invoicing. When false or omitted, billing address collection is left to Stripe."
}
},
"required": [
"email",
"amount_cents",
"currency",
"interval"
]
}Responses
200
Success
json
{
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "Stripe checkout URL to redirect the user to"
}
},
"required": [
"url"
]
}400
Bad Request - The request was malformed or contained invalid data
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}429
Too Many Requests - You are being rate limited
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}500
Internal Server Error - An unexpected error occurred
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}