Payments API reference
Create, fetch and list payments.
Base URL https://api.gethephaestus.com. Authenticate every request with Authorization: Bearer hph_sk_…. Request and response bodies are JSON. Amounts are in naira (up to two decimals).
Create a payment
POST /v1/payments
| Field | Type | Description |
|---|---|---|
amount | number, required | Naira, for example 15000 or 2500.50. Must be a number, not a string. Minimum ₦100, maximum ₦5,000,000. |
reference | string, required | Your own id for this payment, 1–64 characters from A-Z a-z 0-9 . _ : -. Unique per payment. See idempotency below. |
fee_bearer | "merchant" | "customer" | Who pays the fees on this payment. Defaults to the setting in your dashboard. See Fees. |
customer_email | string | Shown in your dashboard and used for the receipt. |
customer_name | string | Up to 80 characters. |
description | string | Shown to the customer on the checkout, up to 140 characters. |
callback_url | string | Where the customer is sent after paying. Must be https://. |
metadata | object | Anything you want back on the payment and in webhooks, up to 2,000 characters. |
The payment object
{
"id": "pay_9wMFLD3rQRj0h5xOXO9VoH7b",
"reference": "order-1001",
"status": "succeeded",
"mode": "live",
"currency": "NGN",
"amount": 15000,
"fee_bearer": "customer",
"method": "bank_transfer",
"customer_pays": 15115.82,
"fees": { "processing": 105.82, "hephaestus": 10 },
"merchant_receives": 15000,
"customer": { "email": "buyer@example.com", "name": null },
"description": "Nike Air Max, size 43",
"metadata": { "cart": 7 },
"checkout_url": "https://pay.gethephaestus.com/pay/pay_9wMFLD3rQRj0h5xOXO9VoH7b",
"created_at": "2026-11-28T20:31:13.643Z",
"expires_at": "2026-11-29T20:31:13.643Z",
"paid_at": "2026-11-28T20:33:02.101Z"
}method, customer_pays, fees and merchant_receives are null until the customer chooses how to pay, because the fee depends on the method.
Statuses
| Status | Meaning |
|---|---|
pending | Waiting for the customer. A payment link is valid for 24 hours. Once the customer picks bank transfer, the account number is valid for 1 hour. |
succeeded | Paid and credited to your wallet (live) or simulated (test). |
expired | Nobody paid in time. Create a new payment. |
mismatch | The customer sent less than the amount due. Nothing is credited and we are alerted. Contact support with the payment id. Sending more still succeeds; you are credited the amount due. |
Retrieve a payment
GET /v1/payments/{id}. For a live payment that is still waiting, this also checks with the bank, so it is the safest way to confirm an outcome. A key only ever sees its own payments, and only in its own mode: test keys cannot see live payments.
List payments
GET /v1/payments?limit=20&reference=order-1001. Newest first, up to 100 per call. Returns { "data": [ … ] }.
Idempotency
reference makes creation safe to retry. Send the same reference with the same amount and fee_bearer and you get the original payment back (200 instead of 201) rather than a duplicate. Reusing a reference with different details returns 409 reference_reused.
Errors
Errors use standard HTTP status codes and a consistent body:
{ "error": { "code": "invalid_amount", "message": "`amount` must be a positive number in naira, for example 5000 or 2500.50." } }| HTTP | code | When |
|---|---|---|
| 400 | invalid_json, invalid_amount, invalid_reference, invalid_fee_bearer, invalid_email, invalid_callback_url, invalid_metadata | The request body failed validation. The message says which field. |
| 401 | missing_key, invalid_key | No key, a wrong or revoked key, or a live key before your business is approved. |
| 404 | not_found | No payment with that id for your key. |
| 409 | reference_reused | That reference exists with different details. |
| 429 | rate_limited | More than 120 requests a minute on one key. |