Payment requests
Ask anyone to pay you: create a link, share it, and see when it's paid. The payer side is under Payment links (payer).
POSTCreate a payment request/api/v1/payment-requestsGETList payment requests/api/v1/payment-requestsPOSTCancel a payment request/api/v1/payment-requests/{id}/cancel
Every endpoint here needs Authorization: Bearer <token> for a signed-in AutoPayKe account. See Authentication.
Create a payment request
POST
/api/v1/payment-requests Bearer token
Creates a shareable link at /p/{code}. When it's paid the money is credited to this account's balance.
Body (JSON)
amountstringrequiredMajor units with up to 2 decimals.
currencystringoptionalDefaults to the account's currency.
descriptionstringoptionalUp to 140 characters, shown to the payer.
allowedMethodsstring[]requiredAt least one. Only methods live at pay time are offered.
cardmobile_moneybankcardFeePayerstringoptionalWho pays the card fee. Default customer.
customerownerexpiresInDaysintegeroptional1–30, default 7.
Request
curl -X POST "https://api.autopayke.com/api/v1/payment-requests" \
-H "Authorization: Bearer $AUTOPAYKE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": "2500",
"description": "Invoice 1042: fertiliser",
"allowedMethods": [
"mobile_money"
],
"expiresInDays": 7
}'Response201 application/json
{
"ok": true,
"data": {
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
"code": "Kq7mZp2xA",
"amount": "250000",
"currency": "KES",
"description": "Invoice 1042: fertiliser",
"allowedMethods": [
"mobile_money"
],
"cardFeePayer": "customer",
"status": "active",
"expiresAt": "2026-11-10T09:00:00.000Z",
"paidAt": null,
"createdAt": "2026-11-03T09:00:00.000Z",
"url": "https://www.autopayke.com/p/Kq7mZp2xA"
}
}List payment requests
GET
/api/v1/payment-requests Bearer token
This account's requests, newest first. status is active, paid, expired or cancelled.
Request
curl "https://api.autopayke.com/api/v1/payment-requests" \
-H "Authorization: Bearer $AUTOPAYKE_TOKEN"Response200 application/json
{
"ok": true,
"data": [
{
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
"code": "Kq7mZp2xA",
"amount": "250000",
"currency": "KES",
"description": "Invoice 1042: fertiliser",
"allowedMethods": [
"mobile_money"
],
"cardFeePayer": "customer",
"status": "paid",
"expiresAt": "2026-11-10T09:00:00.000Z",
"paidAt": "2026-11-03T11:42:00.000Z",
"createdAt": "2026-11-03T09:00:00.000Z",
"url": "https://www.autopayke.com/p/Kq7mZp2xA"
}
]
}Cancel a payment request
POST
/api/v1/payment-requests/{id}/cancel Bearer token
The link stops accepting payments straight away.
Path parameters
idstringrequiredThe request id.
Request
curl -X POST "https://api.autopayke.com/api/v1/payment-requests/5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d/cancel" \
-H "Authorization: Bearer $AUTOPAYKE_TOKEN"Response200 application/json
{
"ok": true,
"data": {
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c8d",
"code": "Kq7mZp2xA",
"amount": "250000",
"currency": "KES",
"description": "Invoice 1042: fertiliser",
"allowedMethods": [
"mobile_money"
],
"cardFeePayer": "customer",
"status": "cancelled",
"expiresAt": "2026-11-10T09:00:00.000Z",
"paidAt": null,
"createdAt": "2026-11-03T09:00:00.000Z",
"url": "https://www.autopayke.com/p/Kq7mZp2xA"
}
}