Everything you need to accept payments
From payment creation to verification, Harpoon handles the complexity so you can focus on building.
Payment Verification API
Verify MoMo payments programmatically. Create payment requests, check status, and verify transactions via REST API.
HPN Code System
Generate unique reference codes that automatically verify payments for orders. No manual reconciliation needed.
Real-time Webhooks
Receive instant notifications when payments are verified. Configure endpoints with automatic retry and signature verification.
Multi-Number Support
Accept payments on multiple MoMo lines. Aggregate all payment notifications into a single webhook endpoint.
Transaction Parsing
Automatic extraction from MTN MoMo, Telecel Cash, and AT Money. Amount, sender, reference, balance - all structured JSON.
Secure API Keys
Scoped API keys with granular permissions. IP whitelisting, rate limiting, and audit logs for enterprise security.
Accept payments in 3 API calls
Create a payment request, customer pays, webhook verifies. That's it.
Create Payment
POST /v1/transactions/initialize
{"amount": "150.00",
"phone_number": "0244123456",
"description": "Order #1234",
"webhook_url": "https://..."}Returns HPN code and checkout URL for your customer.
Customer Pays
Send to: 024 XXX XXXX
Reference: KXRT5M2P
Customer sends MoMo to your number with the HPN code as reference.
Webhook Fires
// Your webhook receives:
{"event": "transaction.completed",
"data": {
"hpn_code": "KXRT5M2P",
"actual_amount": "150.00",
"status": "SUCCESS"
}
}Harpoon verifies and sends webhook. Fulfill the order.
Real-time payment notifications
Configure a webhook URL and receive instant notifications when payments are verified. Each payload includes amount, sender, reference, and transaction details.
from flask import Flask, request
import hmac
app = Flask(__name__)
@app.route('/webhook/payment', methods=['POST'])
def handle_payment():
# Verify signature
signature = request.headers.get('X-Harpoon-Signature')
if not verify_signature(request.data, signature):
return {'error': 'Invalid signature'}, 401
data = request.json
if data['event'] == 'transaction.completed':
hpn_code = data['data']['hpn_code']
amount = data['data']['actual_amount']
# Update your order
order = Order.find_by_hpn_code(hpn_code)
order.mark_as_paid(amount)
return {'status': 'ok'}Full payment API
Create payments, check status, query transactions, and manage your integration programmatically.
# Create a payment request
POST /v1/transactions/initialize
Authorization: Bearer hpn_live_sk_xxx
# Get payment status
GET /v1/transactions/{reference}
# List recent payments
GET /v1/transactions?status=SUCCESS&per_page=50
# Manual reconciliation with SMS text
POST /v1/transactions/{reference}/reconcile
# Webhook management
GET /v1/webhooks
POST /v1/webhooks
DEL /v1/webhooks/{id}{
"success": true,
"data": {
"reference": "ref_abc123xyz789",
"hpn_code": "KXRT5M2PA3",
"amount": "150.00",
"currency": "GHS",
"status": "PENDING",
"expires_at": "2024-01-09T12:00:00Z",
"checkout_url": "https://harpoonsms.com/pay/KXRT5M2PA3",
"payer_sms_sent": true
}
}What developers are building
E-commerce Checkout
Generate HPN code at checkout, customer pays with reference, webhook verifies payment, order ships automatically.
Subscription Billing
Send payment links for recurring billing. Track payment status and activate subscriptions via webhook.
Invoice Payments
Embed payment links in invoices. Auto-reconcile when customers pay and update your accounting system.
POS Integration
Integrate Harpoon into your point-of-sale system. Verify payments in real-time before completing sales.
SDKs for your stack
Python, JavaScript/TypeScript, and PHP SDKs are in development. Join the waitlist to get early access.
Ready to integrate?
Create an account to get your API keys. Start accepting payments with zero transaction fees.