Digital Wallet Cards icon

Digital Wallet Cards

Interact with Digital Wallet Cards loyalty program API

Overview

The node interacts with a Digital Wallet Cards loyalty program API, specifically focusing on managing loyalty cards. The Card - Create operation allows users to create a new loyalty card for a customer based on a specified card template. This is useful in scenarios where businesses want to enroll customers into a loyalty program by issuing them personalized cards that track balances, points, stamps, and other rewards.

Practical examples include:

  • Creating a new loyalty card for a customer after signup.
  • Issuing a promotional card with an initial balance or points.
  • Setting expiration dates or metadata for tracking custom attributes on the card.

Properties

Name Meaning
Template ID The numeric ID of the card template to use when creating the card.
Customer ID The unique identifier string of the customer who will own the card.
Additional Fields Optional extra fields to customize the card at creation time:
- Initial Balance Starting monetary balance on the card (number, minimum 0, precision 2 decimals).
- Initial Points Starting loyalty points on the card (number, minimum 0).
- Initial Stamps Starting number of stamps on the card (number, minimum 0).
- Expiration Date Optional expiration date/time for the card.
- Metadata JSON object as a string containing additional custom metadata for the card.

Output

The output is a JSON object representing the newly created card with all its properties as returned by the API. This typically includes the card's unique ID, associated customer ID, template ID, balances, points, stamps, expiration date, metadata, and timestamps.

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 base URL for API requests is https://api.digitalwallet.cards.
  • The node uses internal utility functions for making HTTP requests, validating required fields, cleaning objects, and transforming API responses.

Troubleshooting

  • Missing Required Fields: If templateId or customerId are not provided, the node will throw an error indicating these fields are required.
  • Invalid JSON in Metadata: If the metadata field contains invalid JSON, parsing will fail. Ensure valid JSON syntax is used.
  • API Authentication Errors: Ensure the API key credential is correctly set up and has permissions to create cards.
  • Network or API Errors: Check network connectivity and API status if requests fail unexpectedly.
  • Empty Additional Fields: Providing no additional fields is allowed; defaults will be used.

Links and References

Discussion