1. Merchant Checkout
Kutanapay Merchant API
  • Getting Started
  • Authentication
  • Use the API in your application
  • Webhooks
    • Webhooks Events
  • Merchant Checkout
    • Create checkout
      POST
    • List checkouts
      GET
    • Get checkout
      GET
    • Cancel checkout
      POST
    • Create checkout button embed session
      POST
  • Webhook Events
    • Checkout created
    • Checkout paid
    • Customer says they paid
    • Checkout approved
    • Checkout rejected
    • Checkout failed
    • Checkout timed out
    • Checkout expired
    • Checkout refunded
    • A second collection arrived
    • Test event
  • Schemas
    • RequestBodies
      • CheckoutEvent
    • DetailError
    • WebhookEnvelope
    • CheckoutEventData
  1. Merchant Checkout

Cancel checkout

POST
/api/v1/merchants/checkouts/{checkout_id}/cancel
Cancel a checkout while it is still pending. Paid or completed checkouts cannot be cancelled.

Request

Path Params

Header Params

Responses

🟢200
application/json
Successful Response
Bodyapplication/json

🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/merchants/checkouts//cancel' \
--header 'x-api-key: mk_a8Kp2mN9xQv7sL4wR1yT6uH3jF0cB5dE8gZ12'
Response Response Example
200 - Success
{
    "data": {
        "id": "c4e8b1a2-9f3d-4e7a-b6c5-1d2e3f4a5b6c",
        "payment_reference": "PAY-K7M2Q9X4",
        "checkout_url": "https://app.kutanaafrica.com/public/checkouts/PAY-K7M2Q9X4#token=9f3e2a1b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2",
        "amount": 150,
        "currency_code": "GHS",
        "status": "cancelled",
        "customer_email": "ama.mensah@acmecustomer.com",
        "customer_name": "Ama Mensah",
        "customer_phone": "+233241234567",
        "customer_phone_editable": false,
        "description": "Order #ORD-7842",
        "expires_at": "2026-03-27T12:30:00",
        "paid_at": null,
        "created_at": "2026-03-26T12:30:00"
    },
    "message": "Checkout cancelled",
    "status": "success"
}
Modified at 2026-10-03 13:08:06
Previous
Get checkout
Next
Create checkout button embed session
Built with