Elixir SDK for integrating with AbacatePay's payment services.
Not available yet.
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)
Retrieve a list of all customers.
{:ok, customers} = AbacatePay.Resources.Customer.list(client)
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)
Retrieve a list of all billings.
{:ok, billings} = AbacatePay.Resources.Billing.list(client)
%Customer{
id: "cust_123",
metadata: %{
name: "John Doe",
taxId: "123.456.789-00",
email: "[email protected]",
cellphone: "+5511999999999"
}
}
%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"
}