TransferZero API
- API version: 1.0
Reference documentation for the TransferZero API V1
For more information, please visit:
This .NET SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- SDK version: 1.36.4
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
- .NET 4.5 or later
- .NET Core >=2.0
- RestSharp - 105.1.0 or later
- Json.NET - 10.0.3 or later
- JsonSubTypes - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using TransferZero.Sdk.Api;
using TransferZero.Sdk.Client;
using TransferZero.Sdk.Model;
A .nuspec
is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec
uses placeholders from the .csproj
, so build the .csproj
directly:
nuget pack -Build -OutputDirectory out TransferZero.Sdk.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
Please follow the installation instruction.
You can find examples in the examples
directory on the features required by the Onboarding documentation for the following languages:
- C# on .NET 4.5
- VB.NET on .NET 4.5
- C# on .NET Core 2.0
To parse webhooks you can use the following snippet:
string webhookContent = "<data from webhook>";
string url = "<url of the webhook endpoint>";
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("Authorization-Nonce", "<nonce from webhook headers>");
headers.Add("Authorization-Signature", "<signature from webhook headerse>");
headers.Add("Authorization-Key", "<key from webhook headers>");
if (configuration.ValidWebhookRequest(url, webhookContent, headers)) {
Webhook webhook = configuration.ParseString<Webhook>(webhookContent);
if (webhook.Event.StartsWith("transaction"))
{
TransactionWebhook transactionWebhook = configuration.ParseString<TransactionWebhook>(webhookContent);
System.Console.WriteLine(transactionWebhook);
}
else if (webhook.Event.StartsWith("recipient"))
{
RecipientWebhook recipientWebhook = configuration.ParseString<RecipientWebhook>(webhookContent);
System.Console.WriteLine(recipientWebhook);
}
else if (webhook.Event.StartsWith("sender"))
{
SenderWebhook senderWebhook = configuration.ParseString<SenderWebhook>(webhookContent);
System.Console.WriteLine(senderWebhook);
}
else if (webhook.Event.StartsWith("document"))
{
DocumentWebhook documentWebhook = configuration.ParseString<DocumentWebhook>(webhookContent);
System.Console.WriteLine(documentWebhook);
}
else if (webhook.Event.StartsWith("payout_method"))
{
PayoutMethodWebhook payoutMethodWebhook = configuration.ParseString<PayoutMethodWebhook>(webhookContent);
System.Console.WriteLine(payoutMethodWebhook);
}
}
Dim webhookContent As String = "{<data from webhook>}"
Dim url As String = "<url of webhook request>"
Dim headers As Dictionary(Of String, String) = New Dictionary(Of String, String)()
headers.Add("Authorization-Nonce", "<nonce from webhook headers>")
headers.Add("Authorization-Signature", "<signature from webhook headers>")
headers.Add("Authorization-Key", "<key from webhook headers>")
If configuration.ValidWebhookRequest(url, webhookContent, headers) Then
Dim webhook As Webhook = configuration.ParseString(Of Webhook)(webhookContent)
If webhook.[Event].StartsWith("transaction") Then
Dim transactionWebhook As TransactionWebhook = configuration.ParseString(Of TransactionWebhook)(webhookContent)
System.Console.WriteLine(transactionWebhook)
ElseIf webhook.[Event].StartsWith("recipient") Then
Dim recipientWebhook As RecipientWebhook = configuration.ParseString(Of RecipientWebhook)(webhookContent)
System.Console.WriteLine(recipientWebhook)
ElseIf webhook.[Event].StartsWith("sender") Then
Dim senderWebhook As SenderWebhook = configuration.ParseString(Of SenderWebhook)(webhookContent)
System.Console.WriteLine(senderWebhook)
ElseIf webhook.[Event].StartsWith("document") Then
Dim documentWebhook As DocumentWebhook = configuration.ParseString(Of DocumentWebhook)(webhookContent)
System.Console.WriteLine(documentWebhook)
ElseIf webhook.[Event].StartsWith("payout_method") Then
Dim payoutMethodWebhook As PayoutMethodWebhook = configuration.ParseString(Of PayoutMethodWebhook)(webhookContent)
System.Console.WriteLine(payoutMethodWebhook)
End If
End If
All URIs are relative to https://api-sandbox.transferzero.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
APILogsApi | GetApiLog | GET /api_logs/{API Log ID} | Fetch an individual API log |
APILogsApi | GetApiLogs | GET /api_logs | Fetch a list of API logs |
AccountDebitsApi | PostAccountsDebits | POST /accounts/debits | Creating an account debit |
AccountValidationApi | PostAccountValidations | POST /account_validations | Validates the existence of a bank account or a mobile phone number |
AccountsApi | GetAccount | GET /accounts/{Currency} | Fetches account balance for specified currrency |
AccountsApi | GetAccounts | GET /accounts | Fetches account balances for all currencies |
CurrencyInfoApi | InfoCurrencies | GET /info/currencies | Getting a list of possible requested currencies |
CurrencyInfoApi | InfoCurrenciesIn | GET /info/currencies/in | Getting a list of possible input currencies |
CurrencyInfoApi | InfoCurrenciesOut | GET /info/currencies/out | Getting a list of possible output currencies |
DocumentsApi | GetDocument | GET /documents/{Document ID} | Fetching a document |
DocumentsApi | GetDocuments | GET /documents | Getting a list of documents |
DocumentsApi | PostDocuments | POST /documents | Creating a document |
LogsApi | GetWebhookLog | GET /logs/{Webhook Log ID} | Fetch an individual webhook log |
LogsApi | GetWebhookLogs | GET /logs/webhooks | Fetch a list of webhook logs |
PayinMethodsApi | DeletePayinMethod | DELETE /payin_methods/{PayinMethod ID} | Deleting a payin method |
PayinMethodsApi | GetPayinMethod | GET /payin_methods/{PayinMethod ID} | Fetching a payin method |
PayinMethodsApi | PatchPayinMethod | PATCH /payin_methods/{PayinMethod ID} | Updating a payin method |
PayinMethodsApi | RetryPayinMethod | POST /payin_methods/{PayinMethod ID}/retry | Retries PayinMethod |
PaymentMethodsApi | PaymentMethodsIn | GET /info/payment_methods/in | This method returns possible payin methods. |
PaymentMethodsApi | PaymentMethodsOut | GET /info/payment_methods/out | This method returns possible payout methods. |
PayoutMethodsApi | DeletePayoutMethod | DELETE /payout_methods/{Payout Method ID} | Deleting a payout method |
PayoutMethodsApi | GetPayoutMethod | GET /payout_methods/{Payout Method ID} | Fetching a payout method |
PayoutMethodsApi | GetPayoutMethods | GET /payout_methods | Listing payout methods |
PayoutMethodsApi | PatchPayoutMethod | PATCH /payout_methods/{Payout Method ID} | Updating a payout method |
PayoutMethodsApi | PostPayoutMethods | POST /payout_methods | Creating a payout method |
RecipientsApi | DeleteRecipient | DELETE /recipients/{Recipient ID} | Cancelling a recipient |
RecipientsApi | GetRecipients | GET /recipients | Getting a list of recipients with filtering |
RecipientsApi | PatchRecipient | PATCH /recipients/{Recipient ID} | Updating a recipient |
RecipientsApi | ProofOfPayments | GET /recipients/{Recipient ID}/proof_of_payments | Returns list of proof of payments |
SendersApi | DeleteSender | DELETE /senders/{Sender ID} | Deleting a sender |
SendersApi | GetSender | GET /senders/{Sender ID} | Fetching a sender |
SendersApi | GetSenders | GET /senders | Listing senders |
SendersApi | PatchSender | PATCH /senders/{Sender ID} | Updating a sender |
SendersApi | PostSenders | POST /senders | Creating a sender |
TransactionsApi | CalculateTransactions | POST /transactions/calculate | Calculates transaction amounts for a transaction payload |
TransactionsApi | CreateAndFundTransaction | POST /transactions/create_and_fund | Creates a new transaction and funds it from account balance |
TransactionsApi | GetTransaction | GET /transactions/{Transaction ID} | Fetch a single transaction |
TransactionsApi | GetTransactions | GET /transactions | Get a list of transactions |
TransactionsApi | PayinTransaction | POST /transactions/{Transaction ID}/payin | Creates a fake payin for transaction |
TransactionsApi | PayoutTransaction | POST /transactions/{Transaction ID}/payout | Creates a fake payout for transaction |
TransactionsApi | PostTransactions | POST /transactions | Creates a new transaction |
TransactionsApi | ValidateTransactions | POST /transactions/validate | Validates a transaction payload |
WebhooksApi | DeleteWebhook | DELETE /webhooks/{Webhook ID} | Unsubscribing from a webhook |
WebhooksApi | GetWebhook | GET /webhooks/{Webhook ID} | Find a webhook's details |
WebhooksApi | GetWebhookEvents | GET /webhooks/events | Find possible webhook events |
WebhooksApi | GetWebhooks | GET /webhooks | Listing webhooks |
WebhooksApi | PostWebhooks | POST /webhooks | Creating a webhook |
- Model.Account
- Model.AccountListResponse
- Model.AccountMeta
- Model.AccountResponse
- Model.AccountValidationError
- Model.AccountValidationRequest
- Model.AccountValidationResponse
- Model.AccountValidationResult
- Model.ApiLog
- Model.ApiLogListResponse
- Model.ApiLogResponse
- Model.Currency
- Model.CurrencyExchange
- Model.CurrencyExchangeListResponse
- Model.CurrencyListResponse
- Model.CurrencyOpposite
- Model.Debit
- Model.DebitListRequest
- Model.DebitListResponse
- Model.DebitRequest
- Model.DebitRequestWrapper
- Model.Document
- Model.DocumentListResponse
- Model.DocumentRequest
- Model.DocumentResponse
- Model.DocumentWebhook
- Model.ErrorStatus
- Model.FieldDescription
- Model.FieldSelectValidation
- Model.FieldValidation
- Model.Pagination
- Model.PaginationMeta
- Model.PayinMethod
- Model.PayinMethodDetails
- Model.PayinMethodDetailsBTC
- Model.PayinMethodDetailsMobile
- Model.PayinMethodDetailsNGNBank
- Model.PayinMethodRequest
- Model.PayinMethodResponse
- Model.PayinMethodState
- Model.PayinMethodUxFlow
- Model.PaymentMethod
- Model.PaymentMethodListResponse
- Model.PaymentMethodOpposite
- Model.PayoutMethod
- Model.PayoutMethodBankAccountTypeEnum
- Model.PayoutMethodCashProviderEnum
- Model.PayoutMethodCountryEnum
- Model.PayoutMethodDetails
- Model.PayoutMethodDetailsBRLBank
- Model.PayoutMethodDetailsBTC
- Model.PayoutMethodDetailsBWPBank
- Model.PayoutMethodDetailsBalance
- Model.PayoutMethodDetailsCADBank
- Model.PayoutMethodDetailsEGPBank
- Model.PayoutMethodDetailsEGPCash
- Model.PayoutMethodDetailsGBPBank
- Model.PayoutMethodDetailsGHSBank
- Model.PayoutMethodDetailsGHSCash
- Model.PayoutMethodDetailsGNFMobile
- Model.PayoutMethodDetailsIBAN
- Model.PayoutMethodDetailsINRBank
- Model.PayoutMethodDetailsKESBank
- Model.PayoutMethodDetailsKESMobile
- Model.PayoutMethodDetailsMADCash
- Model.PayoutMethodDetailsMobile
- Model.PayoutMethodDetailsNGNBank
- Model.PayoutMethodDetailsNZDBank
- Model.PayoutMethodDetailsUGXBank
- Model.PayoutMethodDetailsUSDBank
- Model.PayoutMethodDetailsUSDCash
- Model.PayoutMethodDetailsXAFBank
- Model.PayoutMethodDetailsXAFMobile
- Model.PayoutMethodDetailsXOFBank
- Model.PayoutMethodDetailsXOFCash
- Model.PayoutMethodDetailsXOFMobile
- Model.PayoutMethodDetailsZARBank
- Model.PayoutMethodDetailsZMWBank
- Model.PayoutMethodGenderEnum
- Model.PayoutMethodIdentityCardTypeEnum
- Model.PayoutMethodLegalEntityTypeEnum
- Model.PayoutMethodListResponse
- Model.PayoutMethodMobileProviderEnum
- Model.PayoutMethodNatureOfBusinessEnum
- Model.PayoutMethodPixKeyTypeEnum
- Model.PayoutMethodRequest
- Model.PayoutMethodResponse
- Model.PayoutMethodTransferReasonEnum
- Model.PayoutMethodWebhook
- Model.PoliticallyExposedPerson
- Model.ProofOfPayment
- Model.ProofOfPaymentListResponse
- Model.Recipient
- Model.RecipientListResponse
- Model.RecipientRequest
- Model.RecipientResponse
- Model.RecipientState
- Model.RecipientStateReasonDetails
- Model.RecipientWebhook
- Model.Sender
- Model.SenderListResponse
- Model.SenderRequest
- Model.SenderResponse
- Model.SenderResponseExisting
- Model.SenderResponseMeta
- Model.SenderState
- Model.SenderWebhook
- Model.StateReasonDetails
- Model.Transaction
- Model.TransactionListResponse
- Model.TransactionRequest
- Model.TransactionResponse
- Model.TransactionResponseExisting
- Model.TransactionResponseMeta
- Model.TransactionState
- Model.TransactionTraits
- Model.TransactionWebhook
- Model.ValidationErrorDescription
- Model.Webhook
- Model.WebhookDefinition
- Model.WebhookDefinitionEventListResponse
- Model.WebhookDefinitionListResponse
- Model.WebhookDefinitionRequest
- Model.WebhookDefinitionResponse
- Model.WebhookLog
- Model.WebhookLogListResponse
- Model.WebhookLogMetadata
- Model.WebhookLogMetadataRequest
- Model.WebhookLogMetadataResponse
- Model.WebhookLogResponse
You can set the API Key and Secret on the Configuration object for authentication:
Configuration configuration = new Configuration();
configuration.ApiKey = "<key>";
configuration.ApiSecret = "<secret>";
configuration.BasePath = "https://api-sandbox.transferzero.com/v1";
Dim configuration As Configuration = New Configuration()
configuration.ApiKey = "<key>"
configuration.ApiSecret = "<secret>"
configuration.BasePath = "https://api-sandbox.transferzero.com/v1"