AbacatePay icon

AbacatePay

Interact with AbacatePay API

Cupom → Criar Cupom

AI-generated

Overview

This node operation creates a new coupon in the AbacatePay system. It is useful for scenarios where you want to generate discount coupons for customers, specifying the coupon code, discount type, discount value, maximum number of redemptions, and optional notes. For example, a business can create a percentage-based discount coupon or a fixed amount discount coupon to offer promotions to customers.

Use Case Examples

  1. Creating a coupon with a unique code 'SUMMER21' that gives a 15% discount and can be redeemed up to 50 times.
  2. Creating a fixed amount discount coupon of 500 cents (e.g., $5.00) with notes describing the promotion.

Properties

Name Meaning
Código Do Cupom Unique code of the coupon used to identify it.
Discount Type Type of discount applied by the coupon, either a percentage or a fixed amount.
Discount Value The value of the discount, either as a percentage or an amount in cents depending on the discount type.
Max Redeems Maximum number of times the coupon can be redeemed.
Notes Optional description or notes about the coupon.

Output

JSON

  • code - The unique coupon code created.
  • discountKind - The type of discount (percentage or fixed amount).
  • discount - The discount value.
  • maxRedeems - Maximum allowed redemptions for the coupon.
  • notes - Additional notes or description about the coupon.

Dependencies

  • AbacatePay API with an API token credential

Troubleshooting

  • Ensure the coupon code is unique to avoid conflicts or errors from the API.
  • Verify that the discount value matches the discount type (percentage or fixed amount).
  • Check that the maxRedeems value is a positive integer.
  • API authentication errors may occur if the API token credential is missing or invalid.

Discussion