5.1.4 • Published 6 months ago

@coelho38r/abct01 v5.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

AbacatePay Node.js SDK

Official AbacatePay SDK - Accept payments in seconds with a simple integration.

Installation

npm install abacatepay-nodejs-sdk

Quick Usage

import AbacatePay from 'abacatepay-nodejs-sdk';

// Initialize the SDK with your API key
const abacate = AbacatePay('your_api_key');

Creating a Payment

// Create a one-time payment
const billing = await abacate.billing.create({
  frequency: "ONE_TIME",
  methods: ["PIX"],
  products: [
    {
      externalId: "PRO-PLAN",
      name: "Pro plan",
      quantity: 1,
      price: 1000 // Amount in cents
    }
  ],
  returnUrl: "https://yoursite.com/app",
  completionUrl: "https://yoursite.com/payment/success",
  customer: {
    email: 'customer@example.com'
  }
});

Response

{
  id: 'bill_12345667',
  url: 'https://abacatepay.com/pay/bill_12345667', // Payment URL for your customer
  amount: 1000,
  status: 'PENDING',
  devMode: true,
  methods: ['PIX'],
  frequency: 'ONE_TIME',
  nextBilling: null,
  customer: {
    id: 'cust_12345',
    metadata: {
      email: 'customer@example.com'
    }
  },
  createdAt: '2024-11-04T18:38:28.573',
  updatedAt: '2024-11-04T18:38:28.573',
}

Payment Methods

Currently supported payment methods:

  • PIX (Brazilian instant payment system)

License

This project is licensed under the terms of the MIT License.

5.1.4

6 months ago

5.1.3

6 months ago

5.1.2

6 months ago

5.1.1

6 months ago

5.1.0

6 months ago

5.0.2

6 months ago

5.0.1

6 months ago

5.0.0

6 months ago

4.0.0

6 months ago

3.0.0

6 months ago

2.0.6

6 months ago

2.0.5

6 months ago

2.0.4

6 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.1.0

6 months ago

1.0.1

6 months ago