PHPackages                             swiftwave/swiftwave - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. swiftwave/swiftwave

ActiveLibrary

swiftwave/swiftwave
===================

101PHP

Since Nov 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/SwiftWave-one/php-sdk)[ Packagist](https://packagist.org/packages/swiftwave/swiftwave)[ RSS](/packages/swiftwave-swiftwave/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SwiftWave PHP SDK
=================

[](#swiftwave-php-sdk)

Overview
--------

[](#overview)

The SwiftWave PHP SDK enables seamless integration of SwiftWave's secure money transaction functionalities into PHP-based applications. This SDK simplifies transaction management, allowing you to send and receive payments, access currency exchange, and leverage SwiftWave's robust features within your PHP projects.

Usage
-----

[](#usage)

### Payer

[](#payer)

To fund payments using SwiftWave:

```
// Payer Object
$payer = new Payer();
$payer->setPaymentMethod('SwiftWave'); // Your system name, e.g., SwiftWave
```

### Amount

[](#amount)

Specify a payment amount and the currency:

```
// Amount Object
$amountIns = new Amount();
$amountIns->setTotal(20)->setCurrency('USD'); // Provide a valid currency code
```

### Transaction

[](#transaction)

Create a Transaction resource where the amount object is set:

```
// Transaction Object
$trans = new Transaction();
$trans->setAmount($amountIns);
```

### RedirectUrls

[](#redirecturls)

Set the URLs where buyers should redirect after a transaction is completed or canceled:

```
// RedirectUrls Object
$urls = new RedirectUrls();
$urls->setSuccessUrl('http://your-merchant-domain.com/example-success.php') // Success URL
    ->setCancelUrl('http://your-merchant-domain.com/'); // Cancel URL
```

### Payment

[](#payment)

Create a payment resource with Payer, Amount, RedirectUrls, and merchant Credentials (Client ID and Client Secret):

```
// Payment Object
$payment = new Payment();
$payment->setCredentials([
        'client_id' => 'your_client_id_here', // Provide correct client ID
        'client_secret' => 'your_client_secret_here' // Provide correct client secret
    ])
    ->setRedirectUrls($urls)
    ->setPayer($payer)
    ->setTransaction($trans);

try {
    $payment->create(); // Create payment
    header("Location: ".$payment->getApprovedUrl()); // Checkout URL
} catch (Exception $ex) {
    print $ex;
    exit;
}
```

### Dependencies

[](#dependencies)

Make sure to use the required SwiftWave API classes:

```
use SwiftWave\Api\Payer;
use SwiftWave\Api\Amount;
use SwiftWave\Api\Transaction;
use SwiftWave\Api\RedirectUrls;
use SwiftWave\Api\Payment;
```

Notes
-----

[](#notes)

- Ensure the provided client ID and client secret are accurate.
- Customize URLs according to your application's redirect requirements.
- Replace placeholders with actual values for smooth integration.

```

```

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0692dd6f5ffe68f29b8ad3fc35c5afc54b6b505f5843350a0fa647a33dae6a3f?d=identicon)[SwiftWave](/maintainers/SwiftWave)

---

Top Contributors

[![R00tS3c](https://avatars.githubusercontent.com/u/19959840?v=4)](https://github.com/R00tS3c "R00tS3c (5 commits)")

---

Tags

businesscurrency-exchangemerchantmoney-transaction-integrationmoney-transfermoney-transfer-sdkpayment-processingsecure-paymentsshopswiftwave-api-for-phpswiftwave-php-sdktransaction-managementwallet

### Embed Badge

![Health badge](/badges/swiftwave-swiftwave/health.svg)

```
[![Health](https://phpackages.com/badges/swiftwave-swiftwave/health.svg)](https://phpackages.com/packages/swiftwave-swiftwave)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
