Skip to content

Latest commit

 

History

History
1960 lines (1348 loc) · 130 KB

File metadata and controls

1960 lines (1348 loc) · 130 KB

FormancePaymentsV1

(Payments.V1)

Overview

Available Operations

PaymentsgetServerInfo

Get server info

Example Usage

using formance;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.PaymentsgetServerInfoAsync();

// handle response

Response

PaymentsgetServerInfoResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

CreatePayment

Create a payment

Example Usage

using formance;
using formance.Models.Components;
using System.Numerics;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

PaymentRequest req = new PaymentRequest() {
    Reference = "<value>",
    ConnectorID = "<value>",
    CreatedAt = System.DateTime.Parse("2024-11-09T01:03:21.011Z"),
    Amount = 100,
    Type = formance.Models.Components.PaymentType.Other,
    Status = formance.Models.Components.PaymentStatus.RefundedFailure,
    Scheme = formance.Models.Components.PaymentScheme.SepaDebit,
    Asset = "USD",
};

var res = await sdk.Payments.V1.CreatePaymentAsync(req);

// handle response

Parameters

Parameter Type Required Description
request PaymentRequest ✔️ The request object to use for the request.

Response

CreatePaymentResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListPayments

List payments

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListPaymentsAsync(
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    sort: new List<string>() {
        "date:asc",
        "status:desc",
    },
    query: "<value>"
);

// handle response

Parameters

Parameter Type Required Description Example
PageSize long 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 List<string> Fields used to sort payments (default is date:desc). [
"date:asc",
"status:desc"
]
Query string Filters used to filter resources.

Response

ListPaymentsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetPayment

