PAY HERO DOCS
  • Introduction-Pay Hero Developer APIs
  • Creating Account
  • Authorization
  • GET: Service Wallet Balance
  • GET: Payments Wallet Balance
  • POST: Service Wallet Top Up
  • POST: Initiate MPESA STK Push Request
  • Payment Button
  • Lipwa Link
  • POST: Pay Hero Wallet- Withdraw To Mobile
  • GET: Account Transactions
  • GET: Transaction Status
  • WooCommerce Plugin
    • Plugin Installation
  • Shopify
  • Videos
  • Other Integrations
  • Email API Reference
    • Register SMTP
    • Send Email
    • Mail status
  • WhatsApp API Reference
    • Introduction
    • Getting Started
    • Send API Whats App Text
    • Bulk WhatsApp API Messaging
    • Bulk WhatsApp Using UI/CSV File
  • Payment Channels
    • Get PH Bank Paybills
    • Register Payment Channel
    • Get Payment Channels
Powered by GitBook
On this page
  • Get all bank paybills from Pay Hero
  • Sample Code-PHP

Was this helpful?

  1. Payment Channels

Get PH Bank Paybills

Get all Pay Hero Bank Paybills

This API will enable you to fetch all Pay Hero registered bank pay bills for your reference when registering payment channels

Get all bank paybills from Pay Hero

GET

https://backend.payhero.co.ke/api/v2/bank_paybills

Lists all bank Pay bills

Headers

Name
Value

Content-Type

application/json

Authorization

Basic <token>

Response

