Laravel package for MakePay payment links, checkout helpers, bookkeeping, and webhook verification.
This package wraps the official makepay/makepay-php SDK with Laravel config,
service container bindings, and a facade.
composer require makepay/makepay-laravelPublish the config:
php artisan vendor:publish --tag=makepay-configSet environment variables:
MAKEPAY_KEY_ID=
MAKEPAY_KEY_SECRET=
MAKEPAY_WEBHOOK_SECRET=
MAKEPAY_BASE_URL=https://www.makecrypto.io
MAKEPAY_CHECKOUT_BASE_URL=https://makepay.ioNever expose MAKEPAY_KEY_SECRET or MAKEPAY_WEBHOOK_SECRET to browser code,
mobile apps, public repositories, or logs.
use MakePay\Laravel\Facades\MakePay;
$payment = MakePay::createPaymentLink([
'title' => 'Order #1042',
'amount' => '129.99',
'currency' => 'USDT',
'orderId' => 'order_1042',
'customerEmail' => 'buyer@example.com',
'returnUrl' => route('orders.show', 'order_1042'),
]);
return redirect($payment['paymentLink']['publicUrl']);use MakePay\Laravel\MakePayManager;
final class CheckoutController
{
public function __invoke(MakePayManager $makePay)
{
return $makePay->createPaymentLink([
'amount' => '49',
'currency' => 'USDT',
'title' => 'Checkout',
]);
}
}Read the raw request body before parsing JSON.
use Illuminate\Http\Request;
use MakePay\Laravel\Facades\MakePay;
Route::post('/webhooks/makepay', function (Request $request) {
$payload = MakePay::parseWebhook(
$request->getContent(),
$request->header('X-MakePay-Signature')
);
if (($payload['event']['type'] ?? null) === 'status_changed') {
// Reconcile order status idempotently by deliveryId and session id.
}
return response()->json(['ok' => true]);
});$invoice = MakePay::createBookkeepingInvoice([
'title' => 'Invoice #1042',
'currency' => 'USD',
'counterparty' => [
'name' => 'Buyer Example',
'email' => 'buyer@example.com',
],
'lineItems' => [
[
'description' => 'Implementation services',
'quantity' => '1',
'unitAmount' => '500',
],
],
]);composer install
composer validate --strict
composer testMaintainer: Ethan Carter (makepayio).