TransferzeroSdk - JavaScript client for transferzero-sdk Reference documentation for the TransferZero API V1
For more information, please visit:
Automatically generated by the OpenAPI Generator
For Node.js
Install the API client library as a dependency in your Node project via:
npm install transferzero-sdk --savePlease 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:
constwebhookHeader={};// The webhook headers in json object format received through the webhook callback urlconstwebhookContent='{(...) }';// The webhook body in json string received through the webhook callback urlconstwebhookUrl='http://webhook.url';constvalidateRequest=apiClient.validateRequest(webhookUrl,webhookContent,webhookHeader)if(!validateRequest){return"Could not validate webhook request headers";};constwebhook=apiClient.parseResponseString(webhookContent,Webhook);if(webhook.event.startsWith('transaction')){consttransactionWebhook=apiClient.parseResponseString(webhookContent,TransactionWebhook);console.log(transactionWebhook);}elseif(webhook.event.startsWith('recipient')){constrecipientWebhook=apiClient.parseResponseString(webhookContent,RecipientWebhook);console.log(recipientWebhook);}elseif(webhook.event.startsWith('payout_method')){constpayoutMethodWebhook=apiClient.parseResponseString(webhookContent,PayoutMethodWebhook);console.log(payoutMethodWebhook);}elseif(webhook.event.startsWith('sender')){constsenderWebhook=apiClient.parseResponseString(webhookContent,SenderWebhook);console.log(senderWebhook);}elseif(webhook.event.startsWith('document')){constdocumentWebhook=apiClient.parseResponseString(webhookContent,DocumentWebhook);console.log(documentWebhook);}else{console.log("Could not verify webhook signature");}All URIs are relative to https://api-sandbox.transferzero.com/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| TransferzeroSdk.APILogsApi | getApiLog | GET /api_logs/{API Log ID} | Fetch an individual API log |
| TransferzeroSdk.APILogsApi | getApiLogs | GET /api_logs | Fetch a list of API logs |
| TransferzeroSdk.AccountDebitsApi | postAccountsDebits | POST /accounts/debits | Creating an account debit |
| TransferzeroSdk.AccountValidationApi | postAccountValidations | POST /account_validations | Validates the existence of a bank account or a mobile phone number |
| TransferzeroSdk.AccountsApi | getAccount | GET /accounts/{Currency} | Fetches account balance for specified currrency |
| TransferzeroSdk.AccountsApi | getAccounts | GET /accounts | Fetches account balances for all currencies |
| TransferzeroSdk.CurrencyInfoApi | infoCurrencies | GET /info/currencies | Getting a list of possible requested currencies |
| TransferzeroSdk.CurrencyInfoApi | infoCurrenciesIn | GET /info/currencies/in | Getting a list of possible input currencies |
| TransferzeroSdk.CurrencyInfoApi | infoCurrenciesOut | GET /info/currencies/out | Getting a list of possible output currencies |
| TransferzeroSdk.DocumentsApi | getDocument | GET /documents/{Document ID} | Fetching a document |
| TransferzeroSdk.DocumentsApi | getDocuments | GET /documents | Getting a list of documents |
| TransferzeroSdk.DocumentsApi | postDocuments | POST /documents | Creating a document |
| TransferzeroSdk.LogsApi | getWebhookLog | GET /logs/{Webhook Log ID} | Fetch an individual webhook log |
| TransferzeroSdk.LogsApi | getWebhookLogs | GET /logs/webhooks | Fetch a list of webhook logs |
| TransferzeroSdk.PayinMethodsApi | deletePayinMethod | DELETE /payin_methods/{PayinMethod ID} | Deleting a payin method |
| TransferzeroSdk.PayinMethodsApi | getPayinMethod | GET /payin_methods/{PayinMethod ID} | Fetching a payin method |
| TransferzeroSdk.PayinMethodsApi | patchPayinMethod | PATCH /payin_methods/{PayinMethod ID} | Updating a payin method |
| TransferzeroSdk.PayinMethodsApi | retryPayinMethod | POST /payin_methods/{PayinMethod ID}/retry | Retries PayinMethod |
| TransferzeroSdk.PaymentMethodsApi | paymentMethodsIn | GET /info/payment_methods/in | This method returns possible payin methods. |
| TransferzeroSdk.PaymentMethodsApi | paymentMethodsOut | GET /info/payment_methods/out | This method returns possible payout methods. |
| TransferzeroSdk.PayoutMethodsApi | deletePayoutMethod | DELETE /payout_methods/{Payout Method ID} | Deleting a payout method |
| TransferzeroSdk.PayoutMethodsApi | getPayoutMethod | GET /payout_methods/{Payout Method ID} | Fetching a payout method |
| TransferzeroSdk.PayoutMethodsApi | getPayoutMethods | GET /payout_methods | Listing payout methods |
| TransferzeroSdk.PayoutMethodsApi | patchPayoutMethod | PATCH /payout_methods/{Payout Method ID} | Updating a payout method |
| TransferzeroSdk.PayoutMethodsApi | postPayoutMethods | POST /payout_methods | Creating a payout method |
| TransferzeroSdk.RecipientsApi | deleteRecipient | DELETE /recipients/{Recipient ID} | Cancelling a recipient |
| TransferzeroSdk.RecipientsApi | getRecipients | GET /recipients | Getting a list of recipients with filtering |
| TransferzeroSdk.RecipientsApi | patchRecipient | PATCH /recipients/{Recipient ID} | Updating a recipient |
| TransferzeroSdk.RecipientsApi | proofOfPayments | GET /recipients/{Recipient ID}/proof_of_payments | Returns list of proof of payments |
| TransferzeroSdk.SendersApi | deleteSender | DELETE /senders/{Sender ID} | Deleting a sender |
| TransferzeroSdk.SendersApi | getSender | GET /senders/{Sender ID} | Fetching a sender |
| TransferzeroSdk.SendersApi | getSenders | GET /senders | Listing senders |
| TransferzeroSdk.SendersApi | patchSender | PATCH /senders/{Sender ID} | Updating a sender |
| TransferzeroSdk.SendersApi | postSenders | POST /senders | Creating a sender |
| TransferzeroSdk.TransactionsApi | calculateTransactions | POST /transactions/calculate | Calculates transaction amounts for a transaction payload |
| TransferzeroSdk.TransactionsApi | createAndFundTransaction | POST /transactions/create_and_fund | Creates a new transaction and funds it from account balance |
| TransferzeroSdk.TransactionsApi | getTransaction | GET /transactions/{Transaction ID} | Fetch a single transaction |
| TransferzeroSdk.TransactionsApi | getTransactions | GET /transactions | Get a list of transactions |
| TransferzeroSdk.TransactionsApi | payinTransaction | POST /transactions/{Transaction ID}/payin | Creates a fake payin for transaction |
| TransferzeroSdk.TransactionsApi | payoutTransaction | POST /transactions/{Transaction ID}/payout | Creates a fake payout for transaction |
| TransferzeroSdk.TransactionsApi | postTransactions | POST /transactions | Creates a new transaction |
| TransferzeroSdk.TransactionsApi | validateTransactions | POST /transactions/validate | Validates a transaction payload |
| TransferzeroSdk.WebhooksApi | deleteWebhook | DELETE /webhooks/{Webhook ID} | Unsubscribing from a webhook |
| TransferzeroSdk.WebhooksApi | getWebhook | GET /webhooks/{Webhook ID} | Find a webhook's details |
| TransferzeroSdk.WebhooksApi | getWebhookEvents | GET /webhooks/events | Find possible webhook events |
| TransferzeroSdk.WebhooksApi | getWebhooks | GET /webhooks | Listing webhooks |
| TransferzeroSdk.WebhooksApi | postWebhooks | POST /webhooks | Creating a webhook |
- TransferzeroSdk.Account
- TransferzeroSdk.AccountListResponse
- TransferzeroSdk.AccountMeta
- TransferzeroSdk.AccountResponse
- TransferzeroSdk.AccountValidationError
- TransferzeroSdk.AccountValidationRequest
- TransferzeroSdk.AccountValidationResponse
- TransferzeroSdk.AccountValidationResult
- TransferzeroSdk.ApiLog
- TransferzeroSdk.ApiLogListResponse
- TransferzeroSdk.ApiLogResponse
- TransferzeroSdk.Currency
- TransferzeroSdk.CurrencyExchange
- TransferzeroSdk.CurrencyExchangeAllOf
- TransferzeroSdk.CurrencyExchangeListResponse
- TransferzeroSdk.CurrencyListResponse
- TransferzeroSdk.CurrencyOpposite
- TransferzeroSdk.CurrencyOppositeAllOf
- TransferzeroSdk.Debit
- TransferzeroSdk.DebitListRequest
- TransferzeroSdk.DebitListResponse
- TransferzeroSdk.DebitRequest
- TransferzeroSdk.DebitRequestWrapper
- TransferzeroSdk.Document
- TransferzeroSdk.DocumentListResponse
- TransferzeroSdk.DocumentRequest
- TransferzeroSdk.DocumentResponse
- TransferzeroSdk.DocumentWebhook
- TransferzeroSdk.DocumentWebhookAllOf
- TransferzeroSdk.ErrorStatus
- TransferzeroSdk.FieldDescription
- TransferzeroSdk.FieldSelectValidation
- TransferzeroSdk.FieldValidation
- TransferzeroSdk.Pagination
- TransferzeroSdk.PaginationMeta
- TransferzeroSdk.PayinMethod
- TransferzeroSdk.PayinMethodDetails
- TransferzeroSdk.PayinMethodDetailsBTC
- TransferzeroSdk.PayinMethodDetailsMobile
- TransferzeroSdk.PayinMethodDetailsNGNBank
- TransferzeroSdk.PayinMethodRequest
- TransferzeroSdk.PayinMethodResponse
- TransferzeroSdk.PayinMethodState
- TransferzeroSdk.PayinMethodUxFlow
- TransferzeroSdk.PaymentMethod
- TransferzeroSdk.PaymentMethodListResponse
- TransferzeroSdk.PaymentMethodOpposite
- TransferzeroSdk.PaymentMethodOppositeAllOf
- TransferzeroSdk.PayoutMethod
- TransferzeroSdk.PayoutMethodBankAccountTypeEnum
- TransferzeroSdk.PayoutMethodCashProviderEnum
- TransferzeroSdk.PayoutMethodCountryEnum
- TransferzeroSdk.PayoutMethodDetails
- TransferzeroSdk.PayoutMethodDetailsBRLBank
- TransferzeroSdk.PayoutMethodDetailsBTC
- TransferzeroSdk.PayoutMethodDetailsBWPBank
- TransferzeroSdk.PayoutMethodDetailsBalance
- TransferzeroSdk.PayoutMethodDetailsCADBank
- TransferzeroSdk.PayoutMethodDetailsEGPBank
- TransferzeroSdk.PayoutMethodDetailsEGPCash
- TransferzeroSdk.PayoutMethodDetailsGBPBank
- TransferzeroSdk.PayoutMethodDetailsGHSBank
- TransferzeroSdk.PayoutMethodDetailsGHSMobile
- TransferzeroSdk.PayoutMethodDetailsGNFMobile
- TransferzeroSdk.PayoutMethodDetailsIBAN
- TransferzeroSdk.PayoutMethodDetailsKESBank
- TransferzeroSdk.PayoutMethodDetailsKESMobile
- TransferzeroSdk.PayoutMethodDetailsMADCash
- TransferzeroSdk.PayoutMethodDetailsMobile
- TransferzeroSdk.PayoutMethodDetailsNGNBank
- TransferzeroSdk.PayoutMethodDetailsNZDBank
- TransferzeroSdk.PayoutMethodDetailsUGXBank
- TransferzeroSdk.PayoutMethodDetailsUSDBank
- TransferzeroSdk.PayoutMethodDetailsUSDCash
- TransferzeroSdk.PayoutMethodDetailsXAFBank
- TransferzeroSdk.PayoutMethodDetailsXAFMobile
- TransferzeroSdk.PayoutMethodDetailsXOFBank
- TransferzeroSdk.PayoutMethodDetailsXOFCash
- TransferzeroSdk.PayoutMethodDetailsXOFMobile
- TransferzeroSdk.PayoutMethodDetailsZARBank
- TransferzeroSdk.PayoutMethodDetailsZMWBank
- TransferzeroSdk.PayoutMethodGenderEnum
- TransferzeroSdk.PayoutMethodIdentityCardTypeEnum
- TransferzeroSdk.PayoutMethodLegalEntityTypeEnum
- TransferzeroSdk.PayoutMethodListResponse
- TransferzeroSdk.PayoutMethodMobileProviderEnum
- TransferzeroSdk.PayoutMethodNatureOfBusinessEnum
- TransferzeroSdk.PayoutMethodPixKeyTypeEnum
- TransferzeroSdk.PayoutMethodRequest
- TransferzeroSdk.PayoutMethodResponse
- TransferzeroSdk.PayoutMethodTransferReasonEnum
- TransferzeroSdk.PayoutMethodWebhook
- TransferzeroSdk.PayoutMethodWebhookAllOf
- TransferzeroSdk.PoliticallyExposedPerson
- TransferzeroSdk.ProofOfPayment
- TransferzeroSdk.ProofOfPaymentListResponse
- TransferzeroSdk.Recipient
- TransferzeroSdk.RecipientListResponse
- TransferzeroSdk.RecipientRequest
- TransferzeroSdk.RecipientResponse
- TransferzeroSdk.RecipientState
- TransferzeroSdk.RecipientStateReasonDetails
- TransferzeroSdk.RecipientWebhook
- TransferzeroSdk.RecipientWebhookAllOf
- TransferzeroSdk.Sender
- TransferzeroSdk.SenderListResponse
- TransferzeroSdk.SenderRequest
- TransferzeroSdk.SenderResponse
- TransferzeroSdk.SenderResponseExisting
- TransferzeroSdk.SenderResponseMeta
- TransferzeroSdk.SenderState
- TransferzeroSdk.SenderWebhook
- TransferzeroSdk.SenderWebhookAllOf
- TransferzeroSdk.StateReasonDetails
- TransferzeroSdk.Transaction
- TransferzeroSdk.TransactionListResponse
- TransferzeroSdk.TransactionRequest
- TransferzeroSdk.TransactionResponse
- TransferzeroSdk.TransactionResponseExisting
- TransferzeroSdk.TransactionResponseMeta
- TransferzeroSdk.TransactionState
- TransferzeroSdk.TransactionTraits
- TransferzeroSdk.TransactionWebhook
- TransferzeroSdk.TransactionWebhookAllOf
- TransferzeroSdk.ValidationErrorDescription
- TransferzeroSdk.Webhook
- TransferzeroSdk.WebhookDefinition
- TransferzeroSdk.WebhookDefinitionEventListResponse
- TransferzeroSdk.WebhookDefinitionListResponse
- TransferzeroSdk.WebhookDefinitionRequest
- TransferzeroSdk.WebhookDefinitionResponse
- TransferzeroSdk.WebhookLog
- TransferzeroSdk.WebhookLogListResponse
- TransferzeroSdk.WebhookLogMetadata
- TransferzeroSdk.WebhookLogMetadataRequest
- TransferzeroSdk.WebhookLogMetadataResponse
- TransferzeroSdk.WebhookLogResponse
You can set the API Key and Secret by passing a config object when creating an ApiClient:
constapiClient=newApiClient({apiKey: '<key>',apiSecret: '<secret>',basePath: 'https://api-sandbox.transferzero.com/v1'});Or by setting the properties on an ApiClient instance:
constapiClient=newApiClient();apiClient.apiKey='<key>';apiClient.apiSecret='<secret>';apiClient.basePath='https://api-sandbox.transferzero.com/v1';// OptionalapiClient.timeout=30000// In milliseconds- API version: 1.0
- Package version: 1.37.2
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen