Documentation
Comprehensive guides and resources to help you integrate and use our payment gateway.
Overview
Our documentation provides everything you need to integrate our payment gateway, including step-by-step guides, API references, and code examples. Whether you're setting up your account or building a custom checkout experience, we've got you covered.
Getting Started
Learn how to set up your account, complete KYC, and start processing payments.
Learn moreAPI Reference
Explore our RESTful API endpoints, request parameters, and response formats.
View API docsIntegration Guides
Step-by-step guides for integrating with popular platforms and frameworks.
Explore guidesGetting Started
1. Create an Account
Sign up for an account on our platform. Provide basic information about your business to begin the onboarding process.
2. Complete KYC Verification
Upload required KYC documents, such as business registration certificates and identification documents. Our team will review and approve your account upon verification.
3. Configure Payment Providers
Select payment providers (CyberSource, MPGS) and configure settings in your merchant dashboard. Contact our support team for assistance if needed.
4. Generate API Keys
Generate API keys from your merchant dashboard to authenticate requests to our payment gateway API. Keep these keys secure and never share them publicly.
// Example API key and secret X-Api-Key: abc123def456ghi789 X-Api-Secret: xyz987uvw654rst321
5. Integrate with Your Application
Use our API to integrate payment processing into your application. Choose our hosted checkout solution or build a custom checkout experience.
curl -X POST \ https://api.example.com/v1/payments/initialize \ -H 'Content-Type: application/json' \ -H 'X-Api-Key: your_api_key' \ -H 'X-Api-Secret: your_api_secret' \ -d '{ "order_id": "ORD-12345", "amount": 100.00, "currency": "USD", "payment_provider": "cybersource", "customer_email": "customer@example.com", "return_url": "https://your-website.com/success", "cancel_url": "https://your-website.com/cancel" }'
Integration Guides
PHP Integration
Integrate our payment gateway into your PHP application with this example:
<?php function initializePayment($orderDetails) { $apiKey = 'your_api_key'; $apiSecret = 'your_api_secret'; $data = [ 'order_id' => $orderDetails['order_id'], 'amount' => $orderDetails['amount'], 'currency' => $orderDetails['currency'], 'payment_provider' => 'cybersource', 'customer_email' => $orderDetails['customer_email'], 'return_url' => 'https://your-website.com/success', 'cancel_url' => 'https://your-website.com/cancel' ]; $ch = curl_init('https://api.example.com/v1/payments/initialize'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'X-Api-Key: ' . $apiKey, 'X-Api-Secret: ' . $apiSecret ]); $response = curl_exec($ch); curl_close($ch); return json_decode($response, true); } // Example usage $orderDetails = [ 'order_id' => 'ORD-' . time(), 'amount' => 100.00, 'currency' => 'USD', 'customer_email' => 'customer@example.com' ]; $paymentResponse = initializePayment($orderDetails); if ($paymentResponse['success']) { header('Location: ' . $paymentResponse['redirect_url']); exit; } else { echo 'Payment initialization failed: ' . $paymentResponse['message']; } ?>
Handling Payment Callbacks
Handle payment callbacks to verify payment status after the customer completes the payment process:
<?php function checkPaymentStatus($referenceId) { $apiKey = 'your_api_key'; $apiSecret = 'your_api_secret'; $ch = curl_init('https://api.example.com/v1/payments/' . $referenceId . '/status'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-Api-Key: ' . $apiKey, 'X-Api-Secret: ' . $apiSecret ]); $response = curl_exec($ch); curl_close($ch); return json_decode($response, true); } // Example callback handler $referenceId = $_GET['reference']; $paymentStatus = checkPaymentStatus($referenceId); if ($paymentStatus['success'] && $paymentStatus['data']['status'] === 'completed') { updateOrder($referenceId, 'paid'); showSuccessPage(); } else { showErrorPage($paymentStatus['message']); } ?>