AbacatePay icon

AbacatePay

Integração com a API AbacatePay

Actions7

Overview

This node integrates with the AbacatePay API to create discount coupons. It allows users to define unique coupon codes with specific discount types and values, along with optional metadata and usage limits. This is useful in e-commerce or subscription platforms where promotional discounts are offered to customers.

Practical examples include:

  • Creating a percentage-based discount coupon like "DESCONTO20" for 20% off.
  • Creating a fixed amount discount coupon that deducts a set number of cents from the total.
  • Limiting the number of times a coupon can be redeemed.
  • Adding descriptive notes and external IDs for tracking purposes.

Properties

Name Meaning
Code Unique coupon code (e.g., DESCONTO20)
Discount Kind Type of discount:
- Fixed Amount (value in cents)
- Percentage (percentage off)
Discount Value Discount amount: percentage for Percentage type or cents for Fixed Amount type
Notes Description or additional information about the coupon
Max Redeems Maximum number of times the coupon can be used (-1 means unlimited)
Metadata Additional metadata for the coupon; currently supports:
- External ID (string)

Output

The node outputs JSON data representing the created coupon object as returned by the AbacatePay API. This typically includes all coupon details such as the code, discount kind and value, notes, max redeems, metadata, and any identifiers assigned by the API.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the AbacatePay API.
  • The node depends on the AbacatePay API service being available and reachable.
  • Proper configuration of the API credentials within n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing duplicate coupon codes may result in errors if the API enforces uniqueness.
    • Incorrect discount values (e.g., negative numbers) might be rejected by the API.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API keys; verify and update credentials.
    • Validation errors from the API often specify which property is incorrect; review input values accordingly.
    • Rate limiting or quota exceeded errors require checking API usage limits.

Links and References

Discussion