PomeloEx

Module VersionHex DocsLicense

An Elixir client library for the Pomelo API — the Latin American fintech platform for card issuing, digital accounts, KYC/KYB, fraud prevention, loyalty, and credit products.

Installation

Add pomelo_ex to your mix.exs:

def deps do
[
{:pomelo_ex, "~> 0.1.0"}
]
end

Configuration

Configure your Pomelo credentials in config/config.exs:

config :pomelo_ex,
client_id: "your_client_id",
client_secret: "your_client_secret",
url: "https://api.pomelo.la",
audience: "https://api.pomelo.la",
grant_type: "client_credentials",
http_adapter: HTTPoison,
idempotency_key_length: 32

For development, use the sandbox environment:

config :pomelo_ex,
url: "https://sandbox.api.pomelo.la"

Quick Start

# 1. Obtain an access token
{:ok, %HTTPoison.Response{body: body}} =
PomeloEx.General.Authorization.request_token()
token = body["access_token"]
# 2. Create a company
payload = %PomeloEx.Types.General.Companies.CreateCompanyType{
token: token,
legal_name: "My Company",
email: "contact@company.com",
operation_country: "ARG"
}
{:ok, response} = PomeloEx.General.Company.create_company(payload)
# 3. Create a user
user_payload = %PomeloEx.Types.General.Users.CreateUserType{
token: token,
email: "user@company.com",
operation_country: "ARG"
}
{:ok, response} = PomeloEx.General.Users.create_user(user_payload)

API Domains

ModuleDescription
PomeloEx.General.AuthorizationOAuth 2.0 token management
PomeloEx.General.CompanyCompany CRUD operations
PomeloEx.General.UsersUser CRUD and custom field mappings
PomeloEx.Identity.KYCKnow Your Customer verification sessions
PomeloEx.Identity.KYBKnow Your Business verification sessions
PomeloEx.Cards.IssuingCard creation, activation, shipping, and lifecycle
PomeloEx.Cards.ProcessingTransaction authorization, presentment, and reversals
PomeloEx.Cards.TokenizationDigital wallet tokenization (Apple Pay, Google Pay, VAU, Click to Pay)
PomeloEx.Cards.SensitiveInformationSensitive card data display and user token management
PomeloEx.Cards.CreditsCredit products, lines, allocations, statements, and debt management
PomeloEx.Cards.AssociationsCard-to-credit-line associations
PomeloEx.DigitalAccountsDigital account creation, balance updates, and P2P transactions
PomeloEx.Finance.SettlementsSettlement queries and deposit notifications
PomeloEx.FraudChargebacks, transactional/soft blocks, and travel notices
PomeloEx.FraudPreventionLegacy fraud prevention operations
PomeloEx.LoyaltyLoyalty points and cashback management

Documentation

Full API reference is available at https://hexdocs.pm/pomelo_ex.

Pomelo API reference: https://developers.pomelo.la

Development

# Fetch dependencies
mix deps.get
# Run tests
mix test
# Run linter
mix credo
# Generate docs
mix docs

License

See the LICENSE file for details.