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 "Receive Reward" operation on the Card resource allows users to record the receipt of a reward on a loyalty card within a digital wallet system. This operation is typically used in loyalty programs where customers earn rewards that can be redeemed or received as part of their engagement with a business.
Practical scenarios include:
- A customer redeems points or stamps for a reward, and the system needs to register that the reward has been received.
- Tracking reward transactions for auditing or reporting purposes.
- Integrating with POS systems to update the customer's card status when a reward is given.
Example: A coffee shop loyalty program where customers collect points and receive free drinks as rewards. When a customer claims a free drink, this operation records the receipt of that reward on their card.
Properties
| Name | Meaning |
|---|---|
| Amount | The amount (number) representing the quantity or value of the reward being received. |
| Description | Optional text description providing details about the reward transaction. |
| Transaction ID | Optional unique identifier string for tracking the specific reward transaction. |
Output
The output JSON contains the response from the API after recording the reward receipt. It typically includes details about the updated card state or confirmation of the transaction. The exact structure depends on the API response but generally includes fields such as:
- Confirmation of the reward receipt.
- Updated balances or points on the card.
- Transaction metadata.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests to the Digital Wallet Cards API.
- The node makes HTTP POST requests to the endpoint
/api/v2/cards/{cardId}/receive-reward. - Uses utility functions for request handling, parameter validation, and response transformation bundled within the node's codebase.
Troubleshooting
- Missing Required Fields: If
cardIdoramountis not provided, the node will throw an error indicating these are required. - Invalid Amount: The amount must be a non-negative number with up to two decimal places; invalid values may cause API errors.
- Transaction ID Conflicts: If a duplicate transaction ID is used, the API might reject the request or treat it as a duplicate.
- API Errors: Network issues or invalid credentials will result in errors; ensure the API key is valid and the service is reachable.
- Empty Description: The description is optional; leaving it empty should not cause errors.
To resolve errors, verify all required parameters, check API credentials, and review the API documentation for any constraints on the amount or transaction ID.
Links and References
- Digital Wallet Cards API Documentation (hypothetical link based on base URL)
- n8n Documentation on Creating Custom Nodes
- General REST API best practices for transaction handling and idempotency.
This summary focuses specifically on the "Receive Reward" operation of the "Card" resource as requested.