Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iktakahiro/revcatgo

A helper library for integrating server-side apps with the RevenueCat webhook service.
https://github.com/iktakahiro/revcatgo

go golang revenuecat

Last synced: about 2 months ago
JSON representation

A helper library for integrating server-side apps with the RevenueCat webhook service.

Awesome Lists containing this project

README

        

# revcatgo

[![GoDev][godev-image]][godev-url]

![Run test](https://github.com/iktakahiro/revcatgo/workflows/Run%20test/badge.svg?branch=main)

A helper library for integrating server-side apps with the [RevenueCat](https://www.revenuecat.com) webhook service.

```bash
go get "github.com/iktakahiro/[email protected]"
```

## Receiving webhooks

```go
func bind(w http.ResponseWriter, r *http.Request) error {
var webhookEvent revcatgo.WebhookEvent

err := json.NewDecoder(r.Body).Decode(&webhookEvent)
if err != nil {
return err
}
fmt.Println(webhookEvent.Type) // e.g. "INITIAL_PURCHASE"
return nil
}
```

## RevenueCat webhooks specifications

Refer to the official documentation:

*

[godev-image]: https://pkg.go.dev/badge/github.com/iktakahiro/revcatgo
[godev-url]: https://pkg.go.dev/github.com/iktakahiro/revcatgo