Download the PHP package aghfatehi/laravel-tamara without Composer
On this page you can find all versions of the php package aghfatehi/laravel-tamara. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aghfatehi/laravel-tamara
More information about aghfatehi/laravel-tamara
Files in aghfatehi/laravel-tamara
Package laravel-tamara
Short Description Tamara Payment Gateway Integration for Laravel - Buy Now Pay Later (BNPL) solution supporting Saudi Arabia, UAE, Kuwait, Bahrain, Qatar, and Oman.
License MIT
Informations about the package laravel-tamara
Laravel Tamara Payment Gateway
A professional Laravel package for integrating Tamara - the leading Buy Now Pay Later (BNPL) payment solution in the Middle East. Supports Saudi Arabia, UAE, Kuwait, Bahrain, Qatar, and Oman.
Features
- ✅ Full Tamara Online Checkout flow
- ✅ Payment Types lookup
- ✅ Create Checkout Sessions
- ✅ Authorise / Capture / Cancel / Refund orders
- ✅ Webhook management (register, list, update, delete)
- ✅ Sandbox & Production environments
- ✅ Multi-currency support (SAR, AED, KWD, BHD, QAR, OMR)
- ✅ Multi-country support (SA, AE, KW, BH, QA, OM)
- ✅ In-store checkout support
- ✅ cURL HTTP client (no Guzzle)
- ✅ Configurable routes prefix & middleware
- ✅ Transaction logging migration
- ✅ Laravel 10, 11, 12 & 13 compatible
- ✅ PHP 8.1+
Requirements
| Laravel | PHP | Package Version |
|---|---|---|
| 10.x | ^8.1 | ^1.0 |
| 11.x | ^8.2 | ^1.0 |
| 12.x | ^8.2 | ^1.0 |
| 13.x | ^8.2 | ^1.0 |
Installation
Configuration
1. Publish Configuration
2. Publish Migration (Optional)
3. Environment Variables
Add these to your .env file:
4. Service Provider
The package auto-discovers via Laravel's package discovery. If you disable discovery, register manually in config/app.php:
5. Facade (Optional)
Usage
Quick Start - Frontend Checkout
Using Routes
The package registers these routes under the configured prefix (/tamara by default):
| Method | URI | Name | Description |
|---|---|---|---|
| GET | /tamara/payment/types |
tamara.payment.types |
Get eligible payment types |
| POST | /tamara/pay |
tamara.pay |
Initiate checkout |
| ANY | /tamara/callback |
tamara.callback |
Payment callback |
| GET | /tamara/cancel |
tamara.cancel |
Cancel handler |
| GET | /tamara/failure |
tamara.failure |
Failure handler |
| POST | /tamara/webhook |
tamara.webhook |
Webhook receiver |
| POST | /tamara/authorise |
tamara.authorise |
Authorise order |
API Methods
Route Parameters
Pass reference_id when calling POST /tamara/pay. It will be forwarded as a query parameter to the callback, cancel, and failure URLs so your app can identify the order when Tamara redirects back.
| Parameter | Type | Description |
|---|---|---|
reference_id |
string | Passed as ?reference_id= in callback URLs for order identification |
order_reference_id |
string | Your internal order reference (sent to Tamara API) |
order_number |
string | Your order number (sent to Tamara API) |
item_reference_id |
string | Item reference ID within the order |
Customising Routes
Publish the config and modify the routes section:
Handling Webhooks
The webhook endpoint logs all incoming events. Extend the controller or listen to the log to implement your business logic:
Testing
Changelog
See CHANGELOG for recent changes.
Security
If you discover security issues, please email [email protected] instead of using the issue tracker.
License
This package is open-sourced software licensed under the MIT license.
Support
- Issues: GitHub Issues
- Tamara Docs: https://docs.tamara.co
- Author: AL-AGHBARI Fatehi ([email protected])
Countries & Currencies
| Country | Code | Currency | Code |
|---|---|---|---|
| Saudi Arabia | SA | Riyal | SAR |
| UAE | AE | Dirham | AED |
| Kuwait | KW | Dinar | KWD |
| Bahrain | BH | Dinar | BHD |
| Qatar | QA | Riyal | QAR |
| Oman | OM | Riyal | OMR |
All versions of laravel-tamara with dependencies
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/validation Version ^10.0|^11.0|^12.0|^13.0