(Webhooks.V1)
Sorted by updated date descending
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.Webhooks.V1.GetManyConfigsAsync(
id: "4997257d-dfb6-445b-929c-cbe2ab182818",
endpoint: "https://example.com"
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
➖ |
Optional filter by Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
Endpoint |
string |
➖ |
Optional filter by endpoint URL |
https://example.com |
GetManyConfigsResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Insert a new webhooks config.
The endpoint should be a valid https URL and be unique.
The secret is the endpoint's verification secret.
If not passed or empty, a secret is automatically generated.
The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
All eventTypes are converted to lower-case when inserted.
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>",
});
ConfigUser req = new ConfigUser() {
Name = "customer_payment",
Endpoint = "https://example.com",
Secret = "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
EventTypes = new List<string>() {
"TYPE1",
"TYPE2",
},
};
var res = await sdk.Webhooks.V1.InsertConfigAsync(req);
// handle response
Parameter |
Type |
Required |
Description |
request |
ConfigUser |
✔️ |
The request object to use for the request. |
InsertConfigResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Delete a webhooks config by ID.
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.Webhooks.V1.DeleteConfigAsync(id: "4997257d-dfb6-445b-929c-cbe2ab182818");
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
DeleteConfigResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Test a config by sending a webhook to its endpoint.
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.Webhooks.V1.TestConfigAsync(id: "4997257d-dfb6-445b-929c-cbe2ab182818");
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
TestConfigResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Activate a webhooks config by ID, to start receiving webhooks to its endpoint.
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.Webhooks.V1.ActivateConfigAsync(id: "4997257d-dfb6-445b-929c-cbe2ab182818");
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
ActivateConfigResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Deactivate a webhooks config by ID, to stop receiving webhooks to its endpoint.
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.Webhooks.V1.DeactivateConfigAsync(id: "4997257d-dfb6-445b-929c-cbe2ab182818");
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
DeactivateConfigResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |
Change the signing secret of the endpoint of a webhooks config.
If not passed or empty, a secret is automatically generated.
The format is a random string of bytes of size 24, base64 encoded. (larger size after encoding)
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.Webhooks.V1.ChangeConfigSecretAsync(
id: "4997257d-dfb6-445b-929c-cbe2ab182818",
configChangeSecret: new ConfigChangeSecret() {
Secret = "V0bivxRWveaoz08afqjU6Ko/jwO0Cb+3",
}
);
// handle response
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
Config ID |
4997257d-dfb6-445b-929c-cbe2ab182818 |
ConfigChangeSecret |
ConfigChangeSecret |
➖ |
N/A |
|
ChangeConfigSecretResponse
Error Type |
Status Code |
Content Type |
formance.Models.Errors.WebhooksErrorResponse |
default |
application/json |
formance.Models.Errors.SDKException |
4XX, 5XX |
*/* |