Skip to content

transferzero/transferzero-sdk-javascript

Repository files navigation

transferzero-sdk

TransferzeroSdk - JavaScript client for transferzero-sdk Reference documentation for the TransferZero API V1

For more information, please visit:

Automatically generated by the OpenAPI Generator

Installation

npm

Install the API client library as a dependency in your Node project via:

npm install transferzero-sdk --save

Getting Started

Please follow the installation instruction.

You can find examples in the examples directory on the features required by the Onboarding documentation

Webhooks

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");}

Documentation for API Endpoints

All URIs are relative to https://api-sandbox.transferzero.com/v1

ClassMethodHTTP requestDescription
TransferzeroSdk.APILogsApigetApiLogGET /api_logs/{API Log ID}Fetch an individual API log
TransferzeroSdk.APILogsApigetApiLogsGET /api_logsFetch a list of API logs
TransferzeroSdk.AccountDebitsApipostAccountsDebitsPOST /accounts/debitsCreating an account debit
TransferzeroSdk.AccountValidationApipostAccountValidationsPOST /account_validationsValidates the existence of a bank account or a mobile phone number
TransferzeroSdk.AccountsApigetAccountGET /accounts/{Currency}Fetches account balance for specified currrency
TransferzeroSdk.AccountsApigetAccountsGET /accountsFetches account balances for all currencies
TransferzeroSdk.CurrencyInfoApiinfoCurrenciesGET /info/currenciesGetting a list of possible requested currencies
TransferzeroSdk.CurrencyInfoApiinfoCurrenciesInGET /info/currencies/inGetting a list of possible input currencies
TransferzeroSdk.CurrencyInfoApiinfoCurrenciesOutGET /info/currencies/outGetting a list of possible output currencies
TransferzeroSdk.DocumentsApigetDocumentGET /documents/{Document ID}Fetching a document
TransferzeroSdk.DocumentsApigetDocumentsGET /documentsGetting a list of documents
TransferzeroSdk.DocumentsApipostDocumentsPOST /documentsCreating a document
TransferzeroSdk.LogsApigetWebhookLogGET /logs/{Webhook Log ID}Fetch an individual webhook log
TransferzeroSdk.LogsApigetWebhookLogsGET /logs/webhooksFetch a list of webhook logs
TransferzeroSdk.PayinMethodsApideletePayinMethodDELETE /payin_methods/{PayinMethod ID}Deleting a payin method
TransferzeroSdk.PayinMethodsApigetPayinMethodGET /payin_methods/{PayinMethod ID}Fetching a payin method
TransferzeroSdk.PayinMethodsApipatchPayinMethodPATCH /payin_methods/{PayinMethod ID}Updating a payin method
TransferzeroSdk.PayinMethodsApiretryPayinMethodPOST /payin_methods/{PayinMethod ID}/retryRetries PayinMethod
TransferzeroSdk.PaymentMethodsApipaymentMethodsInGET /info/payment_methods/inThis method returns possible payin methods.
TransferzeroSdk.PaymentMethodsApipaymentMethodsOutGET /info/payment_methods/outThis method returns possible payout methods.
TransferzeroSdk.PayoutMethodsApideletePayoutMethodDELETE /payout_methods/{Payout Method ID}Deleting a payout method
TransferzeroSdk.PayoutMethodsApigetPayoutMethodGET /payout_methods/{Payout Method ID}Fetching a payout method
TransferzeroSdk.PayoutMethodsApigetPayoutMethodsGET /payout_methodsListing payout methods
TransferzeroSdk.PayoutMethodsApipatchPayoutMethodPATCH /payout_methods/{Payout Method ID}Updating a payout method
TransferzeroSdk.PayoutMethodsApipostPayoutMethodsPOST /payout_methodsCreating a payout method
TransferzeroSdk.RecipientsApideleteRecipientDELETE /recipients/{Recipient ID}Cancelling a recipient
TransferzeroSdk.RecipientsApigetRecipientsGET /recipientsGetting a list of recipients with filtering
TransferzeroSdk.RecipientsApipatchRecipientPATCH /recipients/{Recipient ID}Updating a recipient
TransferzeroSdk.RecipientsApiproofOfPaymentsGET /recipients/{Recipient ID}/proof_of_paymentsReturns list of proof of payments
TransferzeroSdk.SendersApideleteSenderDELETE /senders/{Sender ID}Deleting a sender
TransferzeroSdk.SendersApigetSenderGET /senders/{Sender ID}Fetching a sender
TransferzeroSdk.SendersApigetSendersGET /sendersListing senders
TransferzeroSdk.SendersApipatchSenderPATCH /senders/{Sender ID}Updating a sender
TransferzeroSdk.SendersApipostSendersPOST /sendersCreating a sender
TransferzeroSdk.TransactionsApicalculateTransactionsPOST /transactions/calculateCalculates transaction amounts for a transaction payload
TransferzeroSdk.TransactionsApicreateAndFundTransactionPOST /transactions/create_and_fundCreates a new transaction and funds it from account balance
TransferzeroSdk.TransactionsApigetTransactionGET /transactions/{Transaction ID}Fetch a single transaction
TransferzeroSdk.TransactionsApigetTransactionsGET /transactionsGet a list of transactions
TransferzeroSdk.TransactionsApipayinTransactionPOST /transactions/{Transaction ID}/payinCreates a fake payin for transaction
TransferzeroSdk.TransactionsApipayoutTransactionPOST /transactions/{Transaction ID}/payoutCreates a fake payout for transaction
TransferzeroSdk.TransactionsApipostTransactionsPOST /transactionsCreates a new transaction
TransferzeroSdk.TransactionsApivalidateTransactionsPOST /transactions/validateValidates a transaction payload
TransferzeroSdk.WebhooksApideleteWebhookDELETE /webhooks/{Webhook ID}Unsubscribing from a webhook
TransferzeroSdk.WebhooksApigetWebhookGET /webhooks/{Webhook ID}Find a webhook's details
TransferzeroSdk.WebhooksApigetWebhookEventsGET /webhooks/eventsFind possible webhook events
TransferzeroSdk.WebhooksApigetWebhooksGET /webhooksListing webhooks
TransferzeroSdk.WebhooksApipostWebhooksPOST /webhooksCreating a webhook

Documentation for Models

Documentation for Authorization

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

Author

  • API version: 1.0
  • Package version: 1.37.2
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

About

TransferZero SDK for Node.JS / Javascript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6