{"id":35079745,"url":"https://github.com/gojuno/go-checkout","last_synced_at":"2026-05-23T07:06:54.297Z","repository":{"id":57546321,"uuid":"169556216","full_name":"gojuno/go-checkout","owner":"gojuno","description":"Checkout.com API client","archived":false,"fork":false,"pushed_at":"2019-03-21T09:40:16.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-20T08:14:20.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2019-02-07T10:44:33.000Z","updated_at":"2019-03-21T09:40:17.000Z","dependencies_parsed_at":"2022-09-26T18:30:58.414Z","dependency_job_id":null,"html_url":"https://github.com/gojuno/go-checkout","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gojuno/go-checkout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-checkout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-checkout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-checkout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-checkout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gojuno","download_url":"https://codeload.github.com/gojuno/go-checkout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gojuno%2Fgo-checkout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33386084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-27T12:54:38.569Z","updated_at":"2026-05-23T07:06:54.292Z","avatar_url":"https://github.com/gojuno.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Checkout.com API client [![GoDoc](https://godoc.org/github.com/gojuno/go-checkout?status.svg)](http://godoc.org/github.com/gojuno/go-checkout) [![Build Status](https://travis-ci.org/gojuno/go-checkout.svg?branch=master)](https://travis-ci.org/gojuno/go-checkout) [![Go Report Card](https://goreportcard.com/badge/github.com/gojuno/go-checkout)](https://goreportcard.com/report/github.com/gojuno/go-checkout)\n\nThis repo contains Checkout.com API client written in Go.\n\nCheckout.com API documentation: https://docs.checkout.com/v2.0/docs/integration-options\n\nBefore using this client you need to register an account.\n\n## How to install\n\nDownload package:\n```\ngo get github.com/gojuno/go-checkout\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\nGo modules are supported as well.\n\n## How to use\n\nTo init client you will need `secret_key` which you can get from your Checkout.com account profile.\n```\nimport \"github.com/gojuno/go-checkout\"\n...\n// Init client\nclient := checkout.New(\n\tcheckout.OptSecretKey(\"your_secret_key\"),\n)\n\npaymentClient := payment.NewClient(client)\n\n// Create new payment\np, err := paymentClient.Create(\n\tcontext.Background(),\n\t\"payment_idempotency_key\",\n\t\u0026payment.CreateParams{\n        Source:   payment.CreationSource{\n            Type: payment.SourceTypeID,\n            ID:   \"src_vjkl7cyod4zejpkk5dwpvla7ca\",\n        },\n        Amount:   2000,\n        Currency: \"USD\",\n\t},\n)\n\n// Refund payment\nerr = paymentClient.Refund(\n\tcontext.Background(),\n\tp.ID,\n\t\"refund_idempotency_key\",\n\t\u0026payment.RefundParams{\n\t\tAmount: 1000,\n\t},\n)\n```\n\n## Custom HTTP client\n\nBy default client uses `http.DefaultClient`. You can set custom HTTP client using `checkout.OptHTTPClient` option:\n```\nhttpClient := \u0026http.Client{\n\tTimeout: time.Minute,\n}\n\nclient := checkout.New(\n\tcheckout.OptSecretKey(\"your_secret_key\"),\n\tcheckout.OptHTTPClient(httpClient),\n)\n```\nYou can use any HTTP client, implementing `checkout.HTTPClient` interface with method `Do(r *http.Request) (*http.Response, error)`. Built-in `net/http` client implements it, of course.\n\n## Sandbox\n\nCheckout.com supports sandbox and live environment. By default, client will use live endpoint. To use sandbox define sandbox endpoint when client is created.\n\n```\nclient := checkout.New(\n\tcheckout.OptSecretKey(\"your_secret_key\"),\n\tcheckout.OptEndpoint(checkout.EndpointSandbox),\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fgo-checkout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgojuno%2Fgo-checkout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgojuno%2Fgo-checkout/lists"}