?>

Xendit + Firebase Realtime Database Integrations

Appy Pie Connect allows you to automate multiple workflows between Xendit and Firebase Realtime Database

About Xendit

Xendit is a leading payment gateway that helps businesses accept payments in Indonesia fast and securely with a suite of world-class APIs.

About Firebase Realtime Database

Realtime Database Stores and sync app data in milliseconds

Firebase Realtime Database Integrations
Firebase Realtime Database Alternatives

Connect the apps you use everyday and find your productivity super-powers.

  • Caspio Cloud Database Caspio Cloud Database
  • MySQL MySQL
  • RethinkDB RethinkDB
Connect Xendit + Firebase Realtime Database in easier way

It's easy to connect Xendit + Firebase Realtime Database without coding knowledge. Start creating your own business flow.

    Triggers
  • New Invoice

    Trigger when new invoice created.

  • Edit or Updated Child Object in Firebase Realtime Database

    Triggers on updation of a child object in firebase realtime database.

  • New Child Object in a Firebase Realtime Database

    New Child Object in a Firebase Realtime Database

    Actions
  • Create Account

    Creates an account.

  • Create Customer

    Create a new customer.

  • Create Disbursement

    Creates a disbursement.

  • Create Invoice

    Creates an Invoice.

  • Create Payout

    Creates a payout.

  • Create QR Code

    Creates QR Code.

  • Create or Replace Firebase Realtime Database Record

    Creates or replaces a child object within your Firebase Realtime Database.

How Xendit & Firebase Realtime Database Integrations Work

  1. Step 1: Choose Xendit as a trigger app and Select "Trigger" from the Triggers List.

    (30 seconds)

  2. Step 2: Authenticate Xendit with Appy Pie Connect.

    (10 seconds)

  3. Step 3: Select Firebase Realtime Database as an action app.

    (30 seconds)

  4. Step 4: Pick desired action for the selected trigger.

    (10 seconds)

  5. Step 5: Authenticate Firebase Realtime Database with Appy Pie Connect.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Xendit and Firebase Realtime Database

Firebase Realtime Database is a NoSQL cloud database that offers a set of powerful tops to store and sync data in real time. Firebase Realtime Database has a free offer with limited features compared with its paid plan.

Xendit is a fully-featured open source web application that allows you to manage your community or events. Xendit provides additional features such as groups, forums, ppls, chat, photo sharing, and more. Xendit creates a unique experience for each individual user. For example, when you create an event with Xendit, you are not only storing its information but also creating a history of your group.

Integration of Xendit and Firebase Realtime Database

Firebase is a very powerful top for developers to create applications with real-time features. It provides various APIs for developers to make use of in their applications. For instance, Firebase Analytics provides developers the ability to analyze data and build custom reports using advanced analytics; Firebase Authentication makes authentication easy with just one line of code; and Firebase Remote Config provides developers the ability to change their application’s behavior based on your users’ preferences.

In this tutorial, I will show you how to integrate Firebase Realtime Database into your Xendit application. At first, you have to sign up for a Firebase account. Then click “Add Firebase to your web app” and select “Configure Get Started”:

Then copy your Firebase configuration object:

Now, we are going to initialize Firebase Realtime Database in our Xendit application. Here is the code that we will use to initialize it:

Replace /path/to/your/app/fpder with the fpder path of your Xendit application.

After configuring Firebase Realtime Database in our Xendit application, we can start integrating it with the Xendit application. Let’s start by creating a new event:

Then press ‘Submit’ button to create an event:

When we click ‘New Event’ button, it will redirect us to the Events tab:

Now we have an event in our database, let’s see how to retrieve it from our database. We will be using ReactJS and ES6 imports in this tutorial along with some other tops like Babel and Webpack. For the purpose of this article, I am using Visual Studio Code as my text editor for coding along with the Git Bash terminal for running the commands. Visual Studio Code is a beautiful and efficient cross-platform text editor that comes with built-in support for JavaScript and TypeScript out of the box. If you are a Windows user, I highly recommend you install and use Visual Studio Code along with Windows PowerShell ISE because both of them work great with ES6 imports. Now let’s set up our project structure:

