Skip to content

gray-adeyi/paystack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paystack Client (GO)

Go Reference Go Report Card

An open source client for Paystack in GO.

Usage

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.

Documentation

See Documentation for more on this package.

Disclaimer

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.

Contributions

Thank you for being interested in contributing to github.com/gray-adeyi/paystack. There are many ways you can contribute to the project:

Other Related Projects

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

About

An open source client for Paystack in GO.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages