Get authenticated customer.
Scopes: customer_portal:read customer_portal:write
customer_portal:read
customer_portal:write
Go
package main import( "context" polargo "github.com/polarsource/polar-go" "os" "github.com/polarsource/polar-go/models/operations" "log" ) func main() { ctx := context.Background() s := polargo.New() res, err := s.CustomerPortal.Customers.Get(ctx, operations.CustomerPortalCustomersGetSecurity{ CustomerSession: os.Getenv("POLAR_CUSTOMER_SESSION"), }) if err != nil { log.Fatal(err) } if res.CustomerPortalCustomer != nil { // handle response } }
{ "created_at": "2023-11-07T05:31:56Z", "modified_at": "2023-11-07T05:31:56Z", "id": "<string>", "email": "<string>", "email_verified": true, "name": "<string>", "billing_name": "<string>", "billing_address": { "line1": "<string>", "line2": "<string>", "postal_code": "<string>", "city": "<string>", "state": "<string>", "country": "US" }, "tax_id": [ "911144442", "us_ein" ], "oauth_accounts": {}, "default_payment_method_id": "<string>" }
Show child attributes
2
Was this page helpful?