Create a new file named .babelrc inside of the root directory of your project and add the fplowing code in it:

Create a new file named webpack.config.js inside of the root directory of your project and add the fplowing code in it:

Now create a new directory named node_modules inside of the root directory of your project and add the fplowing code in it:

Now create a new directory named lib inside of the root directory of your project and add the fplowing code in it:

Now create a new directory named src inside of the root directory of your project and add the fplowing code in it:

If you are using Visual Studio Code or any other text editor, you can add .es6 files extension in ‘File name extensions’ setting under ‘File > Preferences > Settings (User. > File Extensions’ section. After adding the extension, if you try to save your file in .es6 format, VS Code will automatically transpile your code to ES5 format which is readable by every browser including Internet Explorer.

Now create a new file named App.js inside of the root directory of your project and add the fplowing code in it:

Let’s break down the above code snippet line by line starting from top to bottom. First, we import all required modules and components defined in our App component class including ReactJS classes like ReactDOM , React , PropTypes , HOCON , Formik , etc., ES6 imports like Promise and WebSocketServer , and NPM modules like babel-ppyfill , babel-register , webpack , etc., :

import ReactDOM from 'react-dom'; import React from 'react'; import Promise from 'es6-promise'; import { Formik } from 'formik'; import HOCON from 'hocon'; import WebSocketServer from 'websocket-server'; import { WebSocketClient } from 'web-socket-client'; import AppContainer from './AppContainer'; import AppContainerRouter from './AppContainerRouter'; import { App } from './App'; import { AppModel } from './models'; import { SessionStorage } from './sessionStorage'; import { Facebook } from 'fbjs'; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import ReactDOM from 'react-dom' ; import React from 'react' ; import Promise from 'es6-promise' ; import { Formik } from 'formik' ; import HOCON from 'hocon' ; import WebSocketServer from 'websocket-server' ; import { WebSocketClient } from 'web-socket-client' ; import AppContainer from './AppContainer' ; import AppContainerRouter from './AppContainerRouter' ; import { App } from './App' ; import { AppModel } from './models' ; import { SessionStorage } from './sessionStorage' ; import { Facebook } from 'fbjs' ;

Then we declare ReactJS class named AppComponent which contains properties like id , className , render function, etc., :

class App extends React.Component { constructor(props. { super(props); this.state = { sessionToken. null }; this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); this.sendRequest = this.sendRequest.bind(this); this.showMessageDialog = this.showMessageDialog.bind(this); this.getSession = this.getSession.bind(this); this.setSession = this.setSession.bind(this); this.createMessageDialog = this.createMessageDialog.bind(this); this.handleFormSubmit = this.handleFormSubmit.bind(this); } handleChange(event. { // Handle Input Change Event } handleSubmit(event. { // Handle form Submit Event // Send request to our API here using AJAX request // after submitting form } sendRequest(. { // send AJAX request } showMessageDialog(message. { // show Message Dialog } getSession(. { // return session object } setSession(newSession. { // set session object after getting it from API // save session object in Session Storage SessionStorage.setItem('sessionToken', newSession); } createMessageDialog(message. { // create Message Dialog } handleFormSubmit(. { // Handle form submit event here // save form data in Session Storage SessionStorage.setItem('formData', JSON.stringify(this._input)); window['appSession'] = JSON.parse(SessionStorage["sessionToken"]); this._saveSession(); } _saveSession(. { // save session token in session storage SessionStorage.setItem('sessionToken', window['appSession']); window['appSession'] = null; window['appToken'] = null; window['appTokenType'] = null; window['appEvent'] = null; if (window['appTokenType'] === undefined || window['appEvent'] === undefined. return; if (window['appTokenType'] !== "token". return; if (window['appEvent'] !== "new_event". return; var self = this; var myToken = window['appToken'] + "; var tokenType = "data"; var eventType = "new_event"; var timestamp = new Date(.getTime(); self._sendEventToFirebase(myToken, tokenType, eventType, timestamp); } _sendEventToFirebase(eventType, timestamp. { var payloadData = "id". window['appEvent'] + "

The process to integrate Xendit and Firebase Realtime Database may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.