Jax / muxover Start a project

NowPay Go

Go SDK for NOWPayments — payments, fiat, webhooks.

Install

$ go get github.com/muxover/nowpay-go

About

NowPay Go is a Go client for the NOWPayments crypto payment gateway. It covers the whole REST API: payments, invoices, estimates, mass payouts, recurring payments, conversions, custody, and fiat payouts. It also verifies and parses IPN callbacks. It has no dependencies outside the standard library.

Features

  • Every endpoint in the official NOWPayments API collection, with typed requests and responses, and most of them checked against the live API (see API status).
  • IPN signature checks that match how NOWPayments signs callbacks, including payloads with &, <, >, and non-ASCII text.
  • Typed webhook events for payments and payouts, with the event type derived from the status.
  • Errors you can match with errors.Is, and an APIError that carries the status, code, and message.
  • Optional retries that never repeat a POST after a server error, so a payout is not sent twice.
  • Handles the places where the live API differs from its docs: IDs and amounts sent as numbers or strings, and responses wrapped in different shapes.
  • context.Context on every call, a configurable *http.Client, and a sandbox base URL.

Releases

  1. v0.5.0 Verified against the live API
  2. v0.4.0 Tested against the API docs
  3. v0.3.0 Aligned with the NOWPayments API
  4. v0.2.0 Full API coverage
  5. v0.1.0 Initial NOWPayments client

Need something built?

I take on freelance work in the same areas as my projects.

Start a project