Skip to main content

Registration Flow

This section explains how to register new members into the loyalty program. You can learn more about the registration endpoint: /member/register.

Collect Member Data

Your frontend (POS, kiosk, or website) should collect the following fields:

info

At least one of phoneNumber or email is required to identify the member. All other fields are optional but recommended for better targeting and compliance.

Example Fields:

  • phoneNumber or email (at least one required)
  • firstName, lastName
  • gdpr, termsOfUse
  • allowedSMS, allowedEmail
  • birthday

Example Request:

{
"newMemberData": {
"phoneNumber": "1234567890",
"email": "member@example.com",
"firstName": "John",
"lastName": "Doe",
"allowedSMS": true,
"allowedEmail": true,
"termsOfUse": true,
"gdpr": true,
"birthday": "1990-01-01"
}
}

Server Validation and Response

The server validates the submitted data. If successful, a member record is created and returned.

Example Success Response:

{
"status": "success",
"member": {
"phoneNumber": "1234567890",
"email": "member@example.com",
"firstName": "John",
"lastName": "Doe",
"allowedSMS": true,
"allowedEmail": true,
"termsOfUse": true,
"gdpr": true,
"birthday": "1990-01-01"
}
}

Error Handling

If validation fails or required fields are missing, the server returns an error response.

Example Error Response:

{
"status": "error",
"error": {
"code": "204",
"message": "Member already exists with the same phone number!"
}
}
Next Step

Once registration is complete, the member can immediately access other endpoints such as /member/details, /payment, or /transaction.

Best Practices

  • Validate inputs on the client side before submission
  • Clearly display validation errors from the server
  • Always collect required consents during registration
  • Use HTTPS and authenticated requests for all registration operations
  • Avoid sending null or empty fields in your request