bKashGo

Go SDK for the bKash tokenized checkout API.

GobKash Tokenized API
View source on GitHub

bKashGo implements bKash's tokenized checkout API for Go. bKash is the dominant mobile financial service in Bangladesh, and integrating it from Go previously meant writing the HTTP layer and token lifecycle by hand against the vendor's reference.

Add to your module

go get github.com/dreygur/bkashgo

Coverage

The tokenized checkout surface is implemented end to end: grant token, refresh token, create/execute/query/cancel agreement, create/execute/query payment, search transaction, and refund plus refund status.

That is the full lifecycle — agreements for recurring charges, payments for one-off ones, and the query and refund calls needed to reconcile afterwards.

Shape of the API

A single constructor takes the credentials and a live/sandbox flag, and returns a client whose methods map onto the vendor's operations. Errors are returned rather than panicked, in the usual Go style.

`Debug(true)` on the client logs the JSON request and response bodies, which matters when integrating against a gateway whose failures are often only legible in the raw payload.

Reference

Built against bKash's published tokenized checkout integration guide and API reference. The package is documented on pkg.go.dev and runs CodeQL analysis in CI.

All projects