{"id":45585370,"url":"https://github.com/mhemmings/revenuecat","last_synced_at":"2026-02-23T11:52:30.502Z","repository":{"id":49270379,"uuid":"272995315","full_name":"mhemmings/revenuecat","owner":"mhemmings","description":"Go package for interacting with the RevenueCat API","archived":false,"fork":false,"pushed_at":"2024-11-25T14:03:06.000Z","size":20,"stargazers_count":12,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-25T15:19:29.464Z","etag":null,"topics":["go","golang","revenuecat","subscriptions"],"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/mhemmings.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":"2020-06-17T14:26:15.000Z","updated_at":"2024-11-25T14:02:39.000Z","dependencies_parsed_at":"2024-04-24T10:56:04.593Z","dependency_job_id":"32768566-7d4c-42dd-89c5-e47938b8046a","html_url":"https://github.com/mhemmings/revenuecat","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mhemmings/revenuecat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhemmings%2Frevenuecat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhemmings%2Frevenuecat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhemmings%2Frevenuecat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhemmings%2Frevenuecat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhemmings","download_url":"https://codeload.github.com/mhemmings/revenuecat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhemmings%2Frevenuecat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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":["go","golang","revenuecat","subscriptions"],"created_at":"2026-02-23T11:52:29.811Z","updated_at":"2026-02-23T11:52:30.494Z","avatar_url":"https://github.com/mhemmings.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RevenueCat\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/mhemmings/revenuecat)](https://pkg.go.dev/github.com/mhemmings/revenuecat)\n[![Test](https://github.com/mhemmings/revenuecat/workflows/Test/badge.svg?branch=master)](https://github.com/mhemmings/revenuecat/actions?query=workflow%3ATest)\n\nGo package for interacting with the [RevenueCat API](https://docs.revenuecat.com/reference).\n\n## Usage\n\n### Examples\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/mhemmings/revenuecat\"\n)\n\nfunc main() {\n\trc := revenuecat.New(\"apikey\")\n\tsub, _ := rc.GetSubscriber(\"123\")\n\tentitled := sub.IsEntitledTo(\"premium\")\n\n\tfmt.Printf(\"user entitled: %t\\n\", entitled)\n}\n```\n\n#### Client With Options\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/mhemmings/revenuecat\"\n)\n\nfunc main() {\n\tcustomClient := \u0026http.Client{\n\t\tTimeout: 20 * time.Second,\n\t}\n\n\trc := revenuecat.New(\"apikey\", revenuecat.WithHTTPClient(customClient), revenuecat.WithSandboxEnabled(true), revenuecat.WithAPIURL(\"https://custom.api.url/v1/\"))\n\n\tsub, _ := rc.GetSubscriber(\"123\")\n\tentitled := sub.IsEntitledTo(\"premium\")\n\n\tfmt.Printf(\"user entitled: %t\\n\", entitled)\n}\n```\n\n### Documentation\n\nFor full documentation, see [pkg.go.dev/github.com/mhemmings/revenuecat](https://pkg.go.dev/github.com/mhemmings/revenuecat)\n\n\n#### func (*Client) AddUserAttribution\n\n```go\nfunc (c *Client) AddUserAttribution(userID string, network Network, data AttributionData) error\n```\nAddUserAttribution attaches attribution data to a subscriber from specific\nsupported networks. https://docs.revenuecat.com/reference#subscribersattribution\n\n#### func (*Client) CreatePurchase\n\n```go\nfunc (c *Client) CreatePurchase(userID string, receipt string, opt *CreatePurchaseOptions) (Subscriber, error)\n```\nCreatePurchase records a purchase for a user from iOS, Android, or Stripe and\nwill create a user if they don't already exist.\nhttps://docs.revenuecat.com/reference#receipts\n\n#### func (*Client) DeferGoogleSubscription\n\n```go\nfunc (c *Client) DeferGoogleSubscription(userID string, id string, nextExpiry time.Time) (Subscriber, error)\n```\nDeferGoogleSubscription defers the purchase of a Google Subscription to a later\ndate. https://docs.revenuecat.com/reference#defer-a-google-subscription\n\n#### func (*Client) DeleteOfferingOverride\n\n```go\nfunc (c *Client) DeleteOfferingOverride(userID string) (Subscriber, error)\n```\nDeleteOfferingOverride reset the offering overrides back to the current offering\nfor a specific user.\nhttps://docs.revenuecat.com/reference#delete-offering-override\n\n#### func (*Client) DeleteSubscriber\n\n```go\nfunc (c *Client) DeleteSubscriber(userID string) error\n```\nDeleteSubscriber permanently deletes a subscriber.\nhttps://docs.revenuecat.com/reference#subscribersapp_user_id\n\n#### func (*Client) GetSubscriber\n\n```go\nfunc (c *Client) GetSubscriber(userID string) (Subscriber, error)\n```\nGetSubscriber gets the latest subscriber info or creates one if it doesn't\nexist. https://docs.revenuecat.com/reference#subscribers\n\n#### func (*Client) GetSubscriberWithPlatform\n\n```go\nfunc (c *Client) GetSubscriberWithPlatform(userID string, platform string) (Subscriber, error)\n```\nGetSubscriberWithPlatform gets the latest subscriber info or creates one if it\ndoesn't exist, updating the subscriber record's last_seen value for the platform\nprovided. https://docs.revenuecat.com/reference#subscribers\n\n#### func (*Client) GrantEntitlement\n\n```go\nfunc (c *Client) GrantEntitlement(userID string, id string, duration Duration, startTime time.Time) (Subscriber, error)\n```\nGrantEntitlement grants a user a promotional entitlement.\nhttps://docs.revenuecat.com/reference#grant-a-promotional-entitlement\n\n#### func (*Client) OverrideOffering\n\n```go\nfunc (c *Client) OverrideOffering(userID string, offeringUUID string) (Subscriber, error)\n```\nOverrideOffering overrides the current Offering for a specific user.\nhttps://docs.revenuecat.com/reference#override-offering\n\n#### func (*Client) RefundGoogleSubscription\n\n```go\nfunc (c *Client) RefundGoogleSubscription(userID string, id string) (Subscriber, error)\n```\nRefundGoogleSubscription immediately revokes access to a Google Subscription and\nissues a refund for the last purchase.\nhttps://docs.revenuecat.com/reference#revoke-a-google-subscription\n\n#### func (*Client) RevokeEntitlement\n\n```go\nfunc (c *Client) RevokeEntitlement(userID string, id string) (Subscriber, error)\n```\nRevokeEntitlement revokes all promotional entitlements for a given entitlement\nidentifier and app user ID.\nhttps://docs.revenuecat.com/reference#revoke-promotional-entitlements\n\n#### func (*Client) UpdateSubscriberAttributes\n\n```go\nfunc (c *Client) UpdateSubscriberAttributes(userID string, attributes map[string]SubscriberAttribute) error\n```\nUpdateSubscriberAttributes updates subscriber attributes for a user.\nhttps://docs.revenuecat.com/reference#update-subscriber-attributes\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhemmings%2Frevenuecat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhemmings%2Frevenuecat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhemmings%2Frevenuecat/lists"}