HwebPay Logo
HwebPay
Docs Accept Payments

Accept Payments

HwebPay provides multiple ways to accept payments from your customers. Whether you need a full redirect experience, a seamless inline popup, or a purely programmatic virtual account generation, we have you covered.

Backend Integration

Securely initialize payments from your server using your Secret Key. Receive a JSON response with a checkout URL.

POST /transactions/initialize

Simple Link (No-Code)

Create payment links or use simple HTML forms using your Public Key. Auto-redirects to checkout.

GET/POST /transactions/initialize-public

Frontend (Inline)

Enable checkout directly on your site with our JavaScript library using your Public Key. No redirect required.

View Inline Docs

Initialization Payload (Server-to-Server)

All amounts must be passed in KOBO (e.g., ₦100.00 = 10000).

Parameter Required Description
amount YES Transaction amount in kobo. Minimum is ₦1.00 (100).
email YES Customer's valid email address for receipting.
name YES Legal name of the customer.
callback_url - The URL we should redirect the user to after payment.
split_code - Marketplace split code for automated fund distribution.

Example Implementation (cURL)

curl -X POST https://api.hwebpay.com/api/v1/transactions/initialize \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
  "amount": 500000,
  "email": "dev@hwebpay.com",
  "name": "John Builder",
  "callback_url": "https://yoursite.com/success"
}'

No-Code Implementation (HTML Form)

<form action="https://api.hwebpay.com/api/v1/transactions/initialize-public" method="POST">
  <input type="hidden" name="key" value="pk_live_..."/>
  <input type="hidden" name="amount" value="500000"/> <!-- 5000 in KOBO -->
  <input type="email" name="email" placeholder="Customer Email" required/>
  <button type="submit">Pay Now</button>
</form>

// Or simply use a direct link (GET request):
https://api.hwebpay.com/api/v1/transactions/initialize-public?key=pk_live_...&email=user@example.com&amount=500000

Response Logic

The API will return an authorization_url. You should redirect your user to this URL to complete the bank transfer or card payment. Once paid, we will redirect back to your callback_url with a reference query parameter.

© 2026 HwebPay Docs Portal

Developer Community