Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- stripe "github.com/stripe/stripe-go"
- "github.com/stripe/stripe-go/webhookendpoint"
- )
- func main() {
- stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
- params := &stripe.WebhookEndpointParams{
- URL: stripe.String("https://example.com/my/new/webhook/endpoint"),
- }
- endpoint, err := webhookendpoint.Update("we_1ChdOEJoUivz182DjYJiSX9s", params)
- if err != nil {
- if stripeErr, ok := err.(*stripe.Error); ok {
- fmt.Printf("Request ID : %v\n", stripeErr.RequestID)
- }
- }else{
- fmt.Println(endpoint.ID);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement