Check official documentation (Revenuecat api v1)
Install dependencies with composer:
composer require sportakal/revenuecat-v1-api-php
Use composer autoload to include dependencies
require_once('vendor/autoload.php');
Set you token to Options object
use Sportakal\RevenuecatV1ApiPhp\Options;
$options = new Options('your_bearer_token','your timezone (+3));
Get or Create subscriber info from Revenuecat
use Sportakal\RevenuecatV1ApiPhp\Requests\GetOrCreateSubscriber;
$request = (new GetOrCreateSubscriber('app_user_id'));
$subscriber = $request->get($options);
return $subscriber;
Check for more examples /samples directory
- Get or Create Subscriber Endpoint
- Delete Subscriber Endpoint
- Add User Attribution Data Endpoint
- Update Subscriber Attributes Endpoint
- Create a Purchase Endpoint
- Google Play: Refund and Revoke Subscription Endpoint
- Google Play: Defer a Subscription Endpoint
- Google Play: Refund and Revoke Purchase Endpoint
- Grant a Promotional Entitlement Endpoint
- Revoke Promotional Entitlements Endpoint
- Override a Customer's Current Offering Endpoint
- Remove a Customer's Current Offering Override Endpoint
- Get Offerings Endpoint