Giter VIP home page Giter VIP logo

gerar-pix-sicredi's Introduction

Gerar Pix Sicredi

Uma implementação simples em TypeScript para facilitar a geração de cobranças e o recebimento de eventos de webhook Pix em integrações com o Sicredi.

Esta classe oferece uma solução completa e segura para interagir com a API Pix do Sicredi, permitindo aos desenvolvedores criar cobranças, atualizar webhooks, e acessar dados de cobrança de forma eficiente e confiável.
Com este módulo, você pode integrar facilmente o sistema de pagamentos Pix do Sicredi em seus aplicativos e serviços, automatizando processos de cobrança e acompanhando eventos em tempo real.

CONTATO

Versão em PHP

Gerar Pix com PHP

Iniciando

npm i @raphaelvserafim/gerar-pix-sicredi

Uso

import { PixSicredi } from "@raphaelvserafim/gerar-pix-sicredi";

ou

const { PixSicredi } = require("@raphaelvserafim/gerar-pix-sicredi");

InitPix

const initPix: InitPix = {
    producao: 0,
    client_id: "",
    client_secret: "",
    crt_file: "/certificado.pem",
    key_file: "/APLICACAO.key",
    pass: ""
};

const pix  = new PixSicredi(initPix);

Atualizando URL WebHook Receber Eventos Pix:

const response = await pix.updateWebhook("url", "chave-pix");

Geração de cobranças Pix:

const cobranca: Cobranca = {
    calendario: {
        dataDeVencimento: "2040-04-01",
        validadeAposVencimento: 1
    },
    valor: {
        original: 10.00,
        modalidadeAlteracao: 1
    },
    chave: "23711695000115",
    solicitacaoPagador: "Serviço realizado.",
    infoAdicionais: [
        {
            nome: "cliente_id",
            valor: "1234"
        },
        {
            nome: "fatura_id",
            valor: 123334
        }
    ]
};
const response = await pix.criarCobranca(cobranca);

Informações de uma Cobrança Pix:

const response = await pix.dadosDeCobranca("id");

gerar-pix-sicredi's People

Contributors

raphaelvserafim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.