# Statement of Credit
source: https://developer.mastercard.com/pay-with-rewards/documentation/use-cases/statement-of-credit/index.md

## Short description {#short-description}

This API allows customers to apply a statement credit for a purchase processed by PWR

## Sequence diagram {#sequence-diagram}

Diagram pwr-statement-of-credit

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

1. The merchant sends a transaction to the Mastercard network
2. The Mastercard network then makes a POST request to the /authorizations endpoint to process the transaction
3. The Pay with Rewards service sends an auth notification to the customer
4. The customer then performs the necessary business logic that they have to determine if a statement of credit is needed
5. If the statement of credit is needed then the customer makes a POST request to the /redemptions endpoint to process the statement of credit
6. The request for performing a statement of credit has the following mandatory body parameters:
   * **cashBackAmount** : The cash back value of the points redeemed. Minimum set to 0.
   * **externalId** : External customer unique identifier for the redemption request.
   * **paymentAuthId** : Rewards identifier of the Authorization for which the statement credit to be issued.
   * **pointsRedeemed** : Total points redeemed for this redemption.
   * **reasonCode** : Mastercard Reward System response code to indicate if the redemption is successful or not.
   * **userId** : Unique identifier of the user.
7. Mastercard Network API Gateway authenticates/authorizes the customer and routes the request to Pay with Rewards in the case of a valid customer.
8. The Pay with Rewards service validates the request parameters received via the `POST /redemptions` endpoint.
9. The Pay with Rewards service processes the statement of credit request
10. The Pay with Rewards service sends a response with a generated statement credit reference id, with a status code of 200, in the case of a successful request.
11. The Pay with Rewards 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: `POST /redemptions`

