GenAIHub
Back to Technical Section

AbacatePay

Quick Payments & Simplified Subscriptions for SaaS in Brazil

What is AbacatePay?

AbacatePay is a payment gateway focused on simplifying billing for startups, SaaS, and quick MVPs in Brazil. Developed with developers and micro-SaaS founders in mind, it avoids the typical integration friction and bureaucracy of traditional gateways, offering straightforward support for **PIX**, **credit cards**, and **recurring billing (subscriptions)**.

Why Choose AbacatePay for Your MVP?

πŸ‡§πŸ‡· Full PIX Integration

Generate PIX QR Codes and copy-paste codes automatically. Instantly confirm payments via webhooks.

πŸ”„ Recurring Subscriptions

Create and manage monthly or yearly billing plans with automatic renewals and flexible invoicing.

πŸ›‘ Zero Bureaucracy to Start

Fast onboarding for both individuals (CPF) and businesses (CNPJ). Start receiving payments on the same day.

πŸ”Œ Minimalist API & Webhooks

One of the most direct billing APIs in the market. Send simple JSON requests and track status updates through stable webhooks.

Practical Example: Generating a Billing Link (PIX/Card)

Here is an example of a direct HTTPS POST request to create a new billing charge on AbacatePay using Node.js:

async function createBillingLink(customerData, amountInCents) {
  const url = 'https://api.abacatepay.com/v1/billing/create';
  
  const payload = {
    frequency: 'ONE_TIME', // Or 'WEEKLY', 'MONTHLY', 'YEARLY' for subscription
    methods: ['PIX', 'CARD'],
    amount: amountInCents, // Amount in cents (e.g. 9900 for R$ 99,00)
    returnUrl: 'https://your-saas.com/payment/success',
    completionUrl: 'https://your-saas.com/dashboard',
    customerId: customerData.id // Customer ID registered on AbacatePay
  };

  const response = await fetch(url, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${process.env.ABACATEPAY_API_KEY}`
    },
    body: JSON.stringify(payload)
  });

  const data = await response.json();
  if (!response.ok) throw new Error(data.message);
  
  return data.url; // Checkout URL provided by AbacatePay
}
            

Explore Other SaaS Tips