Howfar Developers

Payments and account opening in one API.

Take card, bank transfer and USSD payments, check NIN, BVN, passport, CAC and address records, and open customer accounts with KYC tiers modelled on the CBN's. Get sandbox keys in seconds, no sales call needed.

  • REST + JSONOne base URL, Bearer keys
  • Sandbox → liveSame code, swap the key
  • Signed webhooksHMAC-SHA256, automatic retries

Create your sandbox account

Test keys never move real money or query real records.

What you can build

Every check goes to the official record holder through Howfar's licensed provider partners.

Payments

A hosted payment page for card (with 3-D Secure), bank transfer and USSD. Refunds, partial refunds and idempotency keys included.

NIN · NIMC

Match a customer's name and date of birth against their National Identification Number record.

BVN · NIBSS

Validate a Bank Verification Number with per-field match scores, without pulling the full record.

Passport · Immigration

Check a Nigerian international passport against the Nigeria Immigration Service record, including expiry.

Address

A field agent visits the address and the result arrives by webhook. You need this for tier 3 accounts.

CAC · business

Confirm a company's name and registration status with its RC number, for onboarding merchants.

About eNaira and NIPOST: the CBN offers no public merchant API for eNaira, and NIPOST has no public address-verification API. Customers pay by card, bank transfer or USSD instead, and addresses are confirmed by field agents. If the CBN opens an eNaira merchant channel, we'll add it as a payment method without changes to your code.

Quickstart

The base URL is https://www.howfar.com.ng/api/v1. Authenticate every request with your secret key as a Bearer token. Keep that key on your server and never put it in a browser or mobile app.

1Create a payment

Amounts are in the smallest currency unit, so ₦45,000 is 4500000 kobo. Sending the same Idempotency-Key twice returns the first payment instead of creating a second one.

curl https://www.howfar.com.ng/api/v1/payment_intents \
  -H "Authorization: Bearer sk_test_your_key" \
  -H "Idempotency-Key: order-1042" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 4500000,
    "currency": "NGN",
    "description": "Air Kola sneakers",
    "customer": { "email": "ada@example.com", "name": "Ada Obi" },
    "return_url": "https://yourshop.ng/orders/1042"
  }'
{
  "id": "pi_8Hk2mQ...",
  "object": "payment_intent",
  "status": "requires_payment_method",
  "amount": 4500000,
  "currency": "NGN",
  "checkout_url": "https://www.howfar.com.ng/sandbox-checkout?pi=pi_8Hk2mQ...",
  "livemode": false
}

2Send the customer to checkout_url

They pay by card, bank transfer or USSD. Afterwards we send them back to your return_url with ?payment_intent=pi_...&status=succeeded. Don't fulfil an order from that redirect, because anyone can change a URL. Rely on the webhook or fetch the payment from your server instead.

3Confirm it on your server

curl https://www.howfar.com.ng/api/v1/payment_intents/pi_8Hk2mQ... \
  -H "Authorization: Bearer sk_test_your_key"

Account opening and KYC

Create a customer, then run identity checks against them. Each successful check can raise the customer's KYC tier, and every result also arrives as a webhook.

Tier 1NIN or BVN verified
Tier 2NIN and BVN verified
Tier 3Tier 2 plus verified address

Howfar's tiers are modelled on the CBN's three-tier KYC framework. Your own transaction and balance limits per tier are set by your compliance team.

# 1. Create the customer
curl https://www.howfar.com.ng/api/v1/customers \
  -H "Authorization: Bearer sk_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "first_name": "John", "last_name": "Musa",
        "date_of_birth": "1982-01-01", "phone": "08012345678" }'

# 2. Verify their NIN (names and date of birth come from the customer)
curl https://www.howfar.com.ng/api/v1/verifications \
  -H "Authorization: Bearer sk_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "type": "nin", "customer": "cus_...", "nin": "70123456789" }'
{
  "id": "ver_Qd81...",
  "object": "verification",
  "type": "nin",
  "status": "verified",
  "id_number": "*******6789",
  "source": "NIMC",
  "match": { "first_name": true, "last_name": true, "date_of_birth": true }
}
typeRecord sourceRequired fieldsResult
ninNIMCninInstant
bvnNIBSSbvn, first_name, last_nameInstant
passportNigeria Immigration Servicepassport_number, last_nameInstant
addressField agent visitfirst_name, last_name, phone, street, lga, stateStarts as pending, finishes by webhook
cacCorporate Affairs Commissionrc_number, company_typeInstant

