Created
December 2, 2022 00:26
-
-
Save chrisjsimpson/e8ba92bc97efde72331279d5a345dad1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "github.com/stripe/stripe-go/v74" | |
import "github.com/stripe/stripe-go/v74/account" | |
import "encoding/json" | |
import "fmt" | |
import "os" | |
func main() { | |
stripe_api_key := os.Getenv("STRIPE_API_KEY") | |
stripe.Key = stripe_api_key | |
fmt.Println("The Go library stripe version is", stripe.APIVersion) | |
params := &stripe.AccountListParams{} | |
params.Filters.AddFilter("limit", "", "3") | |
i := account.List(params) | |
for i.Next() { | |
ac := i.Account() | |
prettyJSON, _ := json.MarshalIndent(ac, "", " ") | |
fmt.Println("%s\n", string(prettyJSON)) | |
fmt.Println("The account: " + ac.ID) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment