Skip to content

Latest commit

 

History

History
72 lines (52 loc) · 2.47 KB

README.md

File metadata and controls

72 lines (52 loc) · 2.47 KB

Formance SDK

Overview

Formance Stack API: Open, modular foundation for unique payments flows

Introduction

This API is documented in OpenAPI format.

Authentication

Formance Stack offers one forms of authentication:

  • OAuth2 OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.

Available Operations

GetVersions

Show stack version information

Example Usage

package main

import(
	"github.com/formancehq/formance-sdk-go/v3/pkg/models/shared"
	formancesdkgo "github.com/formancehq/formance-sdk-go/v3"
	"context"
	"log"
)

func main() {
    s := formancesdkgo.New(
        formancesdkgo.WithSecurity(shared.Security{
            ClientID: formancesdkgo.String("<YOUR_CLIENT_ID_HERE>"),
            ClientSecret: formancesdkgo.String("<YOUR_CLIENT_SECRET_HERE>"),
        }),
    )

    ctx := context.Background()
    res, err := s.GetVersions(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.GetVersionsResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
opts []operations.Option The options for this request.

Response

*operations.GetVersionsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*