TransferZero API
- API version: 1.0
Reference documentation for the TransferZero API V1
For more information, please visit:
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.transferzero.sdk</groupId>
<artifactId>transferzero-sdk-java8</artifactId>
<version>1.36.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.transferzero.sdk:transferzero-sdk-java8:1.36.0-SNAPSHOT"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/transferzero-sdk-java8-1.36.0-SNAPSHOT.jar
target/lib/*.jar
Please follow the installation instruction.
You can find examples in the examples
directory on the features required by the Onboarding documentation
To parse webhooks you can use the following snippet:
String webhookContent = "{ (...) }"; // The string received through the webhook callback url
String webhookUrl = "<url>"; // The url of the webhook
Map<String, String> webhookHeaders = new HashMap<String, String>();
webhookHeaders.put("Authorization-Nonce", "<nonce from headers>");
webhookHeaders.put("Authorization-Key", "<key from headers>");
webhookHeaders.put("Authorization-Signature", "<signature from headers>");
if (apiClient.validateWebhookRequest(webhookUrl, webhookContent, webhookHeaders)) {
Webhook webhook = apiClient.parseResponseString(webhookContent, Webhook.class);
if (webhook.getEvent().startsWith("transaction")) {
TransactionWebhook transactionWebhook = apiClient.parseResponseString(webhookContent, TransactionWebhook.class);
System.out.println(transactionWebhook);
} else if (webhook.getEvent().startsWith("recipient")) {
RecipientWebhook recipientWebhook = apiClient.parseResponseString(webhookContent, RecipientWebhook.class);
System.out.println(recipientWebhook);
} else if (webhook.getEvent().startsWith("payout_method")) {
PayoutMethodWebhook payoutMethodWebhook = apiClient.parseResponseString(webhookContent, PayoutMethodWebhook.class);
System.out.println(payoutMethodWebhook);
} else if (webhook.getEvent().startsWith("sender")) {
SenderWebhook senderWebhook = apiClient.parseResponseString(webhookContent, SenderWebhook.class);
System.out.println(senderWebhook);
} else if (webhook.getEvent().startsWith("document")) {
DocumentWebhook documentWebhook = apiClient.parseResponseString(webhookContent, DocumentWebhook.class);
System.out.println(documentWebhook);
}
}
All URIs are relative to https://api-sandbox.transferzero.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
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 |
ApiLogsApi | getApiLog | GET /api_logs/{API Log ID} | Fetch an individual API log |
ApiLogsApi | getApiLogs | GET /api_logs | Fetch a list of API logs |
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 |
- Account
- AccountListResponse
- AccountMeta
- AccountResponse
- AccountValidationError
- AccountValidationRequest
- AccountValidationResponse
- AccountValidationResult
- ApiLog
- ApiLogListResponse
- ApiLogResponse
- Currency
- CurrencyExchange
- CurrencyExchangeListResponse
- CurrencyListResponse
- CurrencyOpposite
- Debit
- DebitListRequest
- DebitListResponse
- DebitRequest
- DebitRequestWrapper
- Document
- DocumentListResponse
- DocumentRequest
- DocumentResponse
- DocumentWebhook
- ErrorStatus
- FieldDescription
- FieldSelectValidation
- FieldValidation
- Pagination
- PaginationMeta
- PayinMethod
- PayinMethodDetails
- PayinMethodDetailsBTC
- PayinMethodDetailsMobile
- PayinMethodDetailsNGNBank
- PayinMethodRequest
- PayinMethodResponse
- PayinMethodState
- PayinMethodUxFlow
- PaymentMethod
- PaymentMethodListResponse
- PaymentMethodOpposite
- PayoutMethod
- PayoutMethodBankAccountTypeEnum
- PayoutMethodCashProviderEnum
- PayoutMethodCountryEnum
- PayoutMethodDetails
- PayoutMethodDetailsBRLBank
- PayoutMethodDetailsBTC
- PayoutMethodDetailsBWPBank
- PayoutMethodDetailsBalance
- PayoutMethodDetailsCADBank
- PayoutMethodDetailsEGPBank
- PayoutMethodDetailsGBPBank
- PayoutMethodDetailsGHSBank
- PayoutMethodDetailsGHSCash
- PayoutMethodDetailsGNFMobile
- PayoutMethodDetailsIBAN
- PayoutMethodDetailsINRBank
- PayoutMethodDetailsKESBank
- PayoutMethodDetailsKESMobile
- PayoutMethodDetailsMADCash
- PayoutMethodDetailsMobile
- PayoutMethodDetailsNGNBank
- PayoutMethodDetailsNZDBank
- PayoutMethodDetailsUGXBank
- PayoutMethodDetailsUSDBank
- PayoutMethodDetailsUSDCash
- PayoutMethodDetailsXAFBank
- PayoutMethodDetailsXAFMobile
- PayoutMethodDetailsXOFBank
- PayoutMethodDetailsXOFCash
- PayoutMethodDetailsXOFMobile
- PayoutMethodDetailsZARBank
- PayoutMethodDetailsZMWBank
- PayoutMethodGenderEnum
- PayoutMethodIdentityCardTypeEnum
- PayoutMethodLegalEntityTypeEnum
- PayoutMethodListResponse
- PayoutMethodMobileProviderEnum
- PayoutMethodNatureOfBusinessEnum
- PayoutMethodPixKeyTypeEnum
- PayoutMethodRequest
- PayoutMethodResponse
- PayoutMethodTransferReasonEnum
- PayoutMethodWebhook
- PoliticallyExposedPerson
- ProofOfPayment
- ProofOfPaymentListResponse
- Recipient
- RecipientListResponse
- RecipientRequest
- RecipientResponse
- RecipientState
- RecipientStateReasonDetails
- RecipientWebhook
- Sender
- SenderListResponse
- SenderRequest
- SenderResponse
- SenderResponseExisting
- SenderResponseMeta
- SenderState
- SenderWebhook
- StateReasonDetails
- Transaction
- TransactionListResponse
- TransactionRequest
- TransactionResponse
- TransactionResponseExisting
- TransactionResponseMeta
- TransactionState
- TransactionTraits
- TransactionWebhook
- ValidationErrorDescription
- Webhook
- WebhookDefinition
- WebhookDefinitionEventListResponse
- WebhookDefinitionListResponse
- WebhookDefinitionRequest
- WebhookDefinitionResponse
- WebhookLog
- WebhookLogListResponse
- WebhookLogMetadata
- WebhookLogMetadataRequest
- WebhookLogMetadataResponse
- WebhookLogResponse
You can set the API Key and Secret on the ApiClient object for authentication:
ApiClient apiClient = new ApiClient();
apiClient.setApiKey("<key>");
apiClient.setApiSecret("<secret>");
apiClient.setBasePath("https://api-sandbox.transferzero.com/v1");
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.