Digital Wallet Cards icon

Digital Wallet Cards

Interact with Digital Wallet Cards loyalty program API

Overview

The "Deduct Points" operation on the Card resource allows users to subtract a specified number of points from a loyalty card within a digital wallet or loyalty program system. This is useful in scenarios where customers redeem points for rewards, make purchases using points, or when points need to be adjusted due to returns or corrections.

Practical examples include:

  • Deducting points after a customer redeems a reward.
  • Adjusting points balance after a transaction reversal.
  • Managing loyalty points during promotional campaigns or refunds.

This operation ensures accurate tracking and management of points associated with each card.

Properties

Name Meaning
Amount The number of points to deduct from the card (must be a non-negative number with up to 2 decimal places).
Description Optional text describing the reason or details of the deduction operation.
Transaction ID Optional unique identifier for the transaction to help with tracking and idempotency. If not provided, one is generated automatically.

Output

The output JSON contains the response from the API after performing the points deduction. It typically includes updated card information such as the new points balance and transaction details confirming the deduction.

The exact structure depends on the API response but generally confirms success and provides relevant data about the card's updated state.

No binary data is output by 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: Errors occur if the card ID or amount is not provided. Ensure these are set correctly.
  • Invalid Amount: The amount must be zero or positive; negative values will cause errors.
  • Transaction ID Conflicts: If a duplicate transaction ID is used, the API may reject the request or treat it as a duplicate. Use unique IDs or omit to auto-generate.
  • API Connectivity Issues: Network problems or invalid credentials will cause request failures. Verify API access and credentials.
  • Unknown Operation Error: If the operation parameter is incorrect or unsupported, the node throws an error indicating an unknown operation.

To resolve errors, verify all required parameters, ensure valid input values, and confirm API credentials and network connectivity.

Links and References

Discussion