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

Hosted Pages

Use hosted pages to integrate user enrollment and receipt scanning without building custom UI.


Overview

Hosted pages are pre-built, secure interfaces that handle:

  • User Enrollment — Capture user consent and enroll users
  • Receipt Upload — Allow users to upload receipt images

These pages display your application logo (configured in application settings) and redirect users back to your specified redirect URI upon completion.


Integration Flow


User Enrollment Session

Initialize an enrollment session to get user consent via hosted page.

Initialize Session

POST /issuers/users/enroll/session?api-version=1.0

Request Headers:

HeaderDescription
content-typeapplication/json
x-client-idYour application's Client ID
x-client-secretYour application's Client Secret

Request Body:

{
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "redirectUri": "https://yourapp.com/enrollment-complete",
  "imageUrl": "https://example.com/avatar.png",
  "country": "GB",
  "city": "London",
  "postalCode": "SW1A 1AA"
}
FieldRequiredDescription
emailYesUser's email address
firstNameYesUser's first name
lastNameYesUser's last name
redirectUriNoURL to redirect after completion
imageUrlNoUser's profile image URL
countryNoUser's country
cityNoUser's city
postalCodeNoUser's postal code

Response:

{
  "redirectUrl": "https://hosted.planetpoints.com?sessionId=xxx"
}

User Experience

  1. Redirect user to the redirectUrl
  2. User sees their details and your application logo
  3. User provides consent
  4. User is redirected to your redirectUri via deepLink

Receipt Upload Session

Initialize a receipt upload session for an existing user.

Initialize Session

POST /issuers/track/receipts/session?api-version=1.0

Request Headers:

HeaderDescription
x-client-idYour application's Client ID
x-client-secretYour application's Client Secret

Request Body:

{
  "userId": "user_xxxxx",
  "transactionId": "txn_12345",
  "amount": 45.99,
  "merchantName": "Tesco",
  "redirectUri": "https://yourapp.com/upload-complete",
  "transactionTimestamp": "2024-12-05T10:30:00Z"
}
FieldRequiredDescription
userIdYesThe enrolled user's ID
transactionIdNoYour transaction reference
amountNoTransaction amount
merchantNameNoMerchant/store name
redirectUriNoURL to redirect after completion
transactionTimestampNoWhen the transaction occurred

Response:

{
  "redirectUrl": "https://hosted.planetpoints.com/receipt-upload?sessionId=xxx"
}

User Experience

  1. Redirect user to the redirectUrl
  2. User uploads their receipt image
  3. Receipt is processed for PlanetPoints
  4. User is redirected to your redirectUri via deepLink

Customization

Hosted pages display your application logo configured in your application settings:

SettingDescription
Logo URLPublic URL to your logo image
Redirect URIDefault redirect destination

Error Handling

Sessions can fail or expire. Handle these scenarios in your integration:

HTTP StatusDescription
400Invalid request parameters
401Unauthorized - invalid credentials
404Session not found or expired
500Server error

Next Steps