← ALL POSTS
22 NOVEMBER 2025

PHP Code Examples

 getenv('AIVA_API_KEY'),
    'merchantId' => getenv('AIVA_MERCHANT_ID')
]);

// Get intelligence dashboard
$intelligence = $client->intelligence->get();

echo "Total Revenue: $" . number_format($intelligence->overview->totalRevenue, 2) . "\n";
echo "MRR: $" . number_format($intelligence->overview->monthlyRecurringRevenue, 2) . "\n";
echo "Active Subscriptions: " . $intelligence->overview->activeSubscriptions . "\n";

// Get RFM breakdown
foreach ($intelligence->rfmBreakdown as $segment => $count) {
    echo "$segment: $count customers\n";
}

Install:

composer require aiva/sdk
`"
Want this working on your store? Aiva does the sales, marketing and service work - in your voice, around the clock.
Get Aiva