Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 879 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 879 Bytes

revcatgo

GoDev

Run test

A helper library for integrating the server side apps and RevenueCat webhook service

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

Receive webhooks

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 specification

See the official document.