Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OAuth2Endpoint = oauth2.Endpoint{
AuthURL: "https://api.sumup.com/authorize",
TokenURL: "https://api.sumup.com/token",
}
OAuth2Endpoint is SumUp's OAuth 2.0 endpoint.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Checkouts *checkouts.Client
Customers *customers.Client
Members *members.Client
Memberships *memberships.Client
Merchant *merchant.Client
Merchants *merchants.Client
Payouts *payouts.Client
Readers *readers.Client
Receipts *receipts.Client
Roles *roles.Client
Subaccounts *subaccounts.Client
Transactions *transactions.Client
// contains filtered or unexported fields
}
Example ¶
client := sumup.NewClient()
account, err := client.Merchant.Get(context.Background(), merchant.GetParams{})
if err != nil {
log.Printf("[ERROR] get merchant account: %v", err)
return
}
log.Printf("[INFO] merchant profile: %+v", *account.MerchantProfile)
func NewClient ¶
func NewClient(opts ...client.ClientOption) *Client
NewClient creates new SumUp API client. The client is by default configured environment variables (`SUMUP_API_KEY`). To override the default configuration use [ClientOption]s.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package datetime provides custom date and time types with JSON marshaling support.
|
Package datetime provides custom date and time types with JSON marshaling support. |
|
example
module
|
|
|
checkout
command
|
|
|
full
command
This example demonstrates a complete checkout flow with the SumUp payment widget.
|
This example demonstrates a complete checkout flow with the SumUp payment widget. |
|
oauth2
command
OAuth 2.0 Authorization Code flow with SumUp
|
OAuth 2.0 Authorization Code flow with SumUp |
|
simple
command
|
|
Click to show internal directories.
Click to hide internal directories.