All URIs are relative to https://api.paystack.co
| Method | HTTP request | Description |
|---|---|---|
| BalanceFetch | Get /balance | Fetch Balance |
| BalanceLedger | Get /balance/ledger | Balance Ledger |
Response BalanceFetch(ctx).Execute()
Fetch Balance
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BalanceAPI.BalanceFetch(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BalanceAPI.BalanceFetch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BalanceFetch`: Response
fmt.Fprintf(os.Stdout, "Response from `BalanceAPI.BalanceFetch`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiBalanceFetchRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Response BalanceLedger(ctx).PerPage(perPage).Page(page).From(from).To(to).Execute()
Balance Ledger
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
perPage := int32(56) // int32 | Number of records to fetch per page (optional)
page := int32(56) // int32 | The section to retrieve (optional)
from := time.Now() // time.Time | The start date (optional)
to := time.Now() // time.Time | The end date (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.BalanceAPI.BalanceLedger(context.Background()).PerPage(perPage).Page(page).From(from).To(to).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `BalanceAPI.BalanceLedger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BalanceLedger`: Response
fmt.Fprintf(os.Stdout, "Response from `BalanceAPI.BalanceLedger`: %v\n", resp)
}Other parameters are passed through a pointer to a apiBalanceLedgerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| perPage | int32 | Number of records to fetch per page | |
| page | int32 | The section to retrieve | |
| from | time.Time | The start date | |
| to | time.Time | The end date |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]