General Integration Flow
This section outlines the standard end-to-end integration flow for implementing Rekonect’s Loyalty API. It defines the sequence of API calls required to manage member identity, apply benefits, process transactions, and handle loyalty-related operations.
1. Member Identification
Existing Members
- Use the
/member/detailsendpoint to fetch member status, profile, balances, and available benefits. - To retrieve benefit calculation results, include a transaction in the request body and set the
x-return-benefits: trueheader.
New Members
- Use the
/member/registerendpoint to enroll a new member with the necessary contact and consent fields. - If needed, verify the member using
/member/shortCodethrough a secure one-time code.
Updating Member Information
- Use
/member/updateto modify member details such as communication preferences or profile information.
2. Transaction Setup
- Prepare the basket using the
transactionobject structure. - Define all purchased items with required metadata such as department information, gross and net amounts, and tags.
- This data may optionally be sent to
/member/detailsto calculate real-time benefits before finalizing the transaction.
3. Loyalty Payment (Optional)
- Use the
/paymentendpoint withaction: "pay"to apply points or credit to the purchase. - The
paymentobject must include the amount. The type of asset (e.g., points or credit) is determined automatically based on business' configuration. - If applicable, loyalty assets (e.g., gifts) can be included using the
usedAssetsarray.
4. Submit Transaction
- Finalize the transaction using the
/transactionendpoint. - This ensures the loyalty engine processes:
- Points awarding
- Segmentation logic
- Asset consumption
- Promotion tracking
info
This step is mandatory regardless of member identification to maintain consistent reporting and analytics.
5. Cancellations and Post-Transaction Events
Cancel Payment
- To reverse a loyalty payment, use
/paymentwithaction: "cancel"and provide the originalconfirmationCode.
Cancel Transaction
- To cancel a submitted transaction, re-send the same structure to
/transactionusing the originaltransactionId.
Required
When canceling a transaction, include "action": "cancel" in the request body.
External Events
- Use the
/eventendpoint to log behavioral or milestone events, such as app usage or referrals. - Events are associated with members and can trigger automated campaigns or segmentation logic.
Integration Sequence Summary
| Step | Endpoint | Required | Notes |
|---|---|---|---|
| Member Verification | /member/details | Yes | Always used if member is identified |
| Member Registration | /member/register | No | Used for first-time member creation |
| Benefit Preview | /member/details | No | Requires transaction object and x-return-benefits |
| Loyalty Payment | /payment | No | Optional partial or full redemption |
| Submit Transaction | /transaction | Yes | Logs the sale and triggers loyalty engine |
| Cancel Payment | /payment | No | Requires confirmationCode from original payment |
| Cancel Transaction | /transaction | No | Use same transactionId and include "action": "cancel" |
| External Event Logging | /event | No | For behavioral triggers and marketing segmentation |
Best Practices
- Use HTTPS and include all required headers for each request.
- Ensure
transactionIdis unique per transaction and idempotent. - Match total payment amount with the transaction’s
totalAmount. - Avoid sending null or empty fields in
memberorpaymentobjects. - Consistently apply department codes and tags for analytics and rule targeting.
By following this structure, your application ensures a secure, consistent, and real-time integration with Rekonect’s loyalty infrastructure, allowing for accurate benefit evaluation, behavior tracking, and customer engagement.