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 Amount" operation on the Card resource allows users to add a monetary amount to a loyalty card's balance within a digital wallet or loyalty program system. This operation is useful for scenarios such as topping up a prepaid card, crediting cashback rewards, or adjusting balances after purchases or refunds.
Practical examples include:
- Adding funds to a customer's loyalty card after a purchase.
- Crediting promotional amounts or bonuses to a card.
- Adjusting card balances in response to customer service actions.
This operation ensures that the transaction is tracked with optional descriptions and transaction IDs for audit and reconciliation purposes.
Properties
| Name | Meaning |
|---|---|
| Amount | The monetary amount to add to the card balance. Must be a non-negative number with two decimal places. |
| Description | Optional text describing the reason or details of the transaction. |
| Transaction ID | Optional unique identifier for the transaction to help with tracking and avoiding duplicates. If not provided, a unique ID is generated automatically. |
Output
The node outputs a JSON object representing the result of the add amount transaction. This typically includes updated card information such as the new balance and metadata about the transaction. The exact structure depends on the API response but generally confirms the successful addition of the specified amount to the card.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Digital Wallet Cards API via an API key credential configured in n8n.
- The node uses HTTP POST requests to the endpoint
/api/v2/cards/{cardId}/add-transaction-amount. - The user must provide a valid
cardIdidentifying the target card. - The environment should have network access to
https://api.digitalwallet.cards.
Troubleshooting
- Missing Required Fields: Errors will occur if
cardIdoramountare not provided. Ensure these fields are set. - Invalid Amount: The amount must be zero or positive with up to two decimal places. Negative or improperly formatted values will cause errors.
- Duplicate Transaction ID: If a transaction ID is manually provided and already exists, the API may reject the request. Use unique IDs or omit to auto-generate.
- API Connectivity Issues: Network problems or invalid API credentials will cause failures. Verify API key validity and network connectivity.
- Unexpected API Errors: Check the error message returned by the API for details. Common issues include card status restrictions (e.g., blocked cards) or exceeding allowed limits.
To resolve errors, verify input parameters, ensure proper authentication, and consult API documentation or support for specific error codes.
Links and References
- Digital Wallet Cards API Documentation (hypothetical link for reference)
- n8n Documentation on Creating Custom Nodes
- General best practices for handling financial transactions in APIs.