When you pass customer, any name, date of birth or phone you leave out comes from that customer. We keep only the match results and the basic record fields. Photos and phone numbers from government records are never stored or returned.

Webhooks

Set your endpoint once with POST /v1/account and {"webhook_url": "https://..."}. Every event is signed with your webhook signing secret. If your endpoint doesn't answer with a 2xx status, we retry with backoff for about two days.

payment_intent.succeededThe customer paid the full amount.
payment_intent.failedThe payment was declined or the amount didn't match.
refund.createdA refund was sent to the provider.
verification.verified · .mismatch · .not_found · .pending · .failedAn identity check finished or changed state.
customer.kyc_tier_updatedA customer moved to a new KYC tier.
import crypto from "node:crypto";

// Express: app.post("/webhooks/howfar", express.raw({ type: "application/json" }), handler)
function verifyHowfar(rawBody, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}

const ok = verifyHowfar(req.body, req.get("Howfar-Signature"), process.env.HOWFAR_WEBHOOK_SECRET);

API reference

Payments
POST/v1/payment_intentsCreate a payment and get its checkout_url. Fields: amount, currency, customer.email, plus optional customer.name, description, return_url and metadata.
GET/v1/payment_intents/:idGet the latest status of a payment.
GET/v1/payment_intentsList recent payments. Optional ?status= and ?limit= (up to 100).
POST/v1/payment_intents/:id/cancelCancel a payment the customer hasn't paid yet.
POST/v1/refundsRefund a payment in full or in part: payment_intent, optional amount.
Account opening
POST/v1/customersCreate a customer: first_name, last_name, optional middle_name, date_of_birth, email, phone and metadata.
GET/v1/customers/:idGet a customer with their KYC tier and every check run on them.
GET/v1/customersList customers.
POST/v1/verificationsRun an identity check. Pass a type and its required fields, plus an optional customer.
GET/v1/verifications/:idGet a check. For a pending address check, this also fetches the latest status.
Your account
GET/v1/accountYour business details, live access status and the mode of the key you used.
POST/v1/accountUpdate webhook_url or business_name.
POST/v1/account/keysRoll a key: send {"mode": "test"} or {"mode": "live"} to get a new key. The old key for that mode stops working immediately.
GET/v1/account/webhook_secretGet your webhook signing secret.
POST/v1/account/go_liveApply for live access with your business details (see Go live).
Events
GET/v1/eventsRecent webhook events and their delivery status.
POST/v1/events/:id/resendSend an event again.
POST/v1/webhooks/testSend a signed ping event to your endpoint.

Test data

With a sk_test_ key, nothing is charged and no real records are looked up. Test responses include "livemode": false, and identity checks answered by Howfar's built-in simulator are also marked "simulated": true. Use these values:

NIN70123456789, which returns John Doe Musa, born 1982-01-01
BVN22222222222 with first_name John and last_name Musa
PassportA00400000 with last_name Musa
CAC1261103 or 14320749 with company_type COMPANY
AddressAny address. The check starts as pending and is marked verified about 30 seconds later.
Any other numberReturns not_found, so you can test that path too.
PaymentsThe test payment page has a button to pay and another to simulate a declined payment. If it shows Flutterwave's test page instead, use card 5531 8866 5214 2950, CVV 564, expiry 09/32, PIN 3310 and OTP 12345.

Errors

Errors use standard HTTP status codes and come back in the same format every time:

{ "error": { "code": "parameter_missing", "message": "customer.email is required.", "param": "customer.email" } }
400Something in the request is missing or invalid. param names the field.
401 / 403The key is missing, wrong or has been rolled, or live access isn't enabled yet.
404The object doesn't exist, or it belongs to the other mode (test or live).
409The action doesn't fit the object's current state, for example refunding an unpaid payment.
429Too many requests. Wait a moment and retry.
502 / 503A provider or government record source isn't responding. It's safe to retry, and with an Idempotency-Key you'll never create a duplicate payment.

Go live

  1. Build and test in sandbox with your sk_test_ key.
  2. Submit your business details with your test key.
    curl https://www.howfar.com.ng/api/v1/account/go_live \
      -H "Authorization: Bearer sk_test_your_key" \
      -H "Content-Type: application/json" \
      -d '{ "rc_number": "RC1234567", "company_type": "COMPANY",
            "director_name": "Ada Obi", "website": "https://yourshop.ng" }'
  3. We check your CAC record and review your application within 2 working days, then email you.
  4. Create your live key with POST /v1/account/keys and {"mode": "live"}, then swap it into your server. Your code doesn't change.

Questions? Email support@howfar.com.ng.