DocsApi
Back to docs

API Reference

REST API endpoints powered by Hyperswitch. All requests return JSON. Base URL: http://localhost:8081

GET/payments

List all payments with pagination.

Parameters

NameTypeDescription
limitintegerMax results (default 20, max 100)
starting_afterstringPayment ID to start after
GET/payments/{id}

Retrieve a single payment by ID.

POST/payments

Create a new payment intent.

Parameters

NameTypeDescription
amountintegerAmount in smallest currency unit (e.g. kobo)
currencystringNGN, USD, GHS, ZAR, or KES
confirmbooleanConfirm immediately
payment_methodstringcard, bank_transfer, ussd, mobile_money
POST/payments/{id}/refund

Refund a completed payment.

Parameters

NameTypeDescription
amountintegerPartial refund amount (optional, defaults to full)
GET/customers

List all customers.

Parameters

NameTypeDescription
limitintegerMax results (default 20)
starting_afterstringCustomer ID to start after
POST/customers

Create a new customer.

Parameters

NameTypeDescription
emailstringCustomer email
namestringCustomer name
phonestringCustomer phone
GET/customers/{id}

Retrieve a single customer.

GET/health

Health check endpoint.