Dart and Flutter-friendly SDK for MakePay payment links, checkout URLs, bookkeeping, and webhook verification.
The package is pure Dart so it can be used from Flutter apps, Dart web apps, CLIs, and server-side Dart services. Keep MakePay partner credentials on trusted backends; Flutter apps should use checkout URL helpers and call your backend relay for payment-link creation.
The package is planned for pub.dev as:
dependencies:
makepay: ^0.1.0Until the first pub.dev release, reference this repository or publish it to your internal package registry.
final makePay = MakePayClient(
MakePayClientOptions(
keyId: Platform.environment['MAKEPAY_KEY_ID']!,
keySecret: Platform.environment['MAKEPAY_KEY_SECRET']!,
),
);
final created = await makePay.createPaymentLink(
const PaymentLinkPayload(
title: 'Order #1042',
amount: '129.99',
currency: 'USDT',
customerEmail: 'buyer@example.com',
),
);const urls = MakePayCheckoutUrls();
final hosted = urls.hostedPayment('pay_123');
final embedded = urls.embeddedPayment(
'pay_123',
parentOrigin: 'https://merchant.example',
);Open the URL with your app's preferred launcher package.
Read the exact raw body before parsing JSON:
const verifier = MakePayWebhookVerifier(webhookSecret: 'whsec_live_or_test');
final trusted = verifier.verify(rawBodyBytes, signatureHeader);The verifier expects the t=<timestamp>,v1=<hex> signature format and applies a five-minute tolerance by default.
final summary = await makePay.getBookkeepingSummary();
final invoiceLink = await makePay.createBookkeepingInvoicePaymentLink(
'inv_123',
sendPaymentRequestEmail: true,
);dart pub get
dart format --set-exit-if-changed .
dart analyze --fatal-infos
dart testMaintainer: Ethan Carter (makepayio).