MaApp Slip Upload Gateway Integration

Secure, efficient slip upload integration for your website / application

Overview

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.

Secure Uploads

End-to-end encrypted bill uploads with Public ID authentication

Automatic OCR

Advanced OCR technology extracts prices and totals automatically

Seamless Integration

Simple integration with just a few lines of code

Key Changes in Integration

Prerequisites

Before integrating, ensure you have:

Step 1: Obtain Your Public ID

  1. Log in to your MaApp Account Profile
  2. Navigate to the Business Profile API & Integration section
  3. Copy your Public ID (e.g., seejeewwc_AfLoFBV*)

⚠️ Important

  • Never expose your API key in client-side code
  • The Public ID is safe to use in URLs
  • You should provide a return URL as well

Step 2: Integration Methods

Method 1: Direct Link (Simple)

Create a link that redirects users to the gateway:

HTML
<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 ID
  • office → Your business type
  • https://yourdomain.com/return → Your return URL

Method 2: Server-Side Redirection (Recommended)

For better security, use PHP to handle the redirect:

PHP
<?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:

  • Business type validation ensures only allowed types are used
  • URL encoding prevents malformed URLs
  • Secure redirect without exposing API keys

Step 3: Supported Business Types

The following business types are accepted:

shop
cafe
office
boat
speedboat
otherbusiness
wholesale
takeawaybakery
construction
institute
council
roomrent

Step 4: Handling Returns

After upload, users are redirected to your return_url with a status:

Success Response

URL
https://yourdomain.com/return?status=success

PHP Return Handling Example

PHP
<?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>";
}
?>

Advanced Options

Custom Return Parameters

Pass additional data (e.g., transaction ID):

PHP
$transaction_id = "TXN" . time();
$return_url = "https://yourdomain.com/return?txn_id=" . urlencode($transaction_id);

Error Handling

Check for errors in the return URL:

PHP
if (isset($_GET['error'])) {
    $error = htmlspecialchars($_GET['error']);
    echo "<div class='error'>Error: {$error}</div>";
}

Security Best Practices

Troubleshooting

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

Need Help?

For integration support, contact MaApp technical support:

Ready to Integrate?

This updated integration ensures secure, reliable slip bill uploads while protecting sensitive credentials.

🚀 Happy Integrating!