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 anAPIErrorthat carries the status, code, and message. - Optional retries that never repeat a
POSTafter 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.Contexton every call, a configurable*http.Client, and a sandbox base URL.
Releases
Need something built?
I take on freelance work in the same areas as my projects.
Start a project