polybrainz_now_payments 1.0.0 copy "polybrainz_now_payments: ^1.0.0" to clipboard
polybrainz_now_payments: ^1.0.0 copied to clipboard

A type-safe Dart API wrapper for NOWPayments cryptocurrency payment gateway. Accept 300+ cryptocurrencies with payments, invoices, payouts, and IPN webhooks.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2026-01-22 #

Added #

  • NowPaymentsClient - Main API client with full endpoint coverage

    • getStatus() - Check API availability
    • getCurrencies() - List all available cryptocurrencies
    • getSelectedCurrencies() - List merchant's enabled currencies
    • getEstimatePrice() - Get price estimates for currency conversion
    • getMinimumPaymentAmount() - Get minimum payment thresholds
    • createPayment() - Create cryptocurrency payments
    • getPaymentStatus() - Check payment status by ID
    • getPayments() - List payments with filtering
    • createInvoice() - Generate payment invoices with URLs
    • authenticate() - JWT authentication for payout operations
    • getBalance() - Check custody account balance
    • createPayout() - Create cryptocurrency payouts
    • verifyPayout() - Verify payouts with 2FA
    • getPayoutStatus() - Check payout status
    • getPayouts() - List payouts with filtering
    • validateAddress() - Validate wallet addresses
  • Enums - Type-safe constants (no magic strings)

    • PaymentStatus - waiting, confirming, confirmed, sending, partiallyPaid, finished, failed, refunded, expired
    • PayoutStatus - creating, processing, sending, finished, failed, rejected
    • FiatCurrency - USD, EUR, GBP, and 30+ fiat currencies
    • SortOrder - asc, desc
    • NowPaymentsEnvironment - production, sandbox
  • Request Models - Type-safe request builders with toJson()

    • CreatePaymentRequest
    • CreateInvoiceRequest
    • CreatePayoutRequest
    • VerifyPayoutRequest
    • ListPaymentsRequest
    • ListPayoutsRequest
    • EstimatePriceRequest
    • MinimumAmountRequest
  • Response Models - Type-safe responses with fromJson() and toJson()

    • PaymentResponse with helper methods (isComplete, isPending, isFailed)
    • PaymentListResponse
    • InvoiceResponse
    • PayoutResponse with helper methods
    • PayoutListResponse
    • ApiStatusResponse
    • CurrenciesResponse
    • EstimatePriceResponse
    • MinimumAmountResponse
    • BalanceResponse
    • AuthResponse
  • Exceptions - Typed exception handling

    • NowPaymentsException - Base exception
    • AuthenticationException - 401 errors
    • BadRequestException - 400 errors
    • NotFoundException - 404 errors
    • RateLimitException - 429 errors with retry info
    • RequestFailedException - 402 errors
    • ServerException - 5xx errors
  • Utilities

    • IpnValidator - HMAC-SHA512 signature validation for webhooks
    • NowPaymentsConfig - Configuration with environment, timeout, and logging
    • NowPaymentsEndpoints - API endpoint constants
  • Features

    • Dependency injection for HTTP client (enables testing)
    • Sandbox and production environment support
    • Optional debug logging
    • Configurable request timeouts
    • Flexible JSON parsing (handles string/number variations from API)
0
likes
160
points
209
downloads

Publisher

verified publisherpolybrainz.bot

Weekly Downloads

A type-safe Dart API wrapper for NOWPayments cryptocurrency payment gateway. Accept 300+ cryptocurrencies with payments, invoices, payouts, and IPN webhooks.

Homepage
Repository (GitHub)
View/report issues

Topics

#payments #cryptocurrency #api-wrapper #bitcoin #fintech

Documentation

API reference

License

MIT (license)

Dependencies

crypto, http

More

Packages that depend on polybrainz_now_payments