sportakal/revenuecat-v1-api-php

It is a PHP package for api v1 version of Revenuecat.

0.1.3 2023-07-31 22:38 UTC

This package is auto-updated.

Last update: 2024-04-30 00:34:13 UTC


README

Check official documentation (Revenuecat api v1)

Installation

Composer

Install dependencies with composer:

composer require sportakal/revenuecat-v1-api-php

Use composer autoload to include dependencies

require_once('vendor/autoload.php');

Usage

Create Options

Set you token to Options object

use Sportakal\RevenuecatV1ApiPhp\Options;

$options = new Options('your_bearer_token','your timezone (+3));

Make Request

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

TODOS

  • 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

Contributions are welcome!