- go.mod module path + all self-imports: github.com/formancehq/payments -> github.com/hanzo-fi/payments (1590 .go files / 3152 refs; 20 modules: root, pkg/client, pkg/domain, 18 ce/plugins). External dep kept: formancehq/go-libs. - plugins: each ce/plugins/* consumed a *published* pkg/domain; added local 'replace .../pkg/domain => ../../../pkg/domain' (consistent with root) so every standalone plugin module builds in-monorepo. compile-plugin.sh MOD var rebranded too. - branding: README, LICENSE (dual MIT+EE; upstream copyright retained + Hanzo added), goreleaser (release images -> registry.hanzo.ai/hanzo-fi, OCI labels, homepage), proto go_package, renovate, speakeasy gen.yaml, connector-template *.gotpl. - CI: removed Numary/Formance workflows + composite action; added canonical hanzo.yml + cicd.yml (hanzoai/ci, gated HANZO_CI_ENABLED) + secretless ci.yml (go build/vet). - kept as data/compat keys: wire capability enums ALLOW_FORMANCE_*, generated SDK type client.Formance, domain field FormanceRedirectURL, OTEL_SERVICE_NAME, upstream base image. - verified: go build ./... (default + -tags ee) + all 20 nested modules green.
174 KiB
V1
(Payments.V1)
Overview
Available Operations
- GetServerInfo - Get server info
- CreatePayment - Create a payment
- ListPayments - List payments
- GetPayment - Get a payment
- UpdateMetadata - Update metadata
- ListTransferInitiations - List Transfer Initiations
- CreateTransferInitiation - Create a TransferInitiation
- GetTransferInitiation - Get a transfer initiation
- DeleteTransferInitiation - Delete a transfer initiation
- UpdateTransferInitiationStatus - Update the status of a transfer initiation
- ReverseTransferInitiation - Reverse a transfer initiation
- RetryTransferInitiation - Retry a failed transfer initiation
- ListPools - List Pools
- CreatePool - Create a Pool
- GetPool - Get a Pool
- DeletePool - Delete a Pool
- UpdatePoolQuery - Update the query of a pool
- AddAccountToPool - Add an account to a pool
- RemoveAccountFromPool - Remove an account from a pool
- GetPoolBalances - Get historical pool balances at a particular point in time
- GetPoolBalancesLatest - Get latest pool balances
- CreateAccount - Create an account
- ListAccounts - List accounts
- GetAccount - Get an account
- GetAccountBalances - Get account balances
- CreateBankAccount - Create a BankAccount in Payments and on the PSP
- ListBankAccounts - List bank accounts created by user on Formance
- GetBankAccount - Get a bank account created by user on Formance
- ForwardBankAccount - Forward a bank account to a connector
- UpdateBankAccountMetadata - Update metadata of a bank account
- ListAllConnectors - List all installed connectors
- ListConfigsAvailableConnectors - List the configs of each available connector
- InstallConnector - Install a connector
UninstallConnector- Uninstall a connector ⚠️ Deprecated- UninstallConnectorV1 - Uninstall a connector
ReadConnectorConfig- Read the config of a connector ⚠️ Deprecated- UpdateConnectorConfigV1 - Update the config of a connector
- ReadConnectorConfigV1 - Read the config of a connector
ResetConnector- Reset a connector ⚠️ Deprecated- ResetConnectorV1 - Reset a connector
ListConnectorTasks- List tasks from a connector ⚠️ Deprecated- ListConnectorTasksV1 - List tasks from a connector
GetConnectorTask- Read a specific task of the connector ⚠️ Deprecated- GetConnectorTaskV1 - Read a specific task of the connector
- ConnectorsTransfer - Transfer funds between Connector accounts
GetServerInfo
Get server info
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetServerInfo(ctx)
if err != nil {
log.Fatal(err)
}
if res.ServerInfo != 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.GetServerInfoResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreatePayment
Create a payment
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/types"
"math/big"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.CreatePayment(ctx, components.PaymentRequest{
Reference: "<value>",
ConnectorID: "<id>",
CreatedAt: types.MustTimeFromString("2025-11-09T01:03:21.011Z"),
Amount: big.NewInt(100),
Type: components.PaymentTypeOther,
Status: components.PaymentStatusRefundedFailure,
Scheme: components.PaymentSchemeSepaDebit,
Asset: "USD",
})
if err != nil {
log.Fatal(err)
}
if res.PaymentResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PaymentRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreatePaymentResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListPayments
List payments
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListPayments(ctx, nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), []string{
"date:asc",
"status:desc",
}, nil)
if err != nil {
log.Fatal(err)
}
if res.PaymentsCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
sort |
[]string | ➖ | Fields used to sort payments (default is date:desc). | [ "date:asc", "status:desc" ] |
query |
*string | ➖ | Filters used to filter resources. |
|
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListPaymentsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPayment
Get a payment
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetPayment(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.PaymentResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
paymentID |
string | ✔️ | The payment ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPaymentResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateMetadata
Update metadata
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UpdateMetadata(ctx, "XXX", map[string]string{
"key": "<value>",
"key1": "<value>",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
paymentID |
string | ✔️ | The payment ID. | XXX |
requestBody |
map[string]string | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateMetadataResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListTransferInitiations
List Transfer Initiations
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListTransferInitiations(ctx, nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), []string{
"date:asc",
"status:desc",
}, nil)
if err != nil {
log.Fatal(err)
}
if res.TransferInitiationsCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
sort |
[]string | ➖ | Fields used to sort payments (default is date:desc). | [ "date:asc", "status:desc" ] |
query |
*string | ➖ | Filters used to filter resources. |
|
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListTransferInitiationsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreateTransferInitiation
Create a transfer initiation
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/types"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"math/big"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.CreateTransferInitiation(ctx, components.TransferInitiationRequest{
Reference: "XXX",
ScheduledAt: types.MustTimeFromString("2023-10-09T08:11:40.585Z"),
Description: "worthy pace vague ick liberalize between um",
SourceAccountID: "<id>",
DestinationAccountID: "<id>",
Type: components.TransferInitiationRequestTypePayout,
Amount: big.NewInt(847873),
Asset: "USD",
Validated: true,
})
if err != nil {
log.Fatal(err)
}
if res.TransferInitiationResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.TransferInitiationRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreateTransferInitiationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetTransferInitiation
Get a transfer initiation
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetTransferInitiation(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.TransferInitiationResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
transferID |
string | ✔️ | The transfer ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetTransferInitiationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeleteTransferInitiation
Delete a transfer initiation by its id.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.DeleteTransferInitiation(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
transferID |
string | ✔️ | The transfer ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeleteTransferInitiationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateTransferInitiationStatus
Update a transfer initiation status
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UpdateTransferInitiationStatus(ctx, "XXX", components.UpdateTransferInitiationStatusRequest{
Status: components.StatusValidated,
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
transferID |
string | ✔️ | The transfer ID. | XXX |
updateTransferInitiationStatusRequest |
components.UpdateTransferInitiationStatusRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateTransferInitiationStatusResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ReverseTransferInitiation
Reverse transfer initiation
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"math/big"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ReverseTransferInitiation(ctx, "XXX", components.ReverseTransferInitiationRequest{
Reference: "XXX",
Description: "emerge whose mechanically outside kissingly",
Amount: big.NewInt(978360),
Asset: "USD",
Metadata: map[string]string{
"key": "<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
transferID |
string | ✔️ | The transfer ID. | XXX |
reverseTransferInitiationRequest |
components.ReverseTransferInitiationRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ReverseTransferInitiationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
RetryTransferInitiation
Retry a failed transfer initiation
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.RetryTransferInitiation(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
transferID |
string | ✔️ | The transfer ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.RetryTransferInitiationResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListPools
List Pools
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListPools(ctx, nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), []string{
"date:asc",
"status:desc",
}, nil)
if err != nil {
log.Fatal(err)
}
if res.PoolsCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
sort |
[]string | ➖ | Fields used to sort payments (default is date:desc). | [ "date:asc", "status:desc" ] |
query |
*string | ➖ | Filters used to filter resources. |
|
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListPoolsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreatePool
Create a Pool
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.CreatePool(ctx, components.PoolRequest{
Name: "<value>",
AccountIDs: []string{
"<value>",
"<value>",
"<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res.PoolResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.PoolRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreatePoolResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPool
Get a Pool
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetPool(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.PoolResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPoolResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
DeletePool
Delete a pool by its id.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.DeletePool(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.DeletePoolResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdatePoolQuery
Update the query of a pool
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UpdatePoolQuery(ctx, "XXX", components.UpdatePoolQueryRequest{
Query: map[string]any{
"key": "<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
updatePoolQueryRequest |
components.UpdatePoolQueryRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdatePoolQueryResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
AddAccountToPool
Add an account to a pool
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.AddAccountToPool(ctx, "XXX", components.AddAccountToPoolRequest{
AccountID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
addAccountToPoolRequest |
components.AddAccountToPoolRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.AddAccountToPoolResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
RemoveAccountFromPool
Remove an account from a pool by its id.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.RemoveAccountFromPool(ctx, "XXX", "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
accountID |
string | ✔️ | The account ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.RemoveAccountFromPoolResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPoolBalances
Get historical pool balances at a particular point in time
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/types"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetPoolBalances(ctx, "XXX", types.MustTimeFromString("2024-05-04T06:40:23.119Z"))
if err != nil {
log.Fatal(err)
}
if res.PoolBalancesResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
at |
time.Time | ✔️ | Filter balances by date. |
|
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPoolBalancesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetPoolBalancesLatest
Get latest pool balances
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetPoolBalancesLatest(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.PoolBalancesLatestResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
poolID |
string | ✔️ | The pool ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetPoolBalancesLatestResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreateAccount
Create an account
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/types"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.CreateAccount(ctx, components.AccountRequest{
Reference: "<value>",
ConnectorID: "<id>",
CreatedAt: types.MustTimeFromString("2025-08-19T02:15:08.152Z"),
Type: components.AccountTypeInternal,
})
if err != nil {
log.Fatal(err)
}
if res.AccountResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.AccountRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreateAccountResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListAccounts
List accounts
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListAccounts(ctx, operations.ListAccountsRequest{
Cursor: client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="),
Sort: []string{
"date:asc",
"status:desc",
},
})
if err != nil {
log.Fatal(err)
}
if res.AccountsCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListAccountsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListAccountsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetAccount
Get an account
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetAccount(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.AccountResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
accountID |
string | ✔️ | The account ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetAccountResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetAccountBalances
Get account balances
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetAccountBalances(ctx, operations.GetAccountBalancesRequest{
AccountID: "XXX",
Cursor: client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="),
Sort: []string{
"date:asc",
"status:desc",
},
})
if err != nil {
log.Fatal(err)
}
if res.BalancesCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetAccountBalancesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetAccountBalancesResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
CreateBankAccount
Create a bank account in Payments and on the PSP.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.CreateBankAccount(ctx, components.BankAccountRequest{
Country: "GB",
Name: "My account",
})
if err != nil {
log.Fatal(err)
}
if res.BankAccountResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
components.BankAccountRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.CreateBankAccountResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListBankAccounts
List all bank accounts created by user on Formance.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListBankAccounts(ctx, nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="), []string{
"date:asc",
"status:desc",
})
if err != nil {
log.Fatal(err)
}
if res.BankAccountsCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
sort |
[]string | ➖ | Fields used to sort payments (default is date:desc). | [ "date:asc", "status:desc" ] |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListBankAccountsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetBankAccount
Get a bank account created by user on Formance
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetBankAccount(ctx, "XXX")
if err != nil {
log.Fatal(err)
}
if res.BankAccountResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
bankAccountID |
string | ✔️ | The bank account ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetBankAccountResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ForwardBankAccount
Forward a bank account to a connector
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ForwardBankAccount(ctx, "XXX", components.ForwardBankAccountRequest{
ConnectorID: "<id>",
})
if err != nil {
log.Fatal(err)
}
if res.BankAccountResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
bankAccountID |
string | ✔️ | The bank account ID. | XXX |
forwardBankAccountRequest |
components.ForwardBankAccountRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ForwardBankAccountResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateBankAccountMetadata
Update metadata of a bank account
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UpdateBankAccountMetadata(ctx, "XXX", components.UpdateBankAccountMetadataRequest{
Metadata: map[string]string{
"key": "<value>",
},
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
bankAccountID |
string | ✔️ | The bank account ID. | XXX |
updateBankAccountMetadataRequest |
components.UpdateBankAccountMetadataRequest | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateBankAccountMetadataResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListAllConnectors
List all installed connectors.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListAllConnectors(ctx)
if err != nil {
log.Fatal(err)
}
if res.ConnectorsResponse != 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.ListAllConnectorsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListConfigsAvailableConnectors
List the configs of each available connector.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListConfigsAvailableConnectors(ctx)
if err != nil {
log.Fatal(err)
}
if res.ConnectorsConfigsResponse != 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.ListConfigsAvailableConnectorsResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
InstallConnector
Install a connector by its name and config.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.InstallConnector(ctx, components.ConnectorAtlar, components.CreateConnectorConfigWise(
components.WiseConfig{
Name: "My Wise Account",
APIKey: "XXX",
},
))
if err != nil {
log.Fatal(err)
}
if res.ConnectorResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
connector |
components.Connector | ✔️ | The name of the connector. |
connectorConfig |
components.ConnectorConfig | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.InstallConnectorResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UninstallConnector
Uninstall a connector by its name.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UninstallConnector(ctx, components.ConnectorModulr)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
connector |
components.Connector | ✔️ | The name of the connector. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UninstallConnectorResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UninstallConnectorV1
Uninstall a connector by its name.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UninstallConnectorV1(ctx, components.ConnectorGeneric, "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UninstallConnectorV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ReadConnectorConfig
Read connector config
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ReadConnectorConfig(ctx, components.ConnectorGeneric)
if err != nil {
log.Fatal(err)
}
if res.ConnectorConfigResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
connector |
components.Connector | ✔️ | The name of the connector. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ReadConnectorConfigResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
UpdateConnectorConfigV1
Update connector config
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.UpdateConnectorConfigV1(ctx, components.ConnectorAdyen, "XXX", components.CreateConnectorConfigStripe(
components.StripeConfig{
Name: "My Stripe Account",
APIKey: "XXX",
},
))
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
connectorConfig |
components.ConnectorConfig | ✔️ | N/A | |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.UpdateConnectorConfigV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ReadConnectorConfigV1
Read connector config
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ReadConnectorConfigV1(ctx, components.ConnectorCurrencyCloud, "XXX")
if err != nil {
log.Fatal(err)
}
if res.ConnectorConfigResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ReadConnectorConfigV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ResetConnector
Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ResetConnector(ctx, components.ConnectorAtlar)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
connector |
components.Connector | ✔️ | The name of the connector. |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ResetConnectorResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ResetConnectorV1
Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ResetConnectorV1(ctx, components.ConnectorGeneric, "XXX")
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ResetConnectorV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListConnectorTasks
List all tasks associated with this connector.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListConnectorTasks(ctx, components.ConnectorModulr, nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="))
if err != nil {
log.Fatal(err)
}
if res.TasksCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListConnectorTasksResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ListConnectorTasksV1
List all tasks associated with this connector.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ListConnectorTasksV1(ctx, components.ConnectorBankingCircle, "XXX", nil, client.String("aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="))
if err != nil {
log.Fatal(err)
}
if res.TasksCursor != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
pageSize |
*int64 | ➖ | The maximum number of results to return per page. |
100 |
cursor |
*string | ➖ | Parameter used in pagination requests. Maximum page size is set to 15. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. |
aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ListConnectorTasksV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetConnectorTask
Get a specific task associated to the connector.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetConnectorTask(ctx, components.ConnectorAdyen, "task1")
if err != nil {
log.Fatal(err)
}
if res.TaskResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
taskID |
string | ✔️ | The task ID. | task1 |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetConnectorTaskResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
GetConnectorTaskV1
Get a specific task associated to the connector.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.GetConnectorTaskV1(ctx, components.ConnectorBankingCircle, "XXX", "task1")
if err != nil {
log.Fatal(err)
}
if res.TaskResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
connector |
components.Connector | ✔️ | The name of the connector. | |
connectorID |
string | ✔️ | The connector ID. | XXX |
taskID |
string | ✔️ | The task ID. | task1 |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.GetConnectorTaskV1Response, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |
ConnectorsTransfer
Execute a transfer between two accounts.
Example Usage
package main
import(
"context"
"github.com/hanzo-fi/payments/pkg/client"
"os"
"github.com/hanzo-fi/payments/pkg/client/models/components"
"math/big"
"log"
)
func main() {
ctx := context.Background()
s := client.New(
"https://api.example.com",
client.WithSecurity(os.Getenv("FORMANCE_AUTHORIZATION")),
)
res, err := s.Payments.V1.ConnectorsTransfer(ctx, components.ConnectorBankingCircle, components.TransferRequest{
Amount: big.NewInt(100),
Asset: "USD",
Destination: "acct_1Gqj58KZcSIg2N2q",
Source: client.String("acct_1Gqj58KZcSIg2N2q"),
})
if err != nil {
log.Fatal(err)
}
if res.TransferResponse != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
connector |
components.Connector | ✔️ | The name of the connector. |
transferRequest |
components.TransferRequest | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
Response
*operations.ConnectorsTransferResponse, error
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4XX, 5XX | */* |