moacyrricardo / java-pix

Java library to build brazil's PIX Copy & Paste (PIX copia e cola) (PIX QR CODE estático)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

java-pix

en

Java library to build brazil's PIX Copy & Paste. Useful to build charges.

pt-br

Biblioteca java para construir PIX copia e cola. Útil para criar "cobranças" com dados predefinidos.

usage

Built with java 17

import

<dependency>
    <groupId>com.iskeru</groupId>
    <artifactId>java-pix</artifactId>
    <version>1.0.0</version>
</dependency>

code

Build simple copia e cola.

PIX Key / Chave PIX

PixCopyAndPaste pix = PixCopyAndPaste.builder()
        .to(PixTarget.builder()
                .chavePix("minha-chave")
                .cidade("SAO PAULO")
                .nome("Person Person")
                .build())
        .transfer(PixTransaction.builder().valorTransacao(new BigDecimal("12.34")).build())
        .build();

PIX phone number / telefone

// when key is a phone number, for instance: (11) 98181-1212
PixTarget.builder().chavePix("+5511981811212").build();

PIX E-mail

// when key is a e-mail
PixTarget.builder().chavePix("someone@gmail.com").build();

About

Java library to build brazil's PIX Copy & Paste (PIX copia e cola) (PIX QR CODE estático)

License:MIT License


Languages

Language:Java 100.0%