# Points Balance
source: https://developer.mastercard.com/points-activity-service/documentation/use-cases/rewards-points-balance/index.md

This use case is used to retrieve the points balance information to display on the UI or for customer service. The points balance use case is available as described below:

* Get Rewards Points
* Search Rewards Points

## Get Rewards Points {#get-rewards-points}

This use case is used if the customer has access to a Random Account Number (RANAC) or Random Customer Number (RANCU).

### Pre-requisites {#pre-requisites}

There are no pre-requisites for the customer to use this endpoint.

### Sequence Diagram {#sequence-diagram}

Diagram get-rewards-points-balance

##### Following are the execution steps: {#following-are-the-execution-steps}

1. The consumer signs into the issuer's app.
2. The customer authenticates the consumer.
3. The customer sends a signed request to the Points Activity Service for points balance.
   * The request for points balance requires the following mandatory request parameters:
     * user_id
     * user_id_type
4. Mastercard API Gateway authenticates/authorizes the customer and routes the request to the Points Activity Service in the case of a valid customer.
5. The Points Activity Service validates the request parameters received via the `/points-details` endpoint.
6. The Points Activity Service retrieves the points details.
7. The Points Activity Service sends a response with points details (200).
8. The Points Activity Service sends a response with a status code of 4xx/5xx in case of an invalid request.

You will receive an error response for an invalid request or any missing request parameter. In that case, you need to update the input and perform step 3 again.

### Endpoint {#endpoint}


API Reference: `GET /points-details`

## Search Rewards Points {#search-rewards-points}

This use case is used if the customer has access to Bank Account Number (BAN) or Bank Customer Number (BCN) and doesn't have access to Random Account Number (RANAC) or Random Customer Number (RANCU).

### Pre-requisites {#pre-requisites-1}

Following are the pre-requisites for the customer to use this endpoint:

Read and understand the [Payload Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/) guide for secure data communication with the API. The Points Activity Service is using [JWE Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/#jwe-encryption) to encrypt the payload. To understand how to encrypt a request object, refer to the [Integration and Testing](https://developer.mastercard.com/points-activity-service/tutorial/api-testing/) tutorial.

### Sequence Diagram {#sequence-diagram-1}

Diagram search-rewards-points-balance

##### Following are the execution steps: {#following-are-the-execution-steps-1}

1. The consumer signs into the issuer's app.
2. The customer authenticates the consumer.
3. The customer sends an encrypted request to the Points Activity Service for points balance.
   * The request for points balance requires the following mandatory input parameters:
     * userId
     * userIdType
4. Mastercard API Gateway will validate the customer's information and routes the request to the Points Activity Service in the case of a valid customer.
5. The Points Activity Service validates the encrypted request received via the `/points-details-searches` endpoint.
6. The Points Activity Service will retrieve the points details.
7. The Points Activity Service sends a response with points details (200).
8. The Points Activity Service sends a response with a status code of 4xx/5xx in case of an invalid request.

You will receive an error response for an invalid request or any missing request parameter. In that case, you need to update the input and perform step 3 again.

### Endpoint {#endpoint-1}


API Reference: `GET /points-details-searches`

Note: For more information about the error codes, refer to the [Code and Formats](https://developer.mastercard.com/points-activity-service/documentation/code-and-formats/index.md) section.
