Viafintech

Viafintech

Finance

The name viafintech refers to the company viafintech GmbH. The names Barzahlen and viacash refer to the same product. Viafintech API v2 allows you to create payment, partial payment, payout, and refund slips customers can use in stores like supermarkets to pay or receive money. Slips are sent to users as an email with a PDF attachment or as a text message. When a store's point of sale system confirms the transaction, viafintech usually immediately calls a Webhook to notify your system about the payment. You can then use this confirmation e.g. to mark an invoice as paid or trigger shipping goods to the customer. The name viafintech refers to the company viafintech GmbH. The names Barzahlen and viacash refer to the same product.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Viafintech

🚀 Quick Start Examples

Viafintech Javascript Examplejavascript
// Viafintech API Example
const response = await fetch('https://docs.viafintech.com/api/v2/#introduction', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Using the VIA Fintech API in JavaScript

If you are looking to integrate the VIA Fintech API into your JavaScript application, this guide is for you.

First, you'll need to sign up for an account and obtain your API keys. Once you have your API keys, you can start making requests to the VIA Fintech API.

Making Requests

You can use the built-in fetch method to make requests to the VIA Fintech API.

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';

fetch(`${endpoint}/transactions`, {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
})
  .then(response => response.json())
  .then(data => console.log(data));

This example makes a GET request to the transactions endpoint, passing in your API key as authorization. The response is then parsed as JSON and logged to the console.

Example Code

Here are some example uses of the VIA Fintech API in JavaScript.

Getting a list of transactions:

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';

fetch(`${endpoint}/transactions`, {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
})
  .then(response => response.json())
  .then(data => console.log(data));

Getting a specific transaction:

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';
const transactionId = 'transaction-id';

fetch(`${endpoint}/transactions/${transactionId}`, {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
})
  .then(response => response.json())
  .then(data => console.log(data));

Creating a new transaction:

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';

fetch(`${endpoint}/transactions`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    amount: 100.00,
    currency: 'USD',
    recipient: 'john@example.com',
  }),
})
  .then(response => response.json())
  .then(data => console.log(data));

Updating an existing transaction:

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';
const transactionId = 'transaction-id';

fetch(`${endpoint}/transactions/${transactionId}`, {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    amount: 200.00,
    currency: 'EUR',
  }),
})
  .then(response => response.json())
  .then(data => console.log(data));

Deleting a transaction:

const apiKey = 'your-api-key';
const endpoint = 'https://your-api-endpoint.com/api';
const transactionId = 'transaction-id';

fetch(`${endpoint}/transactions/${transactionId}`, {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${apiKey}`,
  },
})
  .then(response => console.log(response.status === 204 ? 'Transaction deleted.' : 'Delete failed.' ));

Conclusion

The VIA Fintech API provides a powerful set of tools for managing transactions and other financial operations. By using the fetch method in JavaScript, you can easily integrate the API into your applications.

Remember to always handle errors and check for valid responses when using any API.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 1Jun 3Jun 5Jun 7Jun 9Jun 11Jun 13Jun 15Jun 17Jun 19Jun 21Jun 23Jun 25Jun 27Jun 3004008001440Minutes
Online
Offline

Related APIs in Finance