Payments API

Payments quickstart

Take a Naira payment on a checkout page that carries your business name.

The payments API lets your business collect money from customers on a hosted checkout page that shows your name. You create a payment on your server, send the customer to its checkout_url, and we tell you when it is paid. The money lands in your Hephaestus wallet and you withdraw it to your bank.

1. Get a merchant account

Sign up as a merchant, then submit your CAC details, director's ID and the bank account you want to be paid into. We review applications, usually within one working day. You can build against test mode straight away.

2. Create a test key

In API keys, create a hph_sk_test_… key. Keep it on your server. It is a secret and must never appear in a web page or mobile app.

3. Create a payment

terminal
curl https://api.gethephaestus.com/v1/payments \
  -H "Authorization: Bearer hph_sk_test_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{
    "amount": 15000,
    "reference": "order-1001",
    "customer_email": "buyer@example.com",
    "description": "Nike Air Max, size 43",
    "callback_url": "https://yourshop.com/thanks"
  }'

The response includes the checkout_url:

201 Created
{
  "id": "pay_9wMFLD3rQRj0h5xOXO9VoH7b",
  "reference": "order-1001",
  "status": "pending",
  "mode": "test",
  "currency": "NGN",
  "amount": 15000,
  "fee_bearer": "merchant",
  "checkout_url": "https://pay.gethephaestus.com/pay/pay_9wMFLD3rQRj0h5xOXO9VoH7b",
  "expires_at": "2026-11-29T20:31:13.643Z",
  "paid_at": null
}

4. Send the customer to the checkout

Redirect them to checkout_url. They see your business name and the amount, choose bank transfer, and get a one-time account number to pay into. In test mode the page has a Simulate customer payment button, so you can complete the flow without real money.

5. Confirm the payment

When the customer pays, we send your server a signed payment.succeeded webhook. We also send the customer back to your callback_url with ?payment_id=…&reference=…&status=…. Do not trust those query parameters. Anyone can type a URL. Fetch the payment with your secret key and check its status before you ship anything:

terminal
curl https://api.gethephaestus.com/v1/payments/pay_9wMFLD3rQRj0h5xOXO9VoH7b \
  -H "Authorization: Bearer hph_sk_test_YOUR_KEY"
Payments quickstart: Hephaestus docs