woovibr / node-backend-integration

OpenPix Backend Integration
50 stars 2 forks source link

OpenPix Backend Integration Example

Pix Example Using the OpenPix Platform. OpenPix Developers

Basic OpenPix Backend Integration Example

This is a sample of how to integrate OpenPix Api in your backend

POST /donation - crete a new donation
GET /donation/id - get donation info
POST /webhook - webhook that will be called by OpenPix API

Setup

Generate a App ID in your OpenPix Account

Create a .env file with the following data

PORT=5666
OPENPIX_API=https://api.openpix.com.br/
APP_ID=<your app id>
MONGO_URI=mongodb://localhost/donation
HMAC_SECRET_KEY=<openpix_hmac_secret_key>

How to run

yarn start