Secure, efficient slip upload integration for your website / application
The Ma-App Slip Upload Gateway enables businesses to securely upload bank receipt/bill images to the Ma-App platform with automatic price extraction using OCR.
End-to-end encrypted bill uploads with Public ID authentication
Advanced OCR technology extracts prices and totals automatically
Simple integration with just a few lines of code
Before integrating, ensure you have:
seejeewwc_AfLoFBV*
)Create a link that redirects users to the gateway:
<a href="https://maapp.app/gateway_file.php?public_id=YOUR_PUBLIC_ID&business_type=office&return_url=https://yourdomain.com/return">
Upload Slip to MaApp
</a>
Replace:
YOUR_PUBLIC_ID
→ Your Public IDoffice
→ Your business typehttps://yourdomain.com/return
→ Your return URLFor better security, use PHP to handle the redirect:
<?php
// Configuration (store securely)
$public_id = "sujsrc_AJHHHHU"; // Your Public ID
$business_type = "office"; // Your business type
$return_url = "https://yourdomain.com/return";
// Validate business type
$allowed_business_types = [
'shop', 'cafe', 'office', 'boat', 'speedboat', 'otherbusiness',
'wholesale', 'takeawaybakery', 'construction', 'institute', 'council', 'roomrent'
];
if (!in_array($business_type, $allowed_business_types)) {
die("Invalid business type");
}
// Encode URL parameters
$encoded_public_id = urlencode($public_id);
$encoded_business_type = urlencode($business_type);
$encoded_return_url = urlencode($return_url);
// Build gateway URL
$gateway_url = "https://maapp.app/gateway_file.php?public_id={$encoded_public_id}&business_type={$encoded_business_type}&return_url={$encoded_return_url}";
// Redirect to gateway
header("Location: {$gateway_url}");
exit;
?>
Key Features:
The following business types are accepted:
After upload, users are redirected to your return_url
with a status:
https://yourdomain.com/return?status=success
<?php
if (isset($_GET['status']) && $_GET['status'] === 'success') {
echo "<div class='success'>Bill uploaded successfully!</div>";
} else {
echo "<div class='error'>Upload failed. Please try again.</div>";
}
?>
Pass additional data (e.g., transaction ID):
$transaction_id = "TXN" . time();
$return_url = "https://yourdomain.com/return?txn_id=" . urlencode($transaction_id);
Check for errors in the return URL:
if (isset($_GET['error'])) {
$error = htmlspecialchars($_GET['error']);
echo "<div class='error'>Error: {$error}</div>";
}
Issue | Solution |
---|---|
Invalid Public ID | Verify in your MaApp Business Profile |
Business Type Error | Check allowed types and spelling |
Upload Fails | Ensure images are JPG/PNG (<10MB) |
Redirect Not Working | Check for output before header() calls |
Blank Page | Enable error reporting during development |
This updated integration ensures secure, reliable slip bill uploads while protecting sensitive credentials.
🚀 Happy Integrating!