{"id":26260583,"url":"https://github.com/rammyblog/go-paystack","last_synced_at":"2026-01-16T20:46:43.812Z","repository":{"id":206102006,"uuid":"715843824","full_name":"rammyblog/go-paystack","owner":"rammyblog","description":"A simple paystack wrapper built using GO","archived":false,"fork":false,"pushed_at":"2025-03-16T03:02:57.000Z","size":38,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T07:05:00.487Z","etag":null,"topics":["go","golang","paystack","paystack-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rammyblog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T00:13:10.000Z","updated_at":"2025-03-17T12:37:17.000Z","dependencies_parsed_at":"2023-11-12T14:27:19.287Z","dependency_job_id":"c57afc32-6e88-434c-a506-36d3ba923ed9","html_url":"https://github.com/rammyblog/go-paystack","commit_stats":null,"previous_names":["rammyblog/go-paystack"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2Fgo-paystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2Fgo-paystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2Fgo-paystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rammyblog%2Fgo-paystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rammyblog","download_url":"https://codeload.github.com/rammyblog/go-paystack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251658200,"owners_count":21622819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","paystack","paystack-api"],"created_at":"2025-03-13T23:16:21.079Z","updated_at":"2026-01-16T20:46:43.791Z","avatar_url":"https://github.com/rammyblog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-paystack\n\nA Go client library for [Paystack](https://paystack.com), a payments platform that allows you to accept payments from customers in 154+ countries.\n\n## Installation\n\n```bash\ngo get github.com/rammyblog/go-paystack\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/rammyblog/go-paystack\"\n\t\"github.com/rammyblog/go-paystack/transaction\"\n)\n\nfunc main() {\n\t// Create client with default settings\n\tclient := paystack.New(\"sk_test_your_secret_key\")\n\n\t// Or with custom options\n\tclient := paystack.New(\"sk_test_your_secret_key\",\n\t\tpaystack.WithTimeout(10*time.Second),\n\t)\n\n\tctx := context.Background()\n\n\t// Initialize a transaction\n\tresp, err := client.Transaction.Initialize(ctx, \u0026transaction.TransactionRequest{\n\t\tAmount:      100000, // Amount in kobo (1000 NGN)\n\t\tEmail:       \"customer@example.com\",\n\t\tCurrency:    \"NGN\",\n\t\tReference:   \"unique_reference\",\n\t\tCallbackURL: \"https://yoursite.com/callback\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Authorization URL: %s\\n\", resp.AuthorizationURL)\n\n\t// Verify a transaction\n\ttxn, err := client.Transaction.Verify(ctx, \"reference\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Transaction status: %s\\n\", txn.Status)\n\n\t// List transactions with query parameters\n\tlist, err := client.Transaction.List(ctx, paystack.Query(\"page\", \"1\"))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Printf(\"Total transactions: %d\\n\", list.Meta.Total)\n}\n```\n\n## Available Services\n\n- **Transaction** - Initialize, verify, list, charge, export transactions\n- **Plans** - Create, list, fetch, update subscription plans\n- **Subscription** - Create, list, enable, disable subscriptions\n- **Transaction Splits** - Create and manage split payments\n\n## Client Options\n\n```go\n// Custom HTTP client\npaystack.New(apiKey, paystack.WithHTTPClient(customClient))\n\n// Custom timeout\npaystack.New(apiKey, paystack.WithTimeout(30*time.Second))\n\n// Custom logger\npaystack.New(apiKey, paystack.WithLogger(customLogger))\n```\n\n## Examples\n\nSee the [example](./example) directory for more usage examples.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frammyblog%2Fgo-paystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frammyblog%2Fgo-paystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frammyblog%2Fgo-paystack/lists"}