An open source client for Paystack in GO.
package main
import (
"context"
"fmt"
"log"
p "github.com/gray-adeyi/paystack"
"github.com/gray-adeyi/paystack/models"
)
func main() {
// Initialize a Paystack client with your secret key
client := p.NewClient(p.WithSecretKey("<your-secret-key>"))
// Prepare a response model to hold the returned transactions
var response models.Response[[]models.Transaction]
// Retrieve all transactions
if err := client.Transactions.All(
context.Background(),
&response,
p.WithQuery("perPage", "1"),
); err != nil {
log.Fatal(err)
}
fmt.Println(response.Status)
fmt.Println(response.Message)
fmt.Println(response.Data)
}
See Documentation for more.
See Documentation for more on this package.
This project is an Open Source client library for Paystack. It is not officially endorsed or affiliated with Paystack. All trademarks and company names belong to their respective owners.
Thank you for being interested in contributing to
github.com/gray-adeyi/paystack
. There are many ways you can contribute to the
project:
- Star on GitHub
- Try
github.com/gray-adeyi/paystack
and report bugs/issues you find - Buy me a coffee
Name | Language | Functionality |
---|---|---|
Paystack CLI | Python | A command line app for interacting with paystack APIs |
pypaystack2 | Python | A client library for integrating paystack in python |
paystack | Go (This project) | A client library for integration paystack in go |
@gray-adeyi/paystack-sdk | Typescript/Javascript | A client library for integrating paystack in Javascript runtimes (Node,Deno,Bun) |
paystack | Dart | A client library for integration paystack in Dart |