Payment pages
Make shops, event pages and donation pages from your server, read their orders, and check event tickets in at the door.
Live
Payment pages work through the API today, with test and live keys.
A payment page sells products, sells event tickets, or takes donations, at
xtopay.me/<username>/<slug>. They're the same pages as the dashboard's
Payment pages (see the guide). As with
links, a test key makes test pages at
xtopay.me/test/<username>/<slug>, paid through the test provider and kept
out of the dashboard; their tickets and receipts email nobody.
The payment page object
{
"id": "pgs_2d6f8g1rsy7k3m9q4z7c",
"url": "https://xtopay.me/nanaskitchen/tasting",
"mode": "live",
"kind": "event",
"slug": "tasting",
"title": "Tasting night",
"description": "Six dishes, one evening.",
"image_id": null,
"image_url": null,
"status": "active",
"event": {
"starts_at": "2027-01-15T18:00:00Z",
"ends_at": null,
"venue": "Osu, Accra"
},
"donation": null,
"items": [
{
"id": "itm_4p8q2x6wmn5l9n3t7qpa",
"name": "Regular",
"description": null,
"price": 100,
"image_id": null,
"image_url": null,
"stock": 50,
"sold": 12
}
],
"questions": [
{ "id": "a1b2c3d4e5f6", "label": "Any allergies?", "type": "text", "required": false }
],
"collect_email": true,
"orders": 9,
"collected": 1200,
"created_at": "2026-10-24T09:16:10Z"
}kind | What it needs |
|---|---|
products | At least one item in items (name, price in cedis, and stock, or null for no limit) |
event | event (starts_at, venue, and ends_at if you like) and at least one kind of ticket in items. Events always collect an email: tickets go there |
donation | donation: suggested amounts, any_amount (let people give what they like), min_amount and a goal, all in cedis |
questions (up to 10) are asked at checkout: type is text, number or
choice (with 2 to 20 options). Pictures are added in the dashboard; a page
made through the API can use an image_id the business already uploaded.
Make a page
curl https://api.xtopay.co/v1/payment_pages \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-d '{
"kind": "event",
"title": "Tasting night",
"slug": "tasting",
"event": { "starts_at": "2027-01-15T18:00:00Z", "venue": "Osu, Accra" },
"items": [{ "name": "Regular", "price": 100, "stock": 50 }]
}'A page's kind can't change after it's made.
Change, pause or resume a page
Send only what changes, and status (active or paused) to pause or
resume it. items replaces the list: send each item you're keeping with its
id (its stock can't go below what's sold), add new ones without one, and
any left out come off the page (kept for the orders that bought them).
Get, list and delete pages
Newest first: kind, status, page and page_size.
A deleted page stops selling; its orders, tickets and address stay.
Orders
The page's paid orders, newest first, with total: who bought, what, and
their answers.
{
"id": "pay_7c9adm3dkqf2…",
"reference": "XTP-7C9ADM3DKQF2",
"amount": 200,
"status": "successful",
"customer": { "name": "Kofi Boateng", "phone": "233244001234", "email": "kofi@example.com" },
"items": [{ "name": "Regular", "price": 100, "quantity": 2 }],
"answers": [{ "question": "Any allergies?", "answer": "Groundnuts" }],
"paid_at": "2026-10-24T09:16:41Z"
}Event tickets
{
"success": true,
"data": {
"tickets": [
{
"code": "7K2M9QH4TZ",
"holder": "Kofi Boateng",
"type": "Regular",
"reference": "XTP-7C9ADM3DKQF2",
"refunded": false,
"checked_in_at": null,
"created_at": "2026-10-24T09:16:41Z"
}
],
"issued": 24,
"checked_in": 9
}
}search finds a ticket by its holder's name or its code; page and
page_size page through them.
At the door, from your own scanning app: { "code": "7K2M9QH4TZ" } (spaces
and dashes are ignored). Each ticket checks in once; a second time gets
409 taken, with when it was. A refunded ticket gets 409 invalid.