Payment Pages API
Create hosted payment pages that you can share with customers. Perfect for donations, one-time payments, or collecting payments without building a checkout.
Hosted Pages
Shareable URLs for payment collection without any coding required.
Customizable
Brand colors, logos, and custom success messages.
Analytics
Track views, conversions, and revenue for each page.
Flexible Amounts
Fixed amounts or let customers enter custom amounts.
Base URL
https://api.serixpay.com/api/v1/payment-pagesThe Payment Page Object
{ "id": "65abc123def456", "pageId": "PP-000001", "name": "Product Launch Donation", "description": "Support our new product launch", "slug": "product-launch-donation-a1b2c3d4", "url": "https://pay.serixpay.com/p/product-launch-donation-a1b2c3d4", "amount": 1000, "currency": "KES", "type": "donation", "allowCustomAmount": true, "minAmount": 100, "maxAmount": 100000, "redirectUrl": "https://yoursite.com/thank-you", "successMessage": "Thank you for your generous donation!", "brandColor": "#6366f1", "logoUrl": "https://yoursite.com/logo.png", "status": "active", "views": 1250, "conversions": 87, "conversionRate": 7.0, "revenue": 125000, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-20T14:22:00Z"}Fields
| Field | Type | Description |
|---|---|---|
pageId | string | Auto-generated unique ID (PP-XXXXXX) |
name | string | Display name for the payment page |
slug | string | URL-safe identifier (auto-generated from name) |
url | string | Full shareable URL for the payment page |
type | string | one_time, subscription, or donation |
allowCustomAmount | boolean | Allow customers to enter their own amount |
status | string | active, inactive, or archived |
conversionRate | number | Percentage of views that converted to payments |
Create a Payment Page
/payment-pagesCreate a new hosted payment page with customizable options.
Request Body
{ "name": "Event Tickets", "description": "Purchase tickets for our annual conference", "amount": 5000, "currency": "KES", "type": "one_time", "allowCustomAmount": false, "redirectUrl": "https://yoursite.com/tickets/confirmed", "successMessage": "Your tickets have been confirmed!", "brandColor": "#10b981", "logoUrl": "https://yoursite.com/logo.png"}Example Request
curl -X POST https://api.serixpay.com/api/v1/payment-pages \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "name": "Event Tickets", "description": "Purchase tickets for our annual conference", "amount": 5000, "currency": "KES", "type": "one_time" }'Response
{ "success": true, "page": { "id": "65abc123def456", "pageId": "PP-000001", "name": "Event Tickets", "slug": "event-tickets-x7y8z9", "url": "https://pay.serixpay.com/p/event-tickets-x7y8z9", "amount": 5000, "currency": "KES", "type": "one_time", "status": "active", "views": 0, "conversions": 0, "revenue": 0 }, "message": "Payment page created successfully"}List Payment Pages
/payment-pagesRetrieve all payment pages for your organization with pagination and filtering.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20, max: 100) |
status | string | Filter by status: active, inactive, archived |
search | string | Search by name or pageId |
curl https://api.serixpay.com/api/v1/payment-pages?status=active&limit=10 \ -H "Authorization: Bearer <access_token>"Get a Payment Page
/payment-pages/:idRetrieve a single payment page by its ID.
curl https://api.serixpay.com/api/v1/payment-pages/65abc123def456 \ -H "Authorization: Bearer <access_token>"Update a Payment Page
/payment-pages/:idUpdate an existing payment page. Only provided fields will be updated.
curl -X PATCH https://api.serixpay.com/api/v1/payment-pages/65abc123def456 \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "amount": 7500, "description": "Updated description" }'Toggle Page Status
/payment-pages/:id/toggleToggle a payment page between active and inactive status.
curl -X POST https://api.serixpay.com/api/v1/payment-pages/65abc123def456/toggle \ -H "Authorization: Bearer <access_token>"Delete a Payment Page
/payment-pages/:idPermanently delete a payment page.
Irreversible Action
curl -X DELETE https://api.serixpay.com/api/v1/payment-pages/65abc123def456 \ -H "Authorization: Bearer <access_token>"Public Endpoints
These endpoints don't require authentication and are used by the hosted payment page.
/public/payment-pages/:slugGet payment page details by slug (used to render the hosted page).
/public/payment-pages/:slug/conversionRecord a successful payment conversion (called after payment completes).
Common Use Cases
Donation Page
Create a donation page with allowCustomAmount: true andtype: "donation" to let donors choose their contribution amount.
Event Tickets
Fixed price page with type: "one_time" for selling tickets at a set price.
Invoice Payment Link
Send customers a direct link to pay a specific amount. UseredirectUrl to send them back to your site after payment.