Route-by-route public reference for the SparkGlim white-label tenant API.
Find routes by endpoint path, section, method, parameter, or integration keyword.
Showing 9 of 9 endpoints
Signature model, header contract, key scopes, and request verification.
Validate Authentication And Load Tenant Context
Base URL
https://api.sparkglim.net
Endpoint
GET /api/white-label/v1/context
Overview
Use this endpoint as your integration health check. It verifies your signed request and returns account identity, branding, domains, settings, and provider summary.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
Response Format
200 Success
Tenant context returned successfully.
{
"success": true,
"data": {
"account": {
"id": "acc_5f0efc7",
"accountSlug": "acme-events",
"platformName": "Acme Events"
},
"branding": {
"platformName": "Acme Events",
"primaryDomain": "events.acme.com"
},
"domains": [
{
"hostname": "events.acme.com",
"isPrimary": true,
"sslStatus": "active"
}
],
"settings": {
"payments": {},
"notifications": {}
},
"providerSummary": []
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to load tenant context.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'GET'
const path = '/api/white-label/v1/context'
const body = {}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
Campaign management and campaign-driven payment initialization flows.
Create A Tenant Campaign In The White-Label Scope
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/v1/campaigns
Overview
Creates a campaign under the authenticated white-label account and mirrors operational records into SparkGlim-owned public tables.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
title
Campaign display title.
description
Campaign narrative copy.
campaign_type
Campaign mode.
status
Initial moderation state.
start_date
Campaign start timestamp.
end_date
Campaign end timestamp.
metadata
External IDs and custom integration metadata.
Request Example
{
"title": "Acme Awards 2026",
"description": "Annual awards voting campaign for the Acme community.",
"slug": "acme-awards-2026",
"campaign_type": "voting",
"status": "draft",
"start_date": "2026-05-01T00:00:00.000Z",
"end_date": "2026-06-01T00:00:00.000Z",
"vote_price": 2,
"verification_required": true,
"metadata": {
"externalCampaignId": "CAM-001"
}
}Response Format
201 Created
Campaign created and mirrored successfully.
{
"success": true,
"data": {
"id": "a0713b34-5fda-4685-9fbe-165d6479d5c9",
"title": "Acme Awards 2026",
"campaign_type": "voting",
"status": "draft"
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to create campaign.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'POST'
const path = '/api/white-label/v1/campaigns'
const body = {
"title": "Acme Awards 2026",
"description": "Annual awards voting campaign for the Acme community.",
"slug": "acme-awards-2026",
"campaign_type": "voting",
"status": "draft",
"start_date": "2026-05-01T00:00:00.000Z",
"end_date": "2026-06-01T00:00:00.000Z"
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
List Tenant Campaigns With Search And Status Filters
Base URL
https://api.sparkglim.net
Endpoint
GET /api/white-label/v1/campaigns?search=awards&status=approved
Overview
Returns white-label account campaigns from the synchronized campaign store and supports simple search/status filtering.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
search
Case-insensitive title/slug search.
status
Campaign status filter.
Response Format
200 Success
Filtered campaigns returned.
{
"success": true,
"data": [
{
"id": "a0713b34-5fda-4685-9fbe-165d6479d5c9",
"title": "Acme Awards 2026",
"campaign_type": "voting",
"status": "approved"
}
],
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to list campaigns.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'GET'
const path = '/api/white-label/v1/campaigns?search=awards&status=approved'
const body = {}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
Ticket type management and event gate verification/check-in flows.
Create A Ticket Type For A Tenant Campaign
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/v1/ticket-types
Overview
Creates a ticket type record under a campaign and synchronizes that ticket type with white-label mirror tables for verification and channel operations.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
campaignId
Campaign target for ticket type.
name
Ticket display name.
ticket_type
Ticket category.
price
Unit amount in GHS.
quantity_available
Sellable inventory.
required_attendee_fields
Structured attendee field definitions.
Request Example
{
"campaignId": "20d7f99a-4308-4f9f-b7bb-57148850d06e",
"name": "VIP Pass",
"description": "Priority seating and fast-lane access",
"ticket_type": "vip",
"price": 150,
"quantity_available": 200,
"status": "active",
"is_free": false,
"max_per_person": 4,
"required_attendee_fields": [
{ "key": "full_name", "label": "Full name", "type": "text", "required": true },
{ "key": "email", "label": "Email", "type": "email", "required": true }
]
}Response Format
201 Created
Ticket type created successfully.
{
"success": true,
"data": {
"id": "f8f32744-ec0e-4d31-a4f7-0ad90a8e6996",
"name": "VIP Pass",
"ticket_type": "vip",
"price": 150,
"quantity_available": 200
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to create ticket type.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'POST'
const path = '/api/white-label/v1/ticket-types'
const body = {
"campaignId": "20d7f99a-4308-4f9f-b7bb-57148850d06e",
"name": "VIP Pass",
"ticket_type": "vip",
"price": 150,
"quantity_available": 200,
"status": "active"
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
Verify Ticket Code And Optionally Auto-Check-In
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/v1/tickets/verify
Overview
Validates ticket ownership and check-in status for gate operations. Use this endpoint for scanning devices and controlled check-in flows.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
ticketCode
Ticket code or QR token value.
autoVerify
When true, automatically verify/check-in when policy permits.
checkedInBy
Gate agent identifier for audit trails.
Request Example
{
"ticketCode": "WL-ABC123",
"autoVerify": false,
"checkedInBy": "gate-agent-01"
}Response Format
200 Success
Ticket verification data returned.
{
"success": true,
"data": {
"status": "valid",
"ticketCode": "WL-ABC123",
"checkedIn": false,
"campaign": {
"id": "20d7f99a-4308-4f9f-b7bb-57148850d06e",
"title": "Acme Awards 2026"
},
"attendee": {
"full_name": "Jane Guest",
"email": "jane@example.com"
}
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to verify ticket.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'POST'
const path = '/api/white-label/v1/tickets/verify'
const body = {
"ticketCode": "WL-ABC123",
"autoVerify": false
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
Outbound branded delivery and inbound provider callback expectations.
Send Branded Notifications Through Tenant Providers
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/v1/notifications
Overview
Dispatches event-driven messages through account-configured email or SMS providers while preserving tenant branding and audit records.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
channel
Delivery medium.
eventType
Event label for templates and analytics.
recipient
Email address or phone number.
subject
Email subject. Optional for SMS.
payload
Template variables or direct message content.
Request Example
{
"channel": "email",
"eventType": "ticket.purchase.confirmed",
"recipient": "guest@example.com",
"subject": "Your Acme ticket is confirmed",
"payload": {
"title": "Ticket confirmed",
"html": "<p>Thank you for your purchase.</p>",
"text": "Thank you for your purchase."
}
}Response Format
202 Accepted
Notification accepted for processing.
{
"success": true,
"data": {
"channel": "email",
"status": "queued",
"eventType": "ticket.purchase.confirmed"
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to dispatch notification.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'POST'
const path = '/api/white-label/v1/notifications'
const body = {
"channel": "email",
"eventType": "ticket.purchase.confirmed",
"recipient": "guest@example.com",
"subject": "Your Acme ticket is confirmed",
"payload": {
"title": "Ticket confirmed",
"text": "Thank you for your purchase."
}
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Webhook Documentation
Event Types
Payload Structure
{
"eventType": "ticket.purchase.confirmed",
"channel": "email",
"recipient": "guest@example.com",
"payload": {
"title": "Ticket confirmed",
"text": "Thank you for your purchase."
}
}Verification Method
For outbound dispatch there is no callback signature from this endpoint itself. For inbound provider callbacks, use `/api/white-label/webhooks/:provider` and verify provider signatures before mutation.
Error Handling
Rate Limits And Abuse Protection
Receive Provider Callbacks For Reconciliation
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/webhooks/:provider
Overview
Inbound webhook endpoint for payment providers. Use this to confirm payment state and reconcile white-label and SparkGlim records.
How It Works
Authentication
Security Notes
Request Parameters
provider
Provider identifier.
x-paystack-signature
Paystack callback signature header when provider is paystack.
x-expresspay-signature
ExpressPay signature header when provider is expresspay.
body
Provider-specific callback body.
Response Format
200 Success
Webhook accepted and processed.
{
"success": true,
"processed": true,
"provider": "paystack",
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Unsupported Provider
Provider path parameter is not supported.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Verification Failed
Provider signature or secret validation failed.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript test callback
await fetch('https://api.sparkglim.net/api/white-label/webhooks/paystack', {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-paystack-signature': '<provider-signature>',
},
body: JSON.stringify({
event: 'charge.success',
data: {
reference: 'WL-TICKET-2026-000112',
amount: 15000,
status: 'success'
}
}),
})Webhook Documentation
Event Types
Payload Structure
{
"event": "charge.success",
"data": {
"reference": "WL-TICKET-2026-000112",
"status": "success",
"amount": 15000,
"customer": {
"email": "buyer@example.com"
}
}
}Verification Method
Verify provider signatures using provider secret and raw body bytes before any business mutation. Reject unsigned or mismatched callbacks with 401.
Error Handling
Rate Limits And Abuse Protection
Tenant-wide configuration, routing, payments, and operational endpoints.
Initialize Routed Tenant Payment Across Channels
Base URL
https://api.sparkglim.net
Endpoint
POST /api/white-label/v1/payments/initialize
Overview
Starts a payment using account provider routing rules for web, USSD, Telegram, WhatsApp, and withdrawal channels.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
transactionType
Payment intent classification.
amount
Gross charge amount in GHS.
Payer email.
phoneNumber
Payer phone number.
callbackUrl
Return/callback URL after checkout.
channel
Routing channel (default `web`).
metadata
Campaign or ticket linkage metadata.
Request Example
{
"transactionType": "ticket",
"amount": 150,
"email": "buyer@example.com",
"phoneNumber": "+233200000000",
"callbackUrl": "https://tickets.acme.com/payments/callback",
"description": "VIP ticket checkout",
"channel": "web",
"metadata": {
"campaignId": "20d7f99a-4308-4f9f-b7bb-57148850d06e",
"ticketTypeId": "f8f32744-ec0e-4d31-a4f7-0ad90a8e6996"
}
}Response Format
200 Success
Gateway initialization payload returned.
{
"success": true,
"data": {
"provider": "paystack",
"authorizationUrl": "https://checkout.paystack.com/9j7w2jv6d2",
"accessCode": "9j7w2jv6d2",
"reference": "WL-TICKET-2026-000112",
"gatewayMeta": {
"payment_provider": "paystack"
}
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to initialize payment.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'POST'
const path = '/api/white-label/v1/payments/initialize'
const body = {
"transactionType": "ticket",
"amount": 150,
"email": "buyer@example.com",
"phoneNumber": "+233200000000",
"callbackUrl": "https://tickets.acme.com/payments/callback",
"description": "VIP ticket checkout",
"channel": "web"
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection
Patch A Tenant Setting Category
Base URL
https://api.sparkglim.net
Endpoint
PATCH /api/white-label/v1/settings/:category
Overview
Updates a single white-label setting category (`branding`, `payments`, `notifications`, and related categories) in one operation.
How It Works
Authentication
Security Notes
Request Parameters
x-white-label-key-id
Tenant-issued API key identifier.
x-white-label-timestamp
Request timestamp used for replay protection.
x-white-label-signature
Signature over `${timestamp}.${METHOD}.${path}.${body}`.
content-type
JSON payload transport contract.
category
Setting category slug.
config
Category config object to write.
Request Example
{
"config": {
"useSharedDefaults": false,
"defaultProvider": "paystack",
"fallbackProvider": "expresspay"
}
}Response Format
200 Success
Setting category updated.
{
"success": true,
"data": {
"category": "payments",
"config": {
"useSharedDefaults": false,
"defaultProvider": "paystack",
"fallbackProvider": "expresspay"
}
},
"requestId": "wlapi_d2f2ac17"
}Error Responses
400 Validation Error
Payload or query validation failed while trying to update settings category.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}401 Authentication Error
Missing headers, stale timestamp, or invalid HMAC signature.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}403 Scope Denied
API key does not include the required scope for this endpoint.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}429 Rate Limit Error
Too many requests in a short time window.
{
"success": false,
"error": "Validation failed: campaignId is required",
"requestId": "wlapi_d2f2ac17",
"details": [
{
"field": "campaignId",
"message": "Required"
}
]
}Status Codes
Code Examples
JavaScript (fetch + Node crypto)
import crypto from 'crypto'
const baseUrl = 'https://api.sparkglim.net'
const keyId = process.env.WHITE_LABEL_KEY_ID
const secret = process.env.WHITE_LABEL_SECRET
const timestamp = Date.now().toString()
const method = 'PATCH'
const path = '/api/white-label/v1/settings/payments'
const body = {
"config": {
"useSharedDefaults": false,
"defaultProvider": "paystack"
}
}
const serializedBody = method === 'GET' || method === 'HEAD' ? '{}' : JSON.stringify(body)
const canonical = `${timestamp}.${method}.${path}.${serializedBody}`
const signature = crypto.createHmac('sha256', secret).update(canonical).digest('hex')
const response = await fetch(`${baseUrl}${path}`, {
method,
headers: {
'content-type': 'application/json',
'x-white-label-key-id': keyId,
'x-white-label-timestamp': timestamp,
'x-white-label-signature': signature,
},
body: method === 'GET' || method === 'HEAD' ? undefined : serializedBody,
})
const payload = await response.json()
console.log(payload)
Error Handling
Rate Limits And Abuse Protection