{
    "bank_paybills": [
        {
            "id": "a46b4e6f-350e-4816-88eb-16bdaea2a437",
            "name": "Rafiki Micro Finance",
            "paybill": "802200",
            "created_at": "2024-01-21T18:01:16.478031Z",
            "updated_at": "2024-01-21T18:01:16.478031Z"
        },
        {
            "id": "6b308233-64a4-4049-9441-7d75315cbbd0",
            "name": "Citi Bank",
            "paybill": "100229",
            "created_at": "2024-01-21T18:01:16.91431Z",
            "updated_at": "2024-01-21T18:01:16.914311Z"
        },
        {
            "id": "d75d5480-d141-491e-9d19-a1f7d22de0e5",
            "name": "Vision Fund Kenya",
            "paybill": "200555",
            "created_at": "2024-01-21T18:01:17.327272Z",
            "updated_at": "2024-01-21T18:01:17.327272Z"
        },
        {
            "id": "982715ae-579b-4d4f-a265-6f7dd431d191",
            "name": "Musoni Microfinance",
            "paybill": "514000",
            "created_at": "2024-01-21T18:01:17.827731Z",
            "updated_at": "2024-01-21T18:01:17.827731Z"
        },
        {
            "id": "e745b394-b8fa-481a-a27a-96fcc451dabc",
            "name": "Kenya Women Finance Trust (KWFT)",
            "paybill": "101200",
            "created_at": "2024-01-21T18:01:18.218895Z",
            "updated_at": "2024-01-21T18:01:18.218895Z"
        },
        {
            "id": "babeadb3-504d-4eb6-b22f-72a3afb88f7c",
            "name": "Guaranty Trust Bank",
            "paybill": "910200",
            "created_at": "2024-01-21T18:01:18.883176Z",
            "updated_at": "2024-01-21T18:01:18.883177Z"
        },
        {
            "id": "2523f869-2e5a-4457-af18-aa1473c6d136",
            "name": "Prime Bank",
            "paybill": "982800",
            "created_at": "2024-01-21T18:01:19.230764Z",
            "updated_at": "2024-01-21T18:01:19.230764Z"
        },
        {
            "id": "731dabeb-f57e-40db-a65b-7f1c9ce47a1d",
            "name": "Guardian Bank",
            "paybill": "344501",
            "created_at": "2024-01-21T18:01:19.59645Z",
            "updated_at": "2024-01-21T18:01:19.59645Z"
        },
        {
            "id": "7d0f5b94-dffe-4b84-8e1b-3fd640946e77",
            "name": "Bank of Africa (BOA)",
            "paybill": "972900",
            "created_at": "2024-01-21T18:01:20.229744Z",
            "updated_at": "2024-01-21T18:01:20.229744Z"
        },
        {
            "id": "eec37005-ba3e-411d-ae1a-1c16cc8f4ff3",
            "name": "Housing Finance Company Ltd",
            "paybill": "100400",
            "created_at": "2024-01-21T18:01:20.606219Z",
            "updated_at": "2024-01-21T18:01:20.606219Z"
        },
        {
            "id": "3242abf7-e2ba-45bf-989e-a7779e1678fe",
            "name": "Gulf African Bank",
            "paybill": "985050",
            "created_at": "2024-01-21T18:01:20.996277Z",
            "updated_at": "2024-01-21T18:01:20.996277Z"
        },
        {
            "id": "57b4c1bf-bbed-41bf-b2bb-690ff1a7e0c0",
            "name": "Post Office Savings Bank",
            "paybill": "200999",
            "created_at": "2024-01-21T18:01:21.548187Z",
            "updated_at": "2024-01-21T18:01:21.548187Z"
        },
        {
            "id": "2c52b5df-2805-47db-8a5a-87649fae5fe0",
            "name": "Transnational Bank",
            "paybill": "862862",
            "created_at": "2024-01-21T18:01:22.166499Z",
            "updated_at": "2024-01-21T18:01:22.166499Z"
        },
        {
            "id": "dc4ff42a-009a-4eeb-a306-70a71d63301b",
            "name": "Equatorial Commercial Bank",
            "paybill": "498100",
            "created_at": "2024-01-21T18:01:22.937067Z",
            "updated_at": "2024-01-21T18:01:22.937067Z"
        },
        {
            "id": "e814f0d5-9405-4354-988e-d280888d944b",
            "name": "Consolidated Bank LTD",
            "paybill": "508400",
            "created_at": "2024-01-21T18:01:23.276207Z",
            "updated_at": "2024-01-21T18:01:23.276207Z"
        },
        {
            "id": "987c34cb-8d5e-4802-b255-c56cd72db405",
            "name": "Credit Bank",
            "paybill": "972700",
            "created_at": "2024-01-21T18:01:23.653106Z",
            "updated_at": "2024-01-21T18:01:23.653106Z"
        },
        {
            "id": "3bdceda0-1969-43e0-bc79-4ea6c587312d",
            "name": "ABC Bank",
            "paybill": "111777",
            "created_at": "2024-01-21T18:01:24.14155Z",
            "updated_at": "2024-01-21T18:01:24.14155Z"
        },
        {
            "id": "fe54f0e6-8c39-42ef-8d0c-bfde69f16d45",
            "name": "IMPERIAL BANK LTD",
            "paybill": "800100",
            "created_at": "2024-01-21T18:01:24.50511Z",
            "updated_at": "2024-01-21T18:01:24.50511Z"
        },
        {
            "id": "aef4927e-d813-46af-bf60-d8a446d1999c",
            "name": "Ecobank",
            "paybill": "700201",
            "created_at": "2024-01-21T18:01:26.106882Z",
            "updated_at": "2024-01-21T18:01:26.106882Z"
        },
        {
            "id": "200b9110-bb32-4b11-970e-db73f9a8800f",
            "name": "Diamond Trust Bank (DTB)",
            "paybill": "516600",
            "created_at": "2024-01-21T18:01:26.836131Z",
            "updated_at": "2024-01-21T18:01:26.836131Z"
        },
        {
            "id": "a8b0c033-ed8e-4ae7-8099-58ed2325ee51",
            "name": "I & M Bank Limited",
            "paybill": "542542",
            "created_at": "2024-01-21T18:01:27.18593Z",
            "updated_at": "2024-01-21T18:01:27.18593Z"
        },
        {
            "id": "c1dca0ab-a668-4103-8783-6fc3a2918488",
            "name": "Chase Bank",
            "paybill": "552800",
            "created_at": "2024-01-21T18:01:27.513253Z",
            "updated_at": "2024-01-21T18:01:27.513253Z"
        },
        {
            "id": "a35b81d9-3f9f-4da5-ba99-5befad40bd29",
            "name": "National Bank",
            "paybill": "547700",
            "created_at": "2024-01-21T18:01:27.856389Z",
            "updated_at": "2024-01-21T18:01:27.856389Z"
        },
        {
            "id": "df0c499e-05fc-4089-80b0-9561cc6a7195",
            "name": "Stanbic Bank",
            "paybill": "600100",
            "created_at": "2024-01-21T18:01:28.560018Z",
            "updated_at": "2024-01-21T18:01:28.560018Z"
        },
        {
            "id": "7c37ce74-3172-48c5-a5dc-f0c6582248e9",
            "name": "Family Bank Ltd",
            "paybill": "222111",
            "created_at": "2024-01-21T18:01:29.153104Z",
            "updated_at": "2024-01-21T18:01:29.153104Z"
        },
        {
            "id": "8bba8d94-626f-42ae-bb0e-f59d0d5ce7de",
            "name": "NIC Bank Limited",
            "paybill": "488488",
            "created_at": "2024-01-21T18:01:29.808991Z",
            "updated_at": "2024-01-21T18:01:29.808991Z"
        },
        {
            "id": "6df322ca-6c44-4e8a-9855-0e86406ad855",
            "name": "ABSA Bank",
            "paybill": "303030",
            "created_at": "2024-01-21T18:01:30.155496Z",
            "updated_at": "2024-01-21T18:01:30.155496Z"
        },
        {
            "id": "9ddb2d15-a6b5-432f-b2f9-1cfff36eeec9",
            "name": "Standard Chartered Bank",
            "paybill": "329329",
            "created_at": "2024-01-21T18:01:30.615567Z",
            "updated_at": "2024-01-21T18:01:30.615567Z"
        },
        {
            "id": "6f266897-1906-4386-8cf9-bfa56bcdbe5a",
            "name": "Co-operative Bank",
            "paybill": "400200",
            "created_at": "2024-01-21T18:01:31.457347Z",
            "updated_at": "2024-01-21T18:01:31.457347Z"
        },
        {
            "id": "88e2ac7c-7661-43ca-a85f-560a6de2a27b",
            "name": "NCBA Bank",
            "paybill": "880100",
            "created_at": "2024-01-21T18:01:32.524503Z",
            "updated_at": "2024-01-21T18:01:32.524503Z"
        },
        {
            "id": "ce979c16-20c4-42bb-b517-4445a8013ced",
            "name": "KCB",
            "paybill": "522522",
            "created_at": "2024-01-21T18:01:33.308685Z",
            "updated_at": "2024-01-21T18:01:33.308685Z"
        },
        {
            "id": "362222f6-c1c6-47a4-8174-a9038939c0b8",
            "name": "Equity Bank",
            "paybill": "247247",
            "created_at": "2024-01-21T18:01:28.211541Z",
            "updated_at": "2024-01-21T18:01:28.211541Z"
        },
        {
            "id": "78241311-3ac4-41a5-8c70-ba3cf1f1c6d8",
            "name": "KINGDOM BANK",
            "paybill": "529901",
            "created_at": "2024-01-21T18:01:25.257909Z",
            "updated_at": "2024-01-21T18:01:25.257909Z"
        },
        {
            "id": "7582bc3c-a12e-44a9-b987-56cfbc68b5f5",
            "name": "OLLIN SAVINGS AND CREDIT SOCIETY LTD",
            "paybill": "480587",
            "created_at": "2024-11-11T10:43:46.957047Z",
            "updated_at": "2024-11-11T10:43:46.957047Z"
        },
        {
            "id": "150671f4-6404-4c7f-9904-569e33ebc79a",
            "name": "First Community Bank Limited",
            "paybill": "919700",
            "created_at": "2024-01-15T16:51:10.445487Z",
            "updated_at": "2024-01-15T16:51:10.445487Z"
        },
        {
            "id": "977b5190-2b0b-42ce-81d6-f5a9a0e27956",
            "name": "Mayfair Bank Limited",
            "paybill": "502800",
            "created_at": "2024-01-15T16:51:10.819793Z",
            "updated_at": "2024-01-15T16:51:10.819793Z"
        },
        {
            "id": "0101e17a-d06c-49cc-b8d2-ce2eab2fb711",
            "name": "Paramount Universal Bank Limited",
            "paybill": "888700",
            "created_at": "2024-01-15T16:51:11.61181Z",
            "updated_at": "2024-01-15T16:51:11.61181Z"
        },
        {
            "id": "64084abb-abb6-4454-b692-fe094bd78273",
            "name": "Habib Bank AG Zurich",
            "paybill": "787800",
            "created_at": "2024-01-15T16:51:12.099566Z",
            "updated_at": "2024-01-15T16:51:12.099566Z"
        },
        {
            "id": "153c3a3c-6192-4e36-b75b-98c01f8cac7f",
            "name": "Middle East Bank Kenya Limited",
            "paybill": "400800",
            "created_at": "2024-01-15T16:51:12.585487Z",
            "updated_at": "2024-01-15T16:51:12.585487Z"
        },
        {
            "id": "ff7c30cc-0f70-4a39-b127-f9d17840fd59",
            "name": "Spire Bank Limited",
            "paybill": "498400",
            "created_at": "2024-01-15T16:51:13.210044Z",
            "updated_at": "2024-01-15T16:51:13.210044Z"
        },
        {
            "id": "324223e0-dc62-4ef7-9720-6b2f4dcc3ca6",
            "name": "United Bank for Africa Limited",
            "paybill": "559900",
            "created_at": "2024-01-15T16:51:13.591617Z",
            "updated_at": "2024-01-15T16:51:13.591618Z"
        },
        {
            "id": "278ad5c6-32f7-4e26-9e86-77b439fbcf62",
            "name": "PARAMOUNT BANK",
            "paybill": "907950",
            "created_at": "2024-01-15T16:51:13.935624Z",
            "updated_at": "2024-01-15T16:51:13.935624Z"
        },
        {
            "id": "f8f6e054-18fa-4611-8375-793f62ec0e54",
            "name": "Lipa Na KCB",
            "paybill": "522533",
            "created_at": "2024-01-15T16:51:14.278073Z",
            "updated_at": "2024-01-15T16:51:14.278073Z"
        },
        {
            "id": "de4b1093-5bbf-4ad3-adf4-7148fdcd96bb",
            "name": "NCBA LOOP",
            "paybill": "714777",
            "created_at": "2024-01-15T16:51:14.680337Z",
            "updated_at": "2024-01-15T16:51:14.680337Z"
        },
        {
            "id": "69fc7fe6-f903-4e65-b184-84102245526b",
            "name": "MORIENTAL BANK LTD",
            "paybill": "986500",
            "created_at": "2024-01-15T16:51:15.110962Z",
            "updated_at": "2024-01-15T16:51:15.110962Z"
        },
        {
            "id": "49d5f83c-9795-462e-9704-b9b89e84e421",
            "name": "Uwezo Microfinance Bank",
            "paybill": "504600",
            "created_at": "2024-01-15T16:51:15.556123Z",
            "updated_at": "2024-01-15T16:51:15.556123Z"
        },
        {
            "id": "ca42ad28-7f59-48ef-a318-c82fb31b8afc",
            "name": "Faulu Microfinance Bank",
            "paybill": "328585",
            "created_at": "2024-01-15T16:51:16.212663Z",
            "updated_at": "2024-01-15T16:51:16.212663Z"
        },
        {
            "id": "0145fa28-3762-42bd-be39-ada56ed997ce",
            "name": "Sidian Bank",
            "paybill": "111999",
            "created_at": "2024-01-21T18:01:22.594776Z",
            "updated_at": "2024-01-21T18:01:22.594776Z"
        }
    ],
    "pagination": {
        "count": 48,
        "next_page": 2,
        "num_pages": 3,
        "page": 1,
        "per": 20,
        "prev_page": null
    }
}
{
  "error_message": "Invalid request"
}

Sample Code-PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://backend.payhero.co.ke/api/v2/bank_paybills',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic cm0VKVkNpTWVWREVOdEZzZDV5cg=='
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
PreviousBulk WhatsApp Using UI/CSV FileNextRegister Payment Channel

Last updated 2 days ago

Was this helpful?