Download the PHP package tangentopay/tangentopay-php without Composer
On this page you can find all versions of the php package tangentopay/tangentopay-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tangentopay/tangentopay-php
More information about tangentopay/tangentopay-php
Files in tangentopay/tangentopay-php
Package tangentopay-php
Short Description Official PHP SDK for the TangentoPay API
License MIT
Homepage https://tangentopay.com
Informations about the package tangentopay-php
tangentopay-php
Official PHP SDK for the TangentoPay API — accept payments, issue refunds, manage wallets, and verify webhooks with a clean, fully-typed interface.
Table of contents
- Requirements
- Installation
- Quick start
- Authentication
- Token expiry and refresh
- Test mode
- Resources
- Provider status
- Currency and provider guide
- Service wallet operations (B2B2C)
- Payouts
- Merchant wallet top-up
- Payment methods
- Error handling
- Webhook verification
- Contributing
- Security
- License
Requirements
- PHP 8.1 or later
- Guzzle 7 (
guzzlehttp/guzzle) - A TangentoPay account — sign up
Installation
Quick start
Authentication
TangentoPay has two credential types:
| Credential | Where it goes | Client to use |
|---|---|---|
Service Key (pk_live_… / pk_test_…) |
X-Service-Key header |
ServiceClient |
| API Token (Bearer) | Authorization: Bearer … |
MerchantClient |
Never expose an API token in browser or mobile code. Use ServiceClient on the frontend and MerchantClient only on your server.
ServiceClient
MerchantClient
Obtain an API token programmatically:
Token expiry and refresh
Catch AuthenticationException and re-authenticate in place:
Test mode
Pass a pk_test_… service key to use Stripe test mode:
Test-mode sessions go through Stripe's sandbox and never move real money.
Resources
ServiceClient resources
| Property | Description |
|---|---|
$service->checkout |
Create Stripe-hosted checkout sessions; poll payment status |
$service->topups |
Collect money from a customer's MoMo account into the service wallet |
$service->withdrawals |
Send money from the service wallet to a customer's MoMo account |
$service->providerStatus |
Real-time health for MTN MoMo, Orange Money, and Stripe |
MerchantClient resources
| Property | Description |
|---|---|
$merchant->auth |
Login, OTP verification, profile, logout |
$merchant->payments |
View and search your incoming payment history |
$merchant->refunds |
Issue refunds on completed payments |
$merchant->topups |
Top up your main wallet via card or MoMo |
$merchant->payouts |
Send funds out (bank, MoMo, TP wallet, debit card) |
$merchant->wallets |
Main and service wallet balances |
$merchant->services |
View services; manage enabled payment methods per service |
$merchant->customers |
Create and manage customer records |
$merchant->analytics |
Payment summaries, revenue, and volume over time |
$merchant->logs |
Per-service API request logs |
$merchant->transfers |
Internal wallet transfer history |
$merchant->providerStatus |
Real-time health for MTN MoMo, Orange Money, and Stripe |
Note on service administration: Creating services, rotating API keys, updating webhooks, and other one-time setup tasks are done from the TangentoPay Dashboard. These operations are intentionally not exposed in the SDK.
Provider status
Check provider health before initiating any collection or disbursement — this lets you show users a clear error message instead of a silent payment failure.
Possible status values:
| Value | Meaning |
|---|---|
"operational" |
Fully functional — proceed normally |
"degraded" |
Partial outage — expect higher failure rates |
"down" |
Provider unreachable — do not attempt payments |
Currency and provider guide
| Provider | Supported currencies | Notes |
|---|---|---|
| MTN Mobile Money | XAF only | Cameroon; USSD push via Fapshi. Min 100 XAF, max 500 000 XAF. |
| Orange Money | XAF only | Cameroon; USSD push via Fapshi. Min 100 XAF, max 500 000 XAF. |
| Stripe | USD, EUR, GBP, and more | Multi-currency card checkout and instant payouts. |
When a customer pays via MoMo the transaction currency is XAF. When they pay via Stripe card the currency is whatever currency_code you pass to checkout->create().
Use $merchant->wallets->mainBalance() to get per-currency balances — the response includes a balances array showing only currencies with a non-zero funded amount, which you can use to build a currency-selector UI in your withdrawal flow.
Service wallet operations (B2B2C)
The service wallet is funded when customers pay through your service's checkout flow.
Payouts
Two-step flow: initiate → confirm.
Virtual card payout (USD, Instant Payout)
Bulk payout
Merchant wallet top-up
Payment methods
Environment configuration
Error handling
Webhook verification
Contributing
Pull requests are welcome. For major changes please open an issue first.
Security
Please report security vulnerabilities to [email protected] rather than opening a public issue.
License
MIT