Payment Channels
Payment channels allow you to connect with different payment providers through a single interface, giving your customers more payment options.
Supported Payment Providers
Kipay currently supports the following payment providers:
Paystack
A popular payment provider focusing on African markets, particularly Nigeria, Ghana, and Kenya.
Visit WebsiteFlutterwave
A comprehensive payment solution for businesses in Africa with support for multiple payment methods.
Visit WebsiteM-Pesa
Kenya's leading mobile money service, providing seamless digital payments across East Africa.
Visit WebsiteStripe
A global payment processor supporting businesses in over 40 countries with extensive payment options.
Visit WebsiteSetting Up Payment Channels
- First, sign up with your preferred payment provider(s) and obtain API keys
- In the Kipay admin dashboard, go to Payment Channels
- Click Add New Channel
- Fill in the required information for your chosen provider
- Save the channel
Paystack Configuration
To set up a Paystack payment channel, you'll need the following information:
Field | Description | Required |
---|---|---|
Public Key | Your Paystack public key (starts with pk_) | Yes |
Secret Key | Your Paystack secret key (starts with sk_) | Yes |
Test Mode | Enable if you're using test API keys | No |
Webhook URL | URL for receiving webhooks (auto-generated) | No |
You can find your Paystack API keys in the Paystack Dashboard under Settings > API Keys & Webhooks.
Flutterwave Configuration
To set up a Flutterwave payment channel, you'll need:
Field | Description | Required |
---|---|---|
Public Key | Your Flutterwave public key | Yes |
Secret Key | Your Flutterwave secret key | Yes |
Encryption Key | Your Flutterwave encryption key | Yes |
Test Mode | Enable if you're using test API keys | No |
You can find your Flutterwave API keys in the Flutterwave Dashboard under Settings > API.
M-Pesa Configuration
To set up an M-Pesa payment channel, you'll need the following information:
Field | Description | Required |
---|---|---|
Consumer Key | Your M-Pesa API Consumer Key | Yes |
Consumer Secret | Your M-Pesa API Consumer Secret | Yes |
Shortcode | Your M-Pesa Business Shortcode | Yes |
Passkey | Your M-Pesa Passkey for STK Push | Yes |
Sandbox Mode | Enable for testing with M-Pesa sandbox environment | No |
Initiator Name | Name of the initiator for C2B transactions (optional) | No |
Initiator Password | Password for the initiator (optional) | No |
You can obtain these credentials from the Safaricom Developer Portal after registering your application.
Stripe Configuration
To set up a Stripe payment channel, you'll need:
Field | Description | Required |
---|---|---|
Publishable Key | Your Stripe publishable key (starts with pk_) | Yes |
Secret Key | Your Stripe secret key (starts with sk_) | Yes |
Webhook Secret | Your Stripe webhook signing secret | No |
You can find your Stripe API keys in the Stripe Dashboard under Developers > API keys.
Managing Payment Channels
Setting a Default Channel
You can set one payment channel as the default, which will be used when no specific channel is selected for a transaction:
- Go to Payment Channels in the admin dashboard
- Find the channel you want to set as default
- Click the Set as Default button
Activating/Deactivating Channels
You can activate or deactivate payment channels as needed:
- Go to Payment Channels in the admin dashboard
- Find the channel you want to activate/deactivate
- Toggle the Active switch
- Save your changes
Deleting Channels
You can delete a payment channel if it's no longer needed:
- Go to Payment Channels in the admin dashboard
- Find the channel you want to delete
- Click the Delete button
- Confirm the deletion
Fee Configuration
You can configure transaction fees for each payment channel:
Fee Types
- Fixed Fee: A fixed amount charged per transaction
- Percentage Fee: A percentage of the transaction amount
- Fee Cap: The maximum fee that can be charged for a transaction
You can configure who pays the fees:
- Customer pays fees: Fees are added to the customer's total
- Merchant pays fees: Fees are deducted from the received amount
Using Payment Channels in the API
When initializing a transaction via the API, you can specify which payment channel to use:
{
"amount": 10000,
"email": "[email protected]",
"payment_channel_id": 1, // Specify the channel ID here
"description": "Payment for Order #12345",
"currency": "KSH"
}
If you don't specify a payment channel, the default channel will be used.
Channel-Specific Features
Paystack
- Card Payments: Accept payments via credit/debit cards
- Bank Transfers: Receive payments via bank transfers
- USSD: Accept payments via USSD
- QR Codes: Generate QR codes for payments
- Recurring Billing: Set up subscription payments
Flutterwave
- Card Payments: Accept payments via credit/debit cards
- Mobile Money: Accept payments via mobile money services
- Bank Transfers: Receive payments via bank transfers
- USSD: Accept payments via USSD
- Mpesa: Accept payments via Mpesa
M-Pesa
- STK Push: Initiate payment requests directly to customer's mobile phone
- C2B Payments: Accept customer-to-business payments via mobile money
- Transaction Validation: Validate and confirm incoming payments
- Sandbox Testing: Test integration in a safe development environment
Stripe
- Card Payments: Accept payments via credit/debit cards
- Bank Transfers: Receive payments via bank transfers
- Wallets: Accept payments via Apple Pay, Google Pay, etc.
- Recurring Billing: Set up subscription payments
Best Practices
- Use Multiple Channels: Set up multiple payment channels to provide more options to your customers
- Test Thoroughly: Always test your payment channels in test mode before going live
- Monitor Transactions: Regularly check your transaction logs to ensure everything is working correctly
- Keep API Keys Secure: Never share your API keys or include them in client-side code
- Set Up Webhooks: Configure webhooks to receive real-time updates about transaction statuses