🚧 Work in Progress: This documentation is actively being developed and is subject to change.
Get Started

Integration Flow

Overview

Integrating PlanetPoints into your platform follows a simple, secure flow. This guide walks through the full journey from user enrollment to points awarding and explains how our hosted pages and webhook notifications fit into the process.


The Complete Flow

User Enrollment

Your customer opts into PlanetPoints through your app. You call our enrollment API with minimal user data:

{
    "email":"test@reewild.com",
    "firstName": "Test",
    "lastName":"User",
    "city":"London",
    "country":"UK",
    "imageUrl": "https://avatar.iran.liara.run/public/41",
    "postalCode": "5BC21"
}

PlanetPoints responds with the user account details:

{
    "user": {
        "userID": "013LPI",
        "email": "test@reewild.com",
        "lifetimePoints": 0,
        "availablePoints": 0,
        "numOfTransactions": 0,
        "totalCarbonScore": 0,
        "totalGreenProducts": 0,
        "createdAt": "2025-09-05T12:51:05.3361193",
        "updatedAt": "2025-09-05T12:51:05.3361193"
    }
}

View enrollment API reference →

Submitting Purchase & Consumption Data

When a user wants to submit purchasing or consumption data toward PlanetPoints, the flow can follow one of the following paths depending on your use case.

Path 1: Purchase Capture

PlanetPoints automatically processes purchasing data through two supported ingestion methods.

Receipt-Based Capture

For merchants without digital receipts, or when no email receipt is available, you can capture receipts in two ways. Include transaction metadata (merchant, amount, timestamp, last 4 digits) to improve validation and fraud detection.

Option A: Your Own UI

If you prefer to own the UX, build your own upload or scanner UI and send images directly to our Receipt Scanning API.

PlanetPoints handles:

  • OCR processing
  • Item extraction
  • Validation
  • Fraud detection
  • Scoring

View Receipt API →

Redirect users to Reewild's optimized, white-labelled capture page.

Flow summary:

  1. Your backend sends transaction metadata when creating a capture session
  2. You redirect the user to the hosted capture page:
    {{hosted_pages_url}}?session_id={session_token}
  3. User scans or uploads their receipt
  4. PlanetPoints extracts, validates, and processes item-level data
  5. User returns to your app with the result

View Receipt Session API →

Path 2: Manual Consumption Entry

Your app may allow users to manually enter what they consumed-whether it's a full meal or a single food item. Collect the item names, quantities, and any optional details (e.g., barcode), then either:

  • Redirect the user to the hosted consumption-entry page, or
  • Send the data directly to the relevant API endpoint

Both flows feed into the same scoring pipeline used across the platform.

Scoring & Points Awarding

Behind the scenes, our system:

  1. Validates the submitted data (receipt details, tracked items, or meal entries) against the metadata you provide
  2. Extracts item-level information through our processing pipeline
  3. Maps items to our product database
  4. Calculates health and carbon ratings
  5. Awards points based on the combined scoring and source type
  6. Sends webhook notification to your endpoint with the result

You receive a webhook event with the scoring outcome:

{
  "eventType": "rewards.awarded",
  "data": {
    "user": {
      "id": "00B4N5",
      "availablePoints": 250,
      "lifetimePoints": 250
    },
    "transaction": {
      "transactionID": "080c2949-b9fc-493d-85b5-906330bb3d7b",
      "totalPoints": 250,
      "items": [
        {
          "name": "Organic Bananas",
          "carbonImpactRating": 1,
          "healthImpactRating": 1,
          "totalPlanetPoints": 150
        }
      ]
    }
  }
}

View scoring methodology →


Visual Flow Diagram


Data You Can Access

After points are awarded, you can retrieve detailed user and activity data through our APIs.

Summary Endpoint

GET /users/{id}/summary

Returns the user's PlanetPoints summary, including:

  • Available points
  • Lifetime points
  • Total number of earning events
  • Health and carbon impact metrics

View API →

Transactions Endpoint

GET /users/{id}/transactions

Returns a paginated list of all PlanetPoints earning events, including:

  • Date of the event
  • Points awarded
  • Item-level breakdowns
  • Health and carbon scores

View API →

Transaction Detail Endpoint

GET /users/{id}/transactions/{transaction_id}

Returns a structured item-level record for the earning event:

  • Full item list
  • Carbon and health scores per item
  • Pricing or quantity breakdowns (if available)
  • Source information (receipt scan, meal entry, item tracking)

View API →


Next Steps

Ready to integrate? Here's what to do next: