Skip to main content
The HubtelCheckoutConfiguration class is used to configure the checkout SDK with your merchant credentials and settings. This object is required to initialize the checkout flow and enables secure payment processing.

Overview

The configuration object contains your merchant identification details, API authentication key, and callback URL for payment notifications.

Properties

merchantID
String
required
Your unique merchant identifier provided by Hubtel. This ID is used to identify your business in the payment system.
merchantApiKey
String
required
Base64 encoded string of your merchant credentials (merchant ID and password). This key is used to authenticate API requests securely.
Keep your API key secure and never expose it in client-side code or version control systems.
callbackUrl
String
required
A URL provided by you to receive payment status notifications from the Hubtel payment API. This endpoint will be called when payment status changes occur.
Your callback URL should be able to handle POST requests from Hubtel’s servers to receive real-time payment updates.

Usage Example

Here’s how to create a configuration object for the checkout SDK:
import 'package:hubtel_merchant_checkout_sdk/hubtel_merchant_checkout_sdk.dart';

final hubtelConfig = HubtelCheckoutConfiguration(
  merchantApiKey: "QTN1akQ1SzpiM2IxMjA1NTEwZmI0NjYzYTdiY2ZmZmUyNmQ1YmIzZA==",
  merchantID: "1122334",
  callbackUrl: "https://your-domain.com/payment/callback",
);

Best Practices

Secure Storage

Store your merchant API key securely using environment variables or secure storage solutions, not hardcoded in your application.

Callback Endpoint

Ensure your callback URL is accessible from the internet and can handle webhook requests from Hubtel’s servers.

HTTPS Required

Use HTTPS for your callback URL to ensure secure transmission of payment status data.

Validation

Validate webhook signatures and verify payment status through Hubtel’s API before fulfilling orders.

Next Steps

After configuring the SDK, you’ll need to create a PurchaseInfo object with transaction details before launching the checkout flow.

Build docs developers (and LLMs) love