Payments
Every attempt to pay is a payment, with a reference that starts with XTP-. Look one up, or list them.
Live
Getting and listing payments works today, with your secret key.
A payment is made each time a customer tries to pay: on a checkout, your
xtopay.me link, a payment link, a page or an invoice. Its reference starts
with XTP-.
The payment object
{
"reference": "XTP-7C9ADM3DKQF2",
"business_id": "48271935",
"checkout": "chk_8f3k2m9q",
"amount": 350,
"customer_fee": 6.83,
"fee": 6.83,
"net": 350,
"currency": "GHS",
"status": "successful",
"method": "mtn",
"customer": {
"name": "Kofi Boateng",
"phone": "233244123456",
"email": null
},
"description": "Jollof party pack",
"source": { "type": "checkout", "id": "chk_8f3k2m9q", "name": "Jollof party pack" },
"metadata": { "order_id": "1042" },
"note": null,
"answers": [],
"refunded_amount": 0,
"failure_reason": null,
"created_at": "2026-10-24T09:16:10Z",
"paid_at": "2026-10-24T09:16:41Z"
}| Field | |
|---|---|
business_id | The business it was paid to |
amount | The price: what you asked for, in cedis |
customer_fee | What the customer paid toward Xtopay's fee, on top of amount (they were charged amount + customer_fee). It's the whole fee when your customers pay it, and 0 when you do (see who pays the fee) |
fee | Xtopay's fee: 1.95% of amount by MoMo, 3.5% by card |
net | What reaches your balance: amount + customer_fee − fee |
status | pending, successful, failed, refunded or partially_refunded |
method | mtn, telecel, at or card |
checkout | The checkout it was paid through: pay pages and your own checkouts have one; null for direct charges |
source | Where it came from: type is personal (your xtopay.me link), link, page, invoice or checkout, with its id and name |
note, answers | What the customer wrote in the note, and their answers to the link's or page's questions, each a question and its answer |
failure_reason | Why it failed, in words you can show your customer |
A payment is only successful once Xtopay has confirmed with the payment
network that the money arrived. One that isn't finished within 30 minutes is
failed; if the network later says it was paid, it becomes successful,
and you get the webhook then.
Get a payment
GET/v1/payments/{reference}
curl https://api.xtopay.co/v1/payments/XTP-7C9ADM3DKQF2 \
-H "Authorization: Bearer sk_test_…"List payments
GET/v1/payments
Newest first, with total for how many match.
Prop
Type
curl "https://api.xtopay.co/v1/payments?status=successful&page_size=50" \
-H "Authorization: Bearer sk_test_…"