1.34.7 • Published 19 days ago

transferzero-sdk v1.34.7

Weekly downloads
234
License
MIT
Repository
github
Last release
19 days ago

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

For Node.js

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:

const webhookHeader = {}; // The webhook headers in json object format received through the webhook callback url
const webhookContent = '{ (...) }'; // The webhook body in json string received through the webhook callback url
const webhookUrl = 'http://webhook.url';

const validateRequest = apiClient.validateRequest(webhookUrl, webhookContent, webhookHeader)

if (!validateRequest) {
   return "Could not validate webhook request headers";
};

const webhook = apiClient.parseResponseString(webhookContent, Webhook);
if (webhook.event.startsWith('transaction')) {
  const transactionWebhook = apiClient.parseResponseString(
    webhookContent,
    TransactionWebhook
  );
  console.log(transactionWebhook);
} else if (webhook.event.startsWith('recipient')) {
  const recipientWebhook = apiClient.parseResponseString(
    webhookContent,
    RecipientWebhook
  );
  console.log(recipientWebhook);
} else if (webhook.event.startsWith('payout_method')) {
  const payoutMethodWebhook = apiClient.parseResponseString(
    webhookContent,
    PayoutMethodWebhook
  );
  console.log(payoutMethodWebhook);
} else if (webhook.event.startsWith('sender')) {
  const senderWebhook = apiClient.parseResponseString(
    webhookContent,
    SenderWebhook
  );
  console.log(senderWebhook);
} else if (webhook.event.startsWith('document')) {
  const documentWebhook = 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:

const apiClient = new ApiClient({
  apiKey: '<key>',
  apiSecret: '<secret>',
  basePath: 'https://api-sandbox.transferzero.com/v1'
});

Or by setting the properties on an ApiClient instance:

const apiClient = new ApiClient();
apiClient.apiKey = '<key>';
apiClient.apiSecret = '<secret>';
apiClient.basePath = 'https://api-sandbox.transferzero.com/v1';

Author

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

19 days ago

1.34.4

27 days ago

1.34.3

2 months ago

1.34.2

3 months ago

1.34.1

3 months ago

1.34.0

3 months ago

1.33.2

4 months ago

1.33.1

6 months ago

1.29.1

9 months ago

1.32.0

6 months ago

1.30.2

7 months ago

1.32.1

6 months ago

1.30.3

7 months ago

1.30.0

7 months ago

1.30.1

7 months ago

1.33.0

6 months ago

1.31.0

7 months ago

1.29.0

9 months ago

1.27.6

11 months ago

1.27.8

11 months ago

1.27.9

11 months ago

1.28.1

10 months ago

1.28.2

10 months ago

1.28.0

10 months ago

1.25.0

1 year ago

1.24.0

1 year ago

1.27.3

1 year ago

1.27.0

1 year ago

1.26.1

1 year ago

1.26.2

1 year ago

1.23.5

1 year ago

1.27.5

12 months ago

1.23.3

1 year ago

1.23.4

1 year ago

1.22.0

2 years ago

1.23.0

2 years ago

1.22.1

2 years ago

1.19.4

2 years ago

1.19.3

2 years ago

1.21.0

2 years ago

1.20.0

2 years ago

1.19.2

2 years ago

1.19.0

2 years ago

1.18.0

2 years ago

1.19.1

2 years ago

1.17.0

3 years ago

1.16.1

3 years ago

1.16.0

3 years ago

1.15.1

3 years ago

1.15.0

3 years ago

1.14.1

3 years ago

1.14.0

3 years ago

1.13.0

3 years ago

1.12.2

3 years ago

1.12.0

3 years ago

1.11.0

3 years ago

1.10.0

3 years ago

1.9.0

3 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.0.0

5 years ago