Payment Pages

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-pages

The 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

FieldTypeDescription
pageIdstringAuto-generated unique ID (PP-XXXXXX)
namestringDisplay name for the payment page
slugstringURL-safe identifier (auto-generated from name)
urlstringFull shareable URL for the payment page
typestringone_time, subscription, or donation
allowCustomAmountbooleanAllow customers to enter their own amount
statusstringactive, inactive, or archived
conversionRatenumberPercentage of views that converted to payments

Create a Payment Page

POST/payment-pages

Create a new hosted payment page with customizable options.

Request Body

request.jsonjson
{
"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

GET/payment-pages

Retrieve all payment pages for your organization with pagination and filtering.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, inactive, archived
searchstringSearch 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

GET/payment-pages/:id

Retrieve 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

PATCH/payment-pages/:id

Update 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

POST/payment-pages/:id/toggle

Toggle 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

DELETE/payment-pages/:id

Permanently delete a payment page.

Irreversible Action

Deleting a payment page cannot be undone. The payment URL will no longer work. Consider setting the status to "inactive" instead if you may need the page later.
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.

GET/public/payment-pages/:slug

Get payment page details by slug (used to render the hosted page).

POST/public/payment-pages/:slug/conversion

Record 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.