{"id":13718993,"url":"https://github.com/frozzare/go-swish","last_synced_at":"2025-04-28T16:30:55.345Z","repository":{"id":57516115,"uuid":"83407045","full_name":"frozzare/go-swish","owner":"frozzare","description":"Go package for the Swish merchant API","archived":false,"fork":false,"pushed_at":"2024-08-21T15:44:08.000Z","size":1588,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T09:34:20.623Z","etag":null,"topics":["payment","swish"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frozzare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-02-28T08:14:01.000Z","updated_at":"2024-08-21T15:40:53.000Z","dependencies_parsed_at":"2024-08-21T08:43:16.838Z","dependency_job_id":null,"html_url":"https://github.com/frozzare/go-swish","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozzare%2Fgo-swish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozzare%2Fgo-swish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozzare%2Fgo-swish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozzare%2Fgo-swish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frozzare","download_url":"https://codeload.github.com/frozzare/go-swish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251345815,"owners_count":21574783,"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":["payment","swish"],"created_at":"2024-08-03T01:00:40.576Z","updated_at":"2025-04-28T16:30:50.337Z","avatar_url":"https://github.com/frozzare.png","language":"Go","funding_links":[],"categories":["Finance"],"sub_categories":[],"readme":"# Swish [![Build Status](https://img.shields.io/github/actions/workflow/status/frozzare/go-swish/go.yml)](https://github.com/frozzare/go-swish/actions?query=workflow%3AGo) [![GoDoc](https://godoc.org/github.com/frozzare/go-swish?status.svg)](https://godoc.org/github.com/frozzare/go-swish) [![Go Report Card](https://goreportcard.com/badge/github.com/frozzare/go-swish)](https://goreportcard.com/report/github.com/frozzare/go-swish)\n\nGo package for dealing with [Swish](https://www.getswish.se/) merchant API.\n\n## Installation\n\n```\ngo get -u github.com/frozzare/go-swish\n```\n\n## Usage\n\nPlease read the Swish [documentation](https://developer.getswish.se/) first so you know what you need and what the different fields means.\n\nBegin by obtaining the SSL certificates required by Swish. The Swish server itself uses a self-signed root certificated so a CA-bundle to verify its origin is needed.\nYou will also need a client certificate and corresponding private key so the Swish server can identify you.\n\nCertificates in `certs` directory is the test certificates from Swish and cannot be used in production.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/frozzare/go-swish\"\n)\n\nfunc main() {\n\tclient, err := swish.NewClient(\u0026swish.Options{\n\t\tEnv:        \"test\",\n\t\tPassphrase: \"swish\",\n\t\tP12:        \"./certs/test.p12\",\n\t\tRoot:       \"./certs/root.pem\",\n\t})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tres, err := client.CreatePayment(context.Background(), \u0026swish.PaymentData{\n\t\tCallbackURL:           \"https://example.com/api/swishcb/paymentrequests\",\n\t\tPayeePaymentReference: \"0123456789\",\n\t\tPayeeAlias:            \"1231181189\",\n\t\tAmount:                \"100.00\",\n\t\tCurrency:              \"SEK\",\n\t\tMessage:               \"Kingston USB Flash Drive 8 GB\",\n\t})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(res.ID)\n\n\tres, err = client.Payment(context.Background(), res.ID)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(res.Status)\n}\n```\n\n# License\n\nMIT © [Fredrik Forsmo](https://github.com/frozzare)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozzare%2Fgo-swish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrozzare%2Fgo-swish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozzare%2Fgo-swish/lists"}