Abacatepay logo

Abacatepay

Community
alanalvestech
abacatepay

Manage AbacatePay payments, PIX, customers, coupons and withdrawals via REST API

Overview

Publisheralanalvestech
Repositoryhitank
Skill nameabacatepay
Stars
38
Forks
4
Bundled files
18
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 18 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alanalvestech on GitHub. Read the source before you install it.

Installation

Install the Abacatepay AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/alanalvestech/hitank/tree/main/skills/abacatepay
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alanalvestech/hitank.git /tmp/hitank
mkdir -p .claude/skills
cp -r /tmp/hitank/skills/abacatepay .claude/skills/abacatepay
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Abacatepay in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Abacatepay on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Abacatepay is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/abacatepay

Connect to AbacatePay to manage payments, PIX QR codes, customers, coupons, withdrawals and revenue. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb              # Bearer token auth + abacate_request helper (required by all scripts)
├── check_setup.rb       # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb        # Save and validate an API token
├── store.rb             # Get store details and balance
├── customers.rb         # List all customers
├── create_customer.rb   # Create a customer
├── billings.rb          # List all charges
├── create_billing.rb    # Create a charge with payment link
├── pix_create.rb        # Create a PIX QR code
├── pix_check.rb         # Check PIX payment status
├── pix_simulate.rb      # Simulate PIX payment (dev mode)
├── coupons.rb           # List all coupons
├── create_coupon.rb     # Create a discount coupon
├── withdrawals.rb       # List all withdrawals
├── create_withdrawal.rb # Create a withdrawal to PIX key
├── withdrawal.rb        # Get withdrawal details
├── revenue.rb           # Get revenue for a period
└── mrr.rb               # Get Monthly Recurring Revenue

Setup (check before using)

bash
ruby ~/.claude/skills/abacatepay/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to get their API token:

You need an AbacatePay API token.

  1. Go to https://app.abacatepay.com and log in
  2. Go to Settings > Security
  3. Copy your API token

For development, use the dev mode token. For production, use the production token.

Paste the token here.

Step 2 — When the user pastes the token, save it:

bash
ruby ~/.claude/skills/abacatepay/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain an action or customer reference.

Step 1: Store overview

bash
ruby ~/.claude/skills/abacatepay/scripts/store.rb

Present the store info and ask what the user wants to do.

Step 2: Actions

List customers:

bash
ruby ~/.claude/skills/abacatepay/scripts/customers.rb

Create a customer (requires user confirmation):

bash
ruby ~/.claude/skills/abacatepay/scripts/create_customer.rb "João Silva" "joao@email.com" "+5511999999999" "12345678900"

List charges:

bash
ruby ~/.claude/skills/abacatepay/scripts/billings.rb

Create a charge (requires user confirmation):

bash
ruby ~/.claude/skills/abacatepay/scripts/create_billing.rb '{"frequency":"ONE_TIME","methods":["PIX"],"products":[{"externalId":"prod1","name":"Produto","quantity":1,"price":1000}],"returnUrl":"https://example.com/cancel","completionUrl":"https://example.com/success"}'

Price is in centavos (1000 = R$10,00). Frequency: ONE_TIME or MULTIPLE_PAYMENTS. Methods: PIX, CARD.

Create a PIX QR code (requires user confirmation):

bash
ruby ~/.claude/skills/abacatepay/scripts/pix_create.rb 1000
ruby ~/.claude/skills/abacatepay/scripts/pix_create.rb 5000 --description "Pagamento teste" --expires 3600

Check PIX payment status:

bash
ruby ~/.claude/skills/abacatepay/scripts/pix_check.rb PIX_ID

Simulate PIX payment (dev mode only):

bash
ruby ~/.claude/skills/abacatepay/scripts/pix_simulate.rb PIX_ID

List coupons:

bash
ruby ~/.claude/skills/abacatepay/scripts/coupons.rb

Create a coupon (requires user confirmation):

bash
ruby ~/.claude/skills/abacatepay/scripts/create_coupon.rb PROMO10 10 PERCENTAGE "10% de desconto"
ruby ~/.claude/skills/abacatepay/scripts/create_coupon.rb FIXO5 500 FIXED "R$5 off" --max-redeems 100

List withdrawals:

bash
ruby ~/.claude/skills/abacatepay/scripts/withdrawals.rb

Create a withdrawal (requires user confirmation):

bash
ruby ~/.claude/skills/abacatepay/scripts/create_withdrawal.rb "saque-001" 5000 CPF "12345678900"

Amount minimum: 350 centavos (R$3,50). PIX types: CPF, CNPJ, EMAIL, PHONE, EVP.

Get withdrawal details:

bash
ruby ~/.claude/skills/abacatepay/scripts/withdrawal.rb "saque-001"

Get revenue by period:

bash
ruby ~/.claude/skills/abacatepay/scripts/revenue.rb 2026-01-01 2026-03-01

Get MRR:

bash
ruby ~/.claude/skills/abacatepay/scripts/mrr.rb

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bearer token (JWT)
  • Token file: ~/.config/abacatepay/token (outside the repo, never commit)
  • Creating customers, charges, PIX, coupons, and withdrawals require explicit user confirmation
  • All monetary values are in centavos (R$10,00 = 1000)
  • PIX statuses: PENDING, EXPIRED, CANCELLED, PAID, REFUNDED
  • Development mode available for testing with simulated payments
  • Base URL: https://api.abacatepay.com/v1

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Abacatepay AI skill do?

Manage AbacatePay payments, PIX, customers, coupons and withdrawals via REST API

Why use Abacatepay on TypingMind?

Because you install it once and use it with any model. Abacatepay is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Abacatepay in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alanalvestech/hitank/tree/main/skills/abacatepay. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Abacatepay?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Abacatepay?

As many as you like. As long as a model supports skills, you can use Abacatepay with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Abacatepay AI skill free?

Yes. It is published on GitHub by alanalvestech under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