Digital Wallet Cards icon

Digital Wallet Cards

Interact with Digital Wallet Cards loyalty program API

Overview

The "Redeem Coupon" operation on the Card resource allows users to redeem a coupon amount from a specified loyalty card within a digital wallet system. This operation deducts a specified amount from the card's balance or coupon value, optionally including a description and a transaction ID for tracking purposes.

This node is beneficial in scenarios where businesses want to integrate coupon redemption into their workflows, such as during point-of-sale transactions, online checkouts, or promotional campaigns. For example, when a customer presents a coupon code, this operation can be used to apply the coupon value to their loyalty card, updating the card's state accordingly.

Properties

Name Meaning
Amount The monetary amount of the coupon to redeem (number with up to 2 decimal places, minimum 0).
Description Optional text describing the reason or details of the coupon redemption.
Transaction ID Optional unique identifier for the transaction to help with tracking; if omitted, one is generated automatically.

Output

The output JSON contains the response from the API after redeeming the coupon on the specified card. It typically includes updated card information reflecting the redeemed amount, such as new balances or status updates. The exact structure depends on the API response but generally confirms the success of the coupon redemption and provides relevant transaction details.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Digital Wallet Cards API.
  • An API authentication token or API key credential must be configured in n8n to authorize requests.
  • The node uses internal utility functions for making HTTP requests, validating fields, and formatting responses.

Troubleshooting

  • Missing Required Fields: If the cardId or amount is not provided, the node will throw an error indicating these are required.
  • Invalid Amount: Providing a negative amount or invalid number may cause the API to reject the request.
  • Transaction ID Conflicts: Reusing a transaction ID might cause duplicate transaction errors; omit it to auto-generate a unique ID.
  • API Errors: Network issues or invalid credentials will result in API call failures. Ensure the API key is valid and the service is reachable.
  • Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output.

Links and References


If you need further details about other operations or resources, feel free to ask!

Discussion