API reference
Start public donation
Starts a donation for the selected fundraiser after validating requested amount, campaign rules and browser protection; this is not a completed contribution.
https://api.sparkglim.net/api/public/donateAccess model
- Access model
- Public access with validation
- Documented availability
- Implemented in source
Availability is verified from source, not a live production guarantee.
Open the returned checkout URL. SparkGlim Server owns prices, methods, payment verification and fulfillment; browser returns are navigation only.
Request
| Name | Type | Validation |
|---|---|---|
campaign_idRequiredExisting campaign record within the caller’s account and any narrower campaign credential. | string | Validation: UUID. |
amountRequiredRequested contribution or withdrawal amount in the existing campaign/account currency; the server validates financial authority and final terms. | number | Validation: 1–1000000; increments 0.01 in campaign currency. |
donor_country_codeOptionalDonor country context, separate from the fundraiser’s selling country and currency. | string | Validation: uppercase ISO2. |
emailOptionalContact email used by the configured campaign or account workflow; never a credential granting access by itself. | string | Validation: email. |
phone_numberOptionalParticipant contact phone; required payment channels and campaign rules may require a valid international number. | string | Validation: valid phone when channel requires. |
donor_nameOptionalPublic display label for the member or contributor; it does not change account ownership. | string | Validation: trimmed. |
anonymousOptionalRequests the existing anonymous-contribution behavior; conflicting anonymity fields must not be sent. | boolean | Validation: do not conflict with is_anonymous. |
is_anonymousOptionalRequests the existing anonymous-contribution behavior; conflicting anonymity fields must not be sent. | boolean | Validation: do not conflict with anonymous. |
custom_dataOptionalAnswers matching the actual campaign-specific fields, required values and supported options. | object | Validation: configured custom fields. |
payment_channelOptionalOptional channel preference; only methods enabled for the real selling country, currency and merchant may be used. | enum | Validation: configured method only. |
network_codeOptionalConfigured mobile network selection where the chosen payment channel requires it. | string | Validation: configured network. |
is_appOptionalExisting caller context used to select Web or User App configuration; it grants no extra permissions. | boolean | Validation: client context. |
web_abuse_contextRequiredExisting browser/device protection payload required before public checkout initialization; not a replacement for server authorization. | object | Validation: strict object; device_details JSON <=12000 characters. |
web_abuse_context.device_idRequiredExisting browser/device protection signal accepted by the current public checkout protection schema. | string | Validation: 12–160. |
web_abuse_context.device_fingerprintRequiredExisting browser/device protection signal accepted by the current public checkout protection schema. | string | Validation: 12–160. |
web_abuse_context.browser_signatureOptionalExisting browser/device protection signal accepted by the current public checkout protection schema. | string|null | Validation: 12–160. |
web_abuse_context.hardware_signatureOptionalExisting browser/device protection signal accepted by the current public checkout protection schema. | string|null | Validation: 12–160. |
web_abuse_context.device_detailsOptionalExisting browser/device protection signal accepted by the current public checkout protection schema. | object | Validation: JSON object. |
web_abuse_context.client_pattern_detectedOptionalExisting browser/device protection signal accepted by the current public checkout protection schema. | boolean | Validation: existing device protection. |
client_attempt_idOptionalStable client operation identifier used to reuse an existing attempt and reject mismatched retries. | string | Validation: stable normalized operation identity. |
return_pathOptionalRelative return destination on the verified current website after centralized checkout. | string | Validation: same-origin relative path; no // or backslash. |
Request
Examples describe the contract and are not executed. Use authorized test records; never paste a real secret into these pages.
POST /api/public/donate HTTP/1.1
Host: api.sparkglim.net
Content-Type: application/json
{
"campaign_id": "11111111-1111-4111-8111-111111111111",
"amount": 10,
"anonymous": true,
"web_abuse_context": {
"device_id": "<EXISTING_DEVICE_ID>",
"device_fingerprint": "<EXISTING_DEVICE_FINGERPRINT>"
},
"client_attempt_id": "example_stable_attempt_0001"
}Response
{
"success": true,
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"status": "pending"
}
}{
"success": false,
"error": "<ERROR_MESSAGE>"
}Validation, permissions, unavailable records and temporary service failures use the handler’s HTTP status and error payload.
Limits & retries
Default Server limit: 100 requests per IP per 60 seconds. Resource-specific controls also apply.
Source compatibility
Authorized operations require account-specific testing.
server/src/api/router.tsserver/src/api/routes/public.ts