To get your Live credentials (apiuser
, apikey
), you need to create a service in your Fapshi dashboard. Here’s how:
fapshi.com
itself).apiuser
and apikey
for that service will be displayed. Copy these carefully. They are sensitive, especially the apikey
. ⚠️ Note: In Live mode, the payout/disbursement function may be off by default. You might need to contact Fapshi support to activate it once you’ve tested in the sandbox and are ready.
When you're ready to go live — i.e. start processing real payments via Fapshi instead of just testing — you need to make a few changes. These are the steps:
What you must do | Details |
---|---|
1. Replace your API credentials | Use the Live apiuser and apikey instead of the sandbox/test ones. You can find these on the developers tab when you create a service. |
2. Switch your base URL | Change the base URL in your code/config from https://sandbox.fapshi.com to https://live.fapshi.com. |
3. Double-check everything else | Make sure your configuration (webhooks, callback URLs, etc.) and options are correct for production; make sure you’re using real credentials and that your account is activated. |
Once those changes are made, your integration should be running in “live mode” — real transactions, real money, etc.
The Fapshi API offers two powerful methods for collecting payments: Direct Pay and Initiate Pay. Each serves distinct use cases, balancing control, ease of integration, and user experience. This article breaks down the differences, benefits, and ideal scenarios for using Direct Pay and Initiate Pay, helping you choose the right approach for your application. Whether you're building a custom payment flow or need a quick solution, Fapshi's API has you covered. For more details, check the official Fapshi API documentation.
Direct Pay allows developers to initiate payments directly from a user's mobile wallet without redirecting them to an external page. With this method, you have full control over the payment form and user experience, building a seamless checkout process within your application. However, this comes with the responsibility of handling validations, user input, and the payment flow on your end. The Fapshi backend processes the transaction, ensuring security and reliability, while you manage the front-end experience.
apiuser
and apikey
for authentication.transId
(transaction ID) with a status code of 200 for successful requests or a 4XX code with an error message for failures.transId
to check the transaction status (SUCCESSFUL or FAILED) via the API or receive updates through a configured webhook.Note: Direct Pay transactions do not expire, and their final state is either SUCCESSFUL or FAILED. Ensure secure handling of credentials, as misuse may lead to account suspension per Fapshi's Terms & Conditions.
Initiate Pay simplifies the payment process by providing a prebuilt, Fapshi-hosted checkout page. Users are redirected to this page to complete their payment, and Fapshi handles the entire payment flow, including validations and user prompts. This method is ideal for developers who want a quick, low-effort integration without building a custom payment interface.
transId
.Note: Like Direct Pay, Initiate Pay transactions are processed securely, and you must protect your API credentials to avoid misuse.
Both methods leverage Fapshi's robust backend for secure payment processing, but they differ in control, complexity, and integration effort. Here's a detailed comparison:
Feature | Initiate Pay | Direct Pay |
---|---|---|
Checkout Experience | Fapshi-hosted checkout page | Fully customized, in-app/website |
Integration Effort | Low (use prebuilt payment link) | High (build and manage payment form) |
User Flow | Redirect to Fapshi's checkout page | No redirects, seamless in-app |
Customization | Limited to Fapshi's design | Complete control over UI/UX |
Responsibility | Fapshi handles validations and flow | Developer handles validations and flow |
Setup Time | Quick (minimal coding needed) | Longer (requires custom development) |
Transaction Status | SUCCESSFUL, FAILED, PENDING, EXPIRED via webhook/API | SUCCESSFUL or FAILED, checked via API |
Choosing between Direct Pay and Initiate Pay depends on your application's needs, development resources, and desired user experience. The table below outlines the best scenarios for each method:
Scenario | Best Method | Why |
---|---|---|
E-commerce with branded checkout | Direct Pay | Seamlessly integrates payments into your website or app, matching your brand. |
In-app purchases | Direct Pay | Keeps users in the app, enhancing UX and reducing drop-off rates. |
Complex payment flows | Direct Pay | Allows custom validations and logic for unique business requirements. |
Quick setup for startups | Initiate Pay | Minimal development needed, ideal for rapid deployment. |
Low-budget projects | Initiate Pay | Reduces development costs by using Fapshi's prebuilt checkout page. |
Temporary payment campaigns | Initiate Pay | Easy to set up payment links for short-term or one-off campaigns. |
High-volume, low-customization | Initiate Pay | Efficient for businesses prioritizing speed over custom design. |
Pros:
Cons:
Pros:
Cons:
To implement either method, start by reviewing the Preliminary Knowledge section in the Fapshi API documentation. Ensure you have your apiuser
and apikey
ready for authentication, and test in the sandbox environment before going live. For Direct Pay, focus on building a secure, user-friendly payment form, and for Initiate Pay, generate and test payment links. If you encounter issues, contact support@fapshi.com or join the Fapshi Slack developer community for assistance.
Direct Pay and Initiate Pay cater to different needs in the payment integration spectrum. Direct Pay is best for developers who prioritise a tailored, in-app payment experience and have the resources to build and manage a custom checkout flow. Initiate Pay is perfect for those seeking a fast, low-effort solution with a prebuilt checkout page. By understanding your business requirements—such as customisation, development time, and user experience—you can choose the method that best aligns with your goals. Explore the Fapshi API documentation to dive deeper and start integrating today.
Direct Pay lets you collect payments directly on your platform with the Fapshi API. To activate it for live transactions, you must apply through Fapshi Support.
Before applying, you must first implement Direct Pay in Sandbox mode on your platform and ensure it works correctly. This is required to demonstrate your integration before activation in live mode.
To request Direct Pay activation, send an email to support@fapshi.com with the following details:
2. Description of your platform
3. Platform type
4. Sandbox testing
5. Reason for choosing Direct Pay
6. Provide the Live API User ONLY of your collections service. NEVER SHARE YOUR LIVE API KEY!
✅ Once your request is reviewed and approved, Fapshi Support will activate Direct Pay for your account in live mode, allowing you to process real payments.