Skip to content

AbacatePay Elixir SDK for you to start receiving payments in seconds

License

Notifications You must be signed in to change notification settings

Vicentesan/abacatepay-elixir-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AbacatePay SDK

Elixir SDK for integrating with AbacatePay's payment services.

Installation

Not available yet.

Features

Customer Operations

Create Customer

Create a new customer in the AbacatePay system.

  customer_data = %{
  name: "John Doe",
  taxId: "123.456.789-00",
  email: "[email protected]",
  cellphone: "+5511999999999"
  }
  
  {:ok, customer} = AbacatePay.Resources.Customer.create(client, customer_data)

List Customers

Retrieve a list of all customers.

{:ok, customers} = AbacatePay.Resources.Customer.list(client)

Billing Operations

Create Billing

Create a new billing for a customer.

billing_data = %{
  amount: 1000, # Amount in cents
  customerId: "cust_123", # Customer ID
  methods: ["pix", "credit_card"],
  products: [
    %{
    name: "Product Name",
    amount: 1000,
    quantity: 1
    }
  ]
}

{:ok, billing} = AbacatePay.Resources.Billing.create(client, billing_data)

List Billings

Retrieve a list of all billings.

{:ok, billings} = AbacatePay.Resources.Billing.list(client)

Response Types

Customer Response

%Customer{
  id: "cust_123",
  metadata: %{
    name: "John Doe",
    taxId: "123.456.789-00",
    email: "[email protected]",
    cellphone: "+5511999999999"
  }
}

Billing Response

%Billing{
  id: "bill_123",
  url: "https://pay.abacatepay.com/...",
  amount: 1000,
  devMode: false,
  status: :pending,
  frequency: :one_time,
  metadata: %{},
  publicId: "pub_123",
  createdAt: "2024-03-20T...",
  updatedAt: "2024-03-20T...",
  methods: [:pix, :credit_card],
  products: [
    %{
    name: "Product Name",
    amount: 1000,
    quantity: 1
    }
  ],
  customer: %{...},
  customerId: "cust_123"
}

About

AbacatePay Elixir SDK for you to start receiving payments in seconds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages