Actions47
- Template Actions
- Communication Actions
- Card Actions
- Create
- Get
- Get All
- Update
- Delete
- Get Balance
- Add Points
- Deduct Points
- Add Amount
- Deduct Amount
- Add Stamps
- Deduct Stamps
- Transfer Points
- Transfer Amount
- Block Card
- Unblock Card
- Generate QR Code
- Get Operations
- Add Visits
- Deduct Visits
- Add Reward
- Deduct Reward
- Receive Reward
- Redeem Coupon
- Set Expiration Date
- Set Membership Tier
- Customer Actions
- Company Actions
- Analytics Actions
- System Actions
Overview
The "Add Reward" operation on the Card resource allows users to add a specified reward amount to a loyalty card within a digital wallet or loyalty program system. This operation is useful for businesses that want to incentivize customer engagement by granting rewards directly to their loyalty cards.
Typical scenarios include:
- Adding promotional rewards after a purchase.
- Granting bonus rewards during special campaigns.
- Manually adjusting rewards for customer service purposes.
For example, a coffee shop could use this operation to add a free drink reward to a customer's loyalty card after they accumulate enough points.
Properties
| Name | Meaning |
|---|---|
| Amount | The numeric value of the reward to add to the card. Must be zero or positive with two decimals precision. |
| Description | Optional text describing the reason or context for adding the reward. |
| Transaction ID | Optional unique identifier for tracking the transaction. If not provided, one is generated automatically. |
Output
The output JSON contains the response from the API after adding the reward to the card. It typically includes details about the updated card state or confirmation of the transaction. The exact structure depends on the API but generally includes fields such as:
- Confirmation of the added reward amount.
- Updated card balances or reward totals.
- Transaction metadata including IDs and timestamps.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Digital Wallet Cards API.
- An API authentication token (API key credential) must be configured in n8n credentials for authorization.
- The node uses internal utility functions for making HTTP requests, validating inputs, and formatting responses.
Troubleshooting
- Missing Required Fields: Errors occur if
cardIdoramountare not provided. Ensure these are set correctly. - Invalid Amount: The amount must be a non-negative number with up to two decimal places.
- Duplicate Transaction ID: If a custom transaction ID is used, it must be unique to avoid conflicts.
- API Connectivity Issues: Network problems or invalid credentials will cause request failures.
- Unexpected API Errors: Check the error message returned; it may indicate issues like card status restrictions or limits.
To resolve errors:
- Verify all required parameters are present and valid.
- Confirm API credentials are correct and have necessary permissions.
- Use the automatically generated transaction ID unless you have a specific tracking need.
- Review API documentation or logs for detailed error explanations.
Links and References
- Digital Wallet Cards API Documentation (hypothetical link)
- n8n Documentation on Creating Custom Nodes
- General best practices for handling API transactions and idempotency in integrations.