Get a payment

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetPaymentAsync(paymentId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
PaymentId string ✔️ The payment ID. XXX

Response

GetPaymentResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

UpdateMetadata

Update metadata

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UpdateMetadataAsync(
    paymentId: "XXX",
    requestBody: new Dictionary<string, string>() {
        { "key", "<value>" },
    }
);

// handle response

Parameters

Parameter Type Required Description Example
PaymentId string ✔️ The payment ID. XXX
RequestBody Dictionary<String, string> ✔️ N/A

Response

UpdateMetadataResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListTransferInitiations

List Transfer Initiations

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListTransferInitiationsAsync(
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    sort: new List<string>() {
        "date:asc",
        "status:desc",
    },
    query: "<value>"
);

// handle response

Parameters

Parameter Type Required Description Example
PageSize long 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 List<string> Fields used to sort payments (default is date:desc). [
"date:asc",
"status:desc"
]
Query string Filters used to filter resources.

Response

ListTransferInitiationsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

CreateTransferInitiation

Create a transfer initiation

Example Usage

using formance;
using formance.Models.Components;
using System.Numerics;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

TransferInitiationRequest req = new TransferInitiationRequest() {
    Reference = "XXX",
    ScheduledAt = System.DateTime.Parse("2022-10-09T08:11:40.585Z"),
    Description = "Open-architected heuristic knowledge user",
    SourceAccountID = "<value>",
    DestinationAccountID = "<value>",
    Type = formance.Models.Components.TransferInitiationRequestType.Payout,
    Amount = 658256,
    Asset = "USD",
    Validated = false,
};

var res = await sdk.Payments.V1.CreateTransferInitiationAsync(req);

// handle response

Parameters

Parameter Type Required Description
request TransferInitiationRequest ✔️ The request object to use for the request.

Response

CreateTransferInitiationResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetTransferInitiation

Get a transfer initiation

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetTransferInitiationAsync(transferId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
TransferId string ✔️ The transfer ID. XXX

Response

GetTransferInitiationResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

DeleteTransferInitiation

Delete a transfer initiation by its id.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.DeleteTransferInitiationAsync(transferId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
TransferId string ✔️ The transfer ID. XXX

Response

DeleteTransferInitiationResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

UdpateTransferInitiationStatus

Update a transfer initiation status

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UdpateTransferInitiationStatusAsync(
    transferId: "XXX",
    updateTransferInitiationStatusRequest: new UpdateTransferInitiationStatusRequest() {
        Status = formance.Models.Components.Status.Validated,
    }
);

// handle response

Parameters

Parameter Type Required Description Example
TransferId string ✔️ The transfer ID. XXX
UpdateTransferInitiationStatusRequest UpdateTransferInitiationStatusRequest ✔️ N/A

Response

UdpateTransferInitiationStatusResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ReverseTransferInitiation

Reverse transfer initiation

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;
using System.Numerics;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ReverseTransferInitiationAsync(
    transferId: "XXX",
    reverseTransferInitiationRequest: new Models.Components.ReverseTransferInitiationRequest() {
        Reference = "XXX",
        Description = "Function-based high-level project",
        Amount = 170849,
        Asset = "USD",
        Metadata = new Dictionary<string, string>() {
            { "key", "<value>" },
        },
    }
);

// handle response

Parameters

Parameter Type Required Description Example
TransferId string ✔️ The transfer ID. XXX
ReverseTransferInitiationRequest Models.Components.ReverseTransferInitiationRequest ✔️ N/A

Response

ReverseTransferInitiationResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

RetryTransferInitiation

Retry a failed transfer initiation

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.RetryTransferInitiationAsync(transferId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
TransferId string ✔️ The transfer ID. XXX

Response

RetryTransferInitiationResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListPools

List Pools

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListPoolsAsync(
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    sort: new List<string>() {
        "date:asc",
        "status:desc",
    },
    query: "<value>"
);

// handle response

Parameters

Parameter Type Required Description Example
PageSize long 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 List<string> Fields used to sort payments (default is date:desc). [
"date:asc",
"status:desc"
]
Query string Filters used to filter resources.

Response

ListPoolsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

CreatePool

Create a Pool

Example Usage

using formance;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

PoolRequest req = new PoolRequest() {
    Name = "<value>",
    AccountIDs = new List<string>() {
        "<value>",
    },
};

var res = await sdk.Payments.V1.CreatePoolAsync(req);

// handle response

Parameters

Parameter Type Required Description
request PoolRequest ✔️ The request object to use for the request.

Response

CreatePoolResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetPool

Get a Pool

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetPoolAsync(poolId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
PoolId string ✔️ The pool ID. XXX

Response

GetPoolResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

DeletePool

Delete a pool by its id.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.DeletePoolAsync(poolId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
PoolId string ✔️ The pool ID. XXX

Response

DeletePoolResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

AddAccountToPool

Add an account to a pool

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.AddAccountToPoolAsync(
    poolId: "XXX",
    addAccountToPoolRequest: new Models.Components.AddAccountToPoolRequest() {
        AccountID = "<value>",
    }
);

// handle response

Parameters

Parameter Type Required Description Example
PoolId string ✔️ The pool ID. XXX
AddAccountToPoolRequest Models.Components.AddAccountToPoolRequest ✔️ N/A

Response

AddAccountToPoolResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

RemoveAccountFromPool

Remove an account from a pool by its id.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.RemoveAccountFromPoolAsync(
    poolId: "XXX",
    accountId: "XXX"
);

// handle response

Parameters

Parameter Type Required Description Example
PoolId string ✔️ The pool ID. XXX
AccountId string ✔️ The account ID. XXX

Response

RemoveAccountFromPoolResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetPoolBalances

Get pool balances

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetPoolBalancesAsync(
    poolId: "XXX",
    at: System.DateTime.Parse("2023-05-05T06:40:23.119Z")
);

// handle response

Parameters

Parameter Type Required Description Example
PoolId string ✔️ The pool ID. XXX
At DateTime ✔️ Filter balances by date.

Response

GetPoolBalancesResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

CreateAccount

Create an account

Example Usage

using formance;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

AccountRequest req = new AccountRequest() {
    Reference = "<value>",
    ConnectorID = "<value>",
    CreatedAt = System.DateTime.Parse("2024-08-19T02:15:08.152Z"),
    Type = formance.Models.Components.AccountType.Internal,
};

var res = await sdk.Payments.V1.CreateAccountAsync(req);

// handle response

Parameters

Parameter Type Required Description
request AccountRequest ✔️ The request object to use for the request.

Response

CreateAccountResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

PaymentslistAccounts

List accounts

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

PaymentslistAccountsRequest req = new PaymentslistAccountsRequest() {
    PageSize = 100,
    Cursor = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    Sort = new List<string>() {
        "date:asc",
        "status:desc",
    },
};

var res = await sdk.Payments.V1.PaymentslistAccountsAsync(req);

// handle response

Parameters

Parameter Type Required Description
request PaymentslistAccountsRequest ✔️ The request object to use for the request.

Response

PaymentslistAccountsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

PaymentsgetAccount

Get an account

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.PaymentsgetAccountAsync(accountId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
AccountId string ✔️ The account ID. XXX

Response

PaymentsgetAccountResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetAccountBalances

Get account balances

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

GetAccountBalancesRequest req = new GetAccountBalancesRequest() {
    AccountId = "XXX",
    PageSize = 100,
    Cursor = "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    Sort = new List<string>() {
        "date:asc",
        "status:desc",
    },
};

var res = await sdk.Payments.V1.GetAccountBalancesAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAccountBalancesRequest ✔️ The request object to use for the request.

Response

GetAccountBalancesResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

CreateBankAccount

Create a bank account in Payments and on the PSP.

Example Usage

using formance;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

BankAccountRequest req = new BankAccountRequest() {
    Country = "GB",
    ConnectorID = "<value>",
    Name = "My account",
};

var res = await sdk.Payments.V1.CreateBankAccountAsync(req);

// handle response

Parameters

Parameter Type Required Description
request BankAccountRequest ✔️ The request object to use for the request.

Response

CreateBankAccountResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListBankAccounts

List all bank accounts created by user on Formance.

Example Usage

using formance;
using formance.Models.Requests;
using System.Collections.Generic;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListBankAccountsAsync(
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
    sort: new List<string>() {
        "date:asc",
        "status:desc",
    }
);

// handle response

Parameters

Parameter Type Required Description Example
PageSize long 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 List<string> Fields used to sort payments (default is date:desc). [
"date:asc",
"status:desc"
]

Response

ListBankAccountsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetBankAccount

Get a bank account created by user on Formance

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetBankAccountAsync(bankAccountId: "XXX");

// handle response

Parameters

Parameter Type Required Description Example
BankAccountId string ✔️ The bank account ID. XXX

Response

GetBankAccountResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ForwardBankAccount

Forward a bank account to a connector

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ForwardBankAccountAsync(
    bankAccountId: "XXX",
    forwardBankAccountRequest: new Models.Components.ForwardBankAccountRequest() {
        ConnectorID = "<value>",
    }
);

// handle response

Parameters

Parameter Type Required Description Example
BankAccountId string ✔️ The bank account ID. XXX
ForwardBankAccountRequest Models.Components.ForwardBankAccountRequest ✔️ N/A

Response

ForwardBankAccountResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

UpdateBankAccountMetadata

Update metadata of a bank account

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;
using System.Collections.Generic;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UpdateBankAccountMetadataAsync(
    bankAccountId: "XXX",
    updateBankAccountMetadataRequest: new Models.Components.UpdateBankAccountMetadataRequest() {
        Metadata = new Dictionary<string, string>() {
            { "key", "<value>" },
        },
    }
);

// handle response

Parameters

Parameter Type Required Description Example
BankAccountId string ✔️ The bank account ID. XXX
UpdateBankAccountMetadataRequest Models.Components.UpdateBankAccountMetadataRequest ✔️ N/A

Response

UpdateBankAccountMetadataResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListAllConnectors

List all installed connectors.

Example Usage

using formance;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListAllConnectorsAsync();

// handle response

Response

ListAllConnectorsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListConfigsAvailableConnectors

List the configs of each available connector.

Example Usage

using formance;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListConfigsAvailableConnectorsAsync();

// handle response

Response

ListConfigsAvailableConnectorsResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

InstallConnector

Install a connector by its name and config.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.InstallConnectorAsync(
    connector: formance.Models.Components.Connector.Wise,
    connectorConfig: ConnectorConfig.CreateAtlarConfig(
        new AtlarConfig() {
            Name = "My Atlar Account",
            BaseUrl = "https://api.example.com",
            PollingPeriod = "60s",
            TransferInitiationStatusPollingPeriod = "60s",
            AccessKey = "XXX",
            Secret = "XXX",
            PageSize = 50,
        }
    )
);

// handle response

Parameters

Parameter Type Required Description
Connector Connector ✔️ The name of the connector.
ConnectorConfig ConnectorConfig ✔️ N/A

Response

InstallConnectorResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 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

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UninstallConnectorAsync(connector: formance.Models.Components.Connector.Modulr);

// handle response

Parameters

Parameter Type Required Description
Connector Connector ✔️ The name of the connector.

Response

UninstallConnectorResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

UninstallConnectorV1

Uninstall a connector by its name.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UninstallConnectorV1Async(
    connector: formance.Models.Components.Connector.Generic,
    connectorId: "XXX"
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX

Response

UninstallConnectorV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 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

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ReadConnectorConfigAsync(connector: formance.Models.Components.Connector.Generic);

// handle response

Parameters

Parameter Type Required Description
Connector Connector ✔️ The name of the connector.

Response

ReadConnectorConfigResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

UpdateConnectorConfigV1

Update connector config

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.UpdateConnectorConfigV1Async(
    connector: formance.Models.Components.Connector.Stripe,
    connectorId: "XXX",
    connectorConfig: ConnectorConfig.CreateAdyenConfig(
        new AdyenConfig() {
            Name = "My Adyen Account",
            ApiKey = "XXX",
            HmacKey = "XXX",
            LiveEndpointPrefix = "XXX",
            PollingPeriod = "60s",
        }
    )
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX
ConnectorConfig ConnectorConfig ✔️ N/A

Response

UpdateConnectorConfigV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ReadConnectorConfigV1

Read connector config

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ReadConnectorConfigV1Async(
    connector: formance.Models.Components.Connector.CurrencyCloud,
    connectorId: "XXX"
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX

Response

ReadConnectorConfigV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 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

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ResetConnectorAsync(connector: formance.Models.Components.Connector.Atlar);

// handle response

Parameters

Parameter Type Required Description
Connector Connector ✔️ The name of the connector.

Response

ResetConnectorResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ResetConnectorV1

Reset a connector by its name. It will remove the connector and ALL PAYMENTS generated with it.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ResetConnectorV1Async(
    connector: formance.Models.Components.Connector.Generic,
    connectorId: "XXX"
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX

Response

ResetConnectorV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 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

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListConnectorTasksAsync(
    connector: formance.Models.Components.Connector.Modulr,
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
PageSize long 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==

Response

ListConnectorTasksResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ListConnectorTasksV1

List all tasks associated with this connector.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ListConnectorTasksV1Async(
    connector: formance.Models.Components.Connector.BankingCircle,
    connectorId: "XXX",
    pageSize: 100,
    cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ=="
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX
PageSize long 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==

Response

ListConnectorTasksV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 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

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetConnectorTaskAsync(
    connector: formance.Models.Components.Connector.Adyen,
    taskId: "task1"
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
TaskId string ✔️ The task ID. task1

Response

GetConnectorTaskResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

GetConnectorTaskV1

Get a specific task associated to the connector.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.GetConnectorTaskV1Async(
    connector: formance.Models.Components.Connector.BankingCircle,
    connectorId: "XXX",
    taskId: "task1"
);

// handle response

Parameters

Parameter Type Required Description Example
Connector Connector ✔️ The name of the connector.
ConnectorId string ✔️ The connector ID. XXX
TaskId string ✔️ The task ID. task1

Response

GetConnectorTaskV1Response

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /

ConnectorsTransfer

Execute a transfer between two accounts.

Example Usage

using formance;
using formance.Models.Requests;
using formance.Models.Components;
using System.Numerics;

var sdk = new Formance(security: new Security() {
    ClientID = "<YOUR_CLIENT_ID_HERE>",
    ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
});

var res = await sdk.Payments.V1.ConnectorsTransferAsync(
    connector: formance.Models.Components.Connector.BankingCircle,
    transferRequest: new TransferRequest() {
        Amount = 100,
        Asset = "USD",
        Destination = "acct_1Gqj58KZcSIg2N2q",
        Source = "acct_1Gqj58KZcSIg2N2q",
    }
);

// handle response

Parameters

Parameter Type Required Description
Connector Connector ✔️ The name of the connector.
TransferRequest TransferRequest ✔️ N/A

Response

ConnectorsTransferResponse

Errors

Error Object Status Code Content Type
formance.Models.Errors.PaymentsErrorResponse default application/json
formance.Models.Errors.SDKException 4xx-5xx /