ryftpay/ryft-php

RyftPay SDK for PHP

Maintainers

Package info

github.com/RyftPay/ryft-php

Homepage

pkg:composer/ryftpay/ryft-php

Statistics

Installs: 865

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

1.1.0 2025-11-20 13:14 UTC

This package is auto-updated.

Last update: 2026-03-20 14:03:56 UTC


README

build PHP version License: MIT

Installation

# with composer
composer install ryftpay/ryft-php

Usage

The SDK must be configured with your account's secret key, available in the Ryft Dashboard. The SDK will automatically determine the environment based on the provided key. For example, sk_sandbox... will point to sandbox, while sk_live will point to production.

Importing the SDK

You can access the SDK and all of the methods and types by importing it as follows:

<?php
use Ryft\Ryft;

Initialising with a secret key

You can pass your secret key via the Config in the SDK constructor. For example:

<?php
$ryft = new Ryft('sk_sandbox_);

Initialising with environment variables

You can set the following environment variable, and the SDK will automatically pick it up:

  • RYFT_SECRET_KEY

Note

If you use env variables you don't have to pass your secret key to the config. This is handled for you

Basic Example

<?php

use Ryft\Ryft;

$ryft = new Ryft('sk_sandbox_....');

$response = $ryft->accounts->list();

print_r($response);