# PSI Non-FCRA source: https://developer.mastercard.com/open-finance-us/documentation/products/pay/psi-tools/psi/index.md ## PSI Non-FCRA Flow {#psi-non-fcra-flow} Diagram psi ## Execution Steps {#execution-steps} 1. Customer Consent: The merchant/fintech/PSP obtains customer consent to share bank data when setting up recurring payments. 2. PSI Request: A PSI Non-FCRA request is sent prior to payment initiation via a **POST** call. 3. Risk Assessment: Mastercard analyzes the account and returns NSF and unauthorized return risk scores via a **GET** call. 4. Payment Decision: The merchant makes a decision. ## Generating PSI Scores {#generating-psi-scores} Refer to the [Quick Start Guide](https://developer.mastercard.com/open-finance-us/documentation/quick-start-guide/index.md) for creating a [customer](https://developer.mastercard.com/open-finance-us/documentation/customer-records/index.md#customers) record using your `partnerId` and generating a [Mastercard Data Connect](https://developer.mastercard.com/open-finance-us/documentation/connect/index.md) URL to use this service. Note that the endpoints require [authentication](https://developer.mastercard.com/open-finance-us/documentation/onboarding/index.md#authentication). API Reference: `POST /payments/customers/{customerId}/accounts/{accountId}/payment-success-indicators` To enhance the accuracy of the unauthorized return risk score, you can include the customer's `name`, `email`, `address`, and `phone` in the `user` object when you call **Generate Non-FCRA Payment Success Indicators**. Providing these fields enables PSI to combine Mastercard Identity Network insights with the customer's bank account transaction data, which can improve fraud detection. To benefit from Identity Network insights, you must provide `email` and `phone` at minimum. Providing more fields enhances accuracy further. PSI can still generate the score if you omit these optional fields. Note: `settleByDate` is a dynamic input. If you specify a date from today through two days after the request date, the response includes three days of PSI non-sufficient funds (NSF) scores. If you specify a date from two through nine days after the request date, the response includes scores through the requested date, up to a maximum of 10 days. ## Getting PSI Scores {#getting-psi-scores} **Generate Non-FCRA Payment Success Indicators** returns a `payRequestId` - use it to call the endpoint below and retrieve the PSI scores. API Reference: `GET /payments/customers/{customerId}/accounts/{accountId}/payment-success-indicators/{payRequestId}` Tip: If you want the optional NSF reason codes, set `include_reasons` to `true` when calling the above endpoint. You can use either a webhook or polling to determine when the PSI score is ready. ### Option 1: Use Webhook Notifications {#option-1-use-webhook-notifications} You can subscribe via the [Open Finance Notification Management System](https://developer.mastercard.com/open-finance-us/documentation/webhooks/ofnms/index.md) to receive an asynchronous notification when the score is ready. Use the notification to determine when to retrieve the completed PSI score. See the [PSI Score Calculation Notification](https://developer.mastercard.com/open-finance-us/documentation/webhooks/ofnms/webhooks-events/index.md#psi-score-calculation-notification) webhook documentation for details. ### Option 2: Poll the PSI Endpoint {#option-2-poll-the-psi-endpoint} If the PSI data is not yet ready, **Get Non-FCRA Payment Success Indicators by Pay Request ID** returns a `status` value of `IN PROGRESS`. You can poll the endpoint until the data is available. If you are making multiple GET requests immediately after calling **Generate Non-FCRA Payment Success Indicators**, wait 0.5 to 1 second between each GET request. We recommend integrating with the [Get Available Balance](https://developer.mastercard.com/open-finance-us/documentation/products/pay/account-balance/index.md#get-available-balance) endpoint as a fallback. Your solution should first call **Get Non-FCRA Payment Success Indicators by Pay Request ID** , then use **Get Available Balance** if the PSI request fails, so you can still retrieve the customer's available balance. ## Understanding the PSI Response Data {#understanding-the-psi-response-data} * The `nsfReturnRisk` and `unauthorizedReturnRisk` tiers correspond to the `score` value. There are 3 possible tiers: * `score` 0-10 corresponds to "High Risk" * `score` 11-30 corresponds to "Medium Risk" * `score` 31-100 corresponds to "Low Risk" * The `reasons` array for each day with the `nsfReturnRisk` can be used to see why the score for a given day was generated. Reasons can be interpreted as both negative and positive drivers, influencing the `score` value. For example: * `score` 100 and `nsfHistory` 100 may be interpreted as that this account has had few, if any, NSF occurrences in the past, and it is **unlikely** to result in NSF. * `score` 10 and `nsfHistory` 100 may be interpreted as that this account has multiple NSF occurrences in the past, and it is **likely** to result in NSF.
See [Interpreting the Scores](https://developer.mastercard.com/open-finance-us/documentation/products/pay/psi-tools/how-psi-works/index.md#interpreting-the-scores) for full details. ## Error Codes {#error-codes} The following table lists the errors that are specific to this API. See also the [Error Handling](https://developer.mastercard.com/open-finance-us/documentation/errors/index.md) section for a list of general errors and status codes which can occur. Warning: In some cases, a server-side failure can result in an HTTP 200 response being returned with an internal error (such as 18002) in the response body. This is a known issue which we are working to resolve. Retry the request and contact your Customer Success Manager if the problem persists. | **HTTP Code** | **Status Code** | **Description** | **Remediation for Partner** | |---------------|-----------------|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 400 | 10006 | "settleByDate must not be in the past" | Call the PSI endpoint with a `settleByDate` value equal to today or for a future date. | | 400 | 10007 | "\[FIELD\] is the incorrect type" | Call the PSI endpoint with correct type for the identified field. | | 400 | 10008 | "account has no transactions" | This indicates that the consumer's account does not have sufficient transaction history to produce a risk score with confidence. You may decline or accept the transaction. | | 400 | 10009 | "\[FIELD\] is a required parameter" | Call the PSI endpoint with the identified field provided. | | 400 | 10013 | "Only active accounts can be used, please use a different account" | The customer must select an active account when linking their accounts. | | 401 | 24302 | "Bad credentials" | Call the PSI endpoint with a valid app key and token. If this does not work, it is possible that your account is locked due to security reasons (normally as a result of multiple failed attempts). Contact customer support to unlock your account. | | 404 | 14001 | "customerId not found" | Ensure you are using the correct customer ID. If the customer ID is correct, it might be that the account has had no activity for a long period leading to an inactive status. | | 404 | 38003 | "accountId not found" | Ensure you are using the correct account ID and that the customer has connected their account. | ## Testing {#testing} See the [Payment Success Indicator Profiles](https://developer.mastercard.com/open-finance-us/documentation/integration-and-testing/test-the-apis/index.md#payment-success-indicator-profiles) section of [Test Profiles](https://developer.mastercard.com/open-finance-us/documentation/integration-and-testing/test-the-apis/index.md) for details of banking profiles which are provided for testing purposes. These profiles are designed to return different PSI scores for different payment amounts and settlement dates. ## PSI Non-FCRA Go-Live Checklist {#psi-non-fcra-go-live-checklist} Before using Before using PSI in production, confirm the following: 1. **Confirm Production Access** Verify that your Mastercard agreement includes PSI and that your production credentials are configured for the PSI APIs. 2. **Test Your Integration** Use the [PSI sandbox test profiles](https://developer.mastercard.com/open-finance-us/documentation/integration-and-testing/test-the-apis/index.md#payment-success-indicator-profiles) to validate your API requests; score retrieval; and handling of PSI scores, risk tiers, reason codes, and expected error scenarios. 3. **Define Your Decision Threshold** Determine the PSI score thresholds used to accept, reject, or route a payment to an alternative payment method. Start with the [recommended thresholds](https://developer.mastercard.com/open-finance-us/documentation/products/pay/psi-tools/how-psi-works/index.md#recommended-psi-score-thresholds-for-new-partners) for your ACH return profile, then monitor production performance and adjust as needed. **If the PSI team has provided partner-specific threshold recommendations for you, follow those recommendations instead.** 4. **Configure Score Retrieval** Implement either the **webhooks or polling** to determine when the PSI scores are ready. If polling, Mastercard recommends waiting 0.5 to 1 second between GET requests when making multiple requests immediately after generating PSI. 5. **Plan for PSI Errors and Fallbacks** Define how your application will handle unavailable scores, [API errors](https://developer.mastercard.com/open-finance-us/documentation/products/pay/psi-tools/psi/index.md#error-codes), and accounts that cannot be scored. Mastercard recommends using [Get Available Balance](https://developer.mastercard.com/open-finance-us/documentation/products/pay/account-balance/index.md#get-available-balance) as a fallback if GET Non-FCRA Payment Success Indicators by Pay Request ID fails, ensuring you can still retrieve the customer's available balance. 6. **Enable Feedback Loop** Onboard to [Feedback Loop](https://developer.mastercard.com/open-finance-us/documentation/products/pay/feedback-loop/index.md) via API or batch to submit your payment outcomes and improve PSI's performance for your portfolio.