{"id":13414096,"url":"https://github.com/gojuno/go-zooz","last_synced_at":"2025-12-15T00:00:44.074Z","repository":{"id":22420914,"uuid":"96200684","full_name":"gojuno/go-zooz","owner":"gojuno","description":"Zooz API client for Go","archived":false,"fork":false,"pushed_at":"2024-03-06T13:17:10.000Z","size":34,"stargazers_count":7,"open_issues_count":1,"forks_count":5,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-25T05:25:28.633Z","etag":null,"topics":["zooz-api-client-golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gojuno.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-07-04T09:28:23.000Z","updated_at":"2022-09-27T09:45:40.000Z","dependencies_parsed_at":"2024-06-19T03:03:57.575Z","dependency_job_id":"834405cc-ee49-4da6-ad2a-ab184787a0f9","html_url":"https://github.com/gojuno/go-zooz","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/gojuno%2Fgo-zooz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-zooz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-zooz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-zooz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojuno","download_url":"https://codeload.github.com/gojuno/go-zooz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642080,"owners_count":20323954,"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":["zooz-api-client-golang"],"created_at":"2024-07-30T20:01:57.551Z","updated_at":"2025-12-15T00:00:44.005Z","avatar_url":"https://github.com/gojuno.png","language":"Go","funding_links":[],"categories":["Third-party APIs","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e","第三方api","第三方API","第三方API`第三方API 汇总`","Utility"],"sub_categories":["HTTP Clients","Utility/Miscellaneous","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","实用程序/Miscellaneous","交流","查询语","Advanced Console UIs","Fail injection"],"readme":"# Zooz API client [![GoDoc](https://godoc.org/github.com/gojuno/go-zooz?status.svg)](http://godoc.org/github.com/gojuno/go-zooz) [![Build Status](https://travis-ci.org/gojuno/go-zooz.svg?branch=master)](https://travis-ci.org/gojuno/go-zooz) [![Go Report Card](https://goreportcard.com/badge/github.com/gojuno/go-zooz)](https://goreportcard.com/report/github.com/gojuno/go-zooz)\n\nThis repo contains Zooz API client written in Go.\n\nZooz API documentation: https://developers.paymentsos.com/docs/api\n\nBefore using this client you need to register and configure Zooz account: https://developers.paymentsos.com/docs/quick-start.html\n\n## How to install\n\nDownload package:\n```\ngo get github.com/gojuno/go-zooz\n```\n\nClient uses `github.com/pkg/errors`, so you may need to download this package as well:\n```\ngo get github.com/pkg/errors\n```\n\n## How to use\n\nTo init client you will need `private_key` and `app_id` which you can get from your Zooz account profile.\n```\nimport \"github.com/gojuno/go-zooz\"\n...\n// Init client\nclient := zooz.New(\n\tzooz.OptAppID(\"com.yourhost.go_client\"),\n\tzooz.OptPrivateKey(\"a630518c-22da-4eaa-bb39-502ad7832030\"),\n)\n\n// Create new customer\ncustomer, customerErr := client.Customer().New(\n\tcontext.Background(),\n\t\"customer_idempotency_key\",\n\t\u0026zooz.CustomerParams{\n\t\tCustomerReference: \"1234\",\n\t\tFirstName:         \"John\",\n\t\tLastName:          \"Doe\",\n\t},\n)\n\n// Create new payment method\npaymentMethod, paymentMethodErr := client.PaymentMethod().New(\n\tcontext.Background(),\n\t\"payment_method_idempotency_key\",\n\tcustomer.ID,\n\t\"918a917e-4cf9-4303-949c-d0cd7ff7f619\",\n)\n\n// Delete customer\ndeleteCustomerErr := client.Customer().Delete(context.Background(), customer.ID)\n```\n\n## Custom HTTP client\n\nBy default Zooz client uses `http.DefaultClient`. You can set custom HTTP client using `zooz.OptHTTPClient` option:\n```\nhttpClient := \u0026http.Client{\n\tTimeout: time.Minute,\n}\n\nclient := zooz.New(\n\tzooz.OptAppID(\"com.yourhost.go_client\"),\n\tzooz.OptPrivateKey(\"a630518c-22da-4eaa-bb39-502ad7832030\"),\n\tzooz.OptHTTPClient(httpClient),\n)\n```\nYou can use any HTTP client, implementing `zooz.HTTPClient` interface with method `Do(r *http.Request) (*http.Response, error)`. Built-in `net/http` client implements it, of course.\n\n## Test/live environment\n\nZooz supports test and live environment. Environment is defined by `x-payments-os-env` request header.\n\nBy default, client sends `test` value. You can redefine this value to `live` using `zooz.OptEnv(zooz.EnvLive)` option.\n```\nclient := zooz.New(\n\tzooz.OptAppID(\"com.yourhost.go_client\"),\n\tzooz.OptPrivateKey(\"a630518c-22da-4eaa-bb39-502ad7832030\"),\n\tzooz.OptEnv(zooz.EnvLive),\n)\n```\n\n## Tokens\n\nAPI methods for Tokens are not implemented in this client, because they are supposed to be used on client-side, not server-side. See example here: https://developers.paymentsos.com/docs/collecting-payment-details.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fgo-zooz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojuno%2Fgo-zooz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fgo-zooz/lists"}