Payments API

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

FieldTypeDescription
amountnumber, requiredNaira, for example 15000 or 2500.50. Must be a number, not a string. Minimum ₦100, maximum ₦5,000,000.
referencestring, requiredYour 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_emailstringShown in your dashboard and used for the receipt.
customer_namestringUp to 80 characters.
descriptionstringShown to the customer on the checkout, up to 140 characters.
callback_urlstringWhere the customer is sent after paying. Must be https://.
metadataobjectAnything you want back on the payment and in webhooks, up to 2,000 characters.

The payment object

payment
{
  "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

StatusMeaning
pendingWaiting 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.
succeededPaid and credited to your wallet (live) or simulated (test).
expiredNobody paid in time. Create a new payment.
mismatchThe 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:

400 Bad Request
{ "error": { "code": "invalid_amount", "message": "`amount` must be a positive number in naira, for example 5000 or 2500.50." } }
HTTPcodeWhen
400invalid_json, invalid_amount, invalid_reference, invalid_fee_bearer, invalid_email, invalid_callback_url, invalid_metadataThe request body failed validation. The message says which field.
401missing_key, invalid_keyNo key, a wrong or revoked key, or a live key before your business is approved.
404not_foundNo payment with that id for your key.
409reference_reusedThat reference exists with different details.
429rate_limitedMore than 120 requests a minute on one key.