Back to docs
API Reference
REST API endpoints powered by Hyperswitch. All requests return JSON. Base URL: http://localhost:8081
GET
/paymentsList all payments with pagination.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Max results (default 20, max 100) |
| starting_after | string | Payment ID to start after |
GET
/payments/{id}Retrieve a single payment by ID.
POST
/paymentsCreate a new payment intent.
Parameters
| Name | Type | Description |
|---|---|---|
| amount | integer | Amount in smallest currency unit (e.g. kobo) |
| currency | string | NGN, USD, GHS, ZAR, or KES |
| confirm | boolean | Confirm immediately |
| payment_method | string | card, bank_transfer, ussd, mobile_money |
POST
/payments/{id}/refundRefund a completed payment.
Parameters
| Name | Type | Description |
|---|---|---|
| amount | integer | Partial refund amount (optional, defaults to full) |
GET
/customersList all customers.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | integer | Max results (default 20) |
| starting_after | string | Customer ID to start after |
POST
/customersCreate a new customer.
Parameters
| Name | Type | Description |
|---|---|---|
| string | Customer email | |
| name | string | Customer name |
| phone | string | Customer phone |
GET
/customers/{id}Retrieve a single customer.
GET
/healthHealth check endpoint.