# Business Rule Errors
source: https://developer.mastercard.com/account-to-account-commerce-for-csp/documentation/code-and-formats/business-rule-errors/index.md

Business Rule Errors are listed per API.   
Note: If Mastercard fails to validate the content of an incoming message, it will send a JSON response with an error body that contains an error code and error description to indicate the reason for the message failure. The participant is then expected to fix the issue and send a new message.   

### Create Agreement {#create-agreement}

| Error Code |                              Error Description                              |
|------------|-----------------------------------------------------------------------------|
| AGRM-0001  | X-Participant-ID must be a valid and active participant                     |
| AGRM-0003  | initiatingPartyId must be the same as X-Participant-ID                      |
| AGRM-0004  | businessType must be valid                                                  |
| AGRM-0006  | The creditor must be active and associated to the Creditor Service Provider |
| AGRM-0007  | agreementType must be valid                                                 |

### Update Agreement {#update-agreement}

| Error Code |                              Error Description                              |
|------------|-----------------------------------------------------------------------------|
| AGRM-0001  | X-Participant-ID must be a valid and active participant                     |
| AGRM-0003  | initiatingPartyId must be the same as X-Participant-ID                      |
| AGRM-0004  | businessType must be valid                                                  |
| AGRM-0006  | The creditor must be active and associated to the Creditor Service Provider |
| AGRM-0033  | Agreement Id in path param should match with the agreement Id in request    |
| AGRM-0034  | agreementId must be valid                                                   |
| AGRM-0035  | Agreement Id is not associated with creditor Id                             |
| AGRM-0036  | agreementStatus can only be DELT                                            |
| AGRM-0037  | Only approved or rejected agreements can be deleted                         |

### Agreement Status Retrievals {#agreement-status-retrievals}

| Error Code |                              Error Description                              |
|------------|-----------------------------------------------------------------------------|
| AGRM-0001  | X-Participant-ID must be a valid and active participant                     |
| AGRM-0003  | initiatingPartyId must be the same as X-Participant-ID                      |
| AGRM-0004  | businessType must be valid                                                  |
| AGRM-0033  | Agreement Id in path param should match with the agreement Id in request    |
| AGRM-0034  | agreementId must be valid                                                   |
| AGRM-0035  | Agreement Id is not associated with creditor Id                             |
| AGRM-0006  | The creditor must be active and associated to the Creditor Service Provider |

### Create Payment {#create-payment}

| Error Code |                            Error Description                             |
|------------|--------------------------------------------------------------------------|
| RFPX-0001  | X-Participant-ID must be a valid and active participant                  |
| RFPX-0004  | ServiceProviderId must match with X-Participant-ID and initiatingPartyId |
| RFPX-0005  | businessType must be valid                                               |
| RFPX-0006  | creditorId must be active and linked to creditor service provider        |
| RFPX-0007  | creditorReturnString must be provided when purpose is ONLN               |
| RFPX-0010  | paymentRequestType must be valid                                         |
| RFPX-0012  | currency must be a valid ISO-4217 alpha currency code                    |
| RFPX-0013  | Amount must have valid number of fraction digits                         |
| RFPX-0014  | purpose must be valid                                                    |
| RFPX-0015  | categoryPurpose must be valid                                            |
| RFPX-0017  | restriction must be valid                                                |
| RFPX-0019  | Must be an active and valid agreement                                    |
| RFPX-0020  | agreementType must be valid                                              |
| RFPX-0056  | creditorAccount must be present when categoryPurpose is MTOM             |

### Status Retrievals {#status-retrievals}

| Error Code |                            Error Description                             |
|------------|--------------------------------------------------------------------------|
| RFPX-0001  | X-Participant-ID must be a valid and active participant                  |
| RFPX-0004  | ServiceProviderId must match with X-Participant-ID and initiatingPartyId |
| RFPX-0005  | businessType must be valid                                               |
| RFPX-0006  | creditorId must be active and linked to creditor service provider        |
| RFPX-0053  | payment_request_lifecycle_id is invalid                                  |
| RFPX-0054  | paymentRequestLifecycleId is invalid                                     |

### Refunds {#refunds}

| Error Code |                                                                 Error Description                                                                 |
|------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| RFND-0001  | X-Participant-ID must be a valid and active participant                                                                                           |
| RFND-0004  | ServiceProvider Id must match with X-Participant-ID and InitiatingParty Id                                                                        |
| RFND-0003  | businessType must be valid                                                                                                                        |
| RFND-0005  | creditorId is not associated with Creditor service provider or it is not in active state                                                          |
| RFND-0006  | caseReferenceId must be present if refundReason is DISPUTES                                                                                       |
| RFND-0007  | currency must be a valid ISO-4217 alpha currency code                                                                                             |
| RFND-0008  | refundAmount value must be greater than zero and have valid number of fraction digits                                                             |
| RFND-0009  | refundReason must be valid                                                                                                                        |
| RFND-0011  | refundStatus must be valid                                                                                                                        |
| RFND-0012  | refundStatusReason must be provided if refundStatus is DECL                                                                                       |
| RFND-0013  | refundPaymentConfirmation must be provided if refundStatus is APPR                                                                                |
| RFND-0016  | refundRequestLifecycleId must be valid                                                                                                            |
| RFND-0017  | Either paymentRequestLifecycleId is not valid or payment request may not be Authorised                                                            |
| RFND-0018  | paymentRequestLifecycleId in path param should match with the paymentRequestLifecycleId in request                                                |
| RFND-0019  | refundRequestLifecycleId in path param and refundRequestLifecycleId in request should match                                                       |
| RFND-0020  | paymentRequestLifecycleId must be valid                                                                                                           |
| RFND-0021  | Refund Payment Confirmation already received or is in incorrect state                                                                             |
| RFND-0029  | Invalid refundRequestStatusRetrievalLifecycleId                                                                                                   |
| RFND-0030  | The second confirmation advice having refundRequestStatusRetrievalLifecycleId MUST have the same key information as the first confirmation advice |

### Alias Resolution Update {#alias-resolution-update}

| Error Code |                                                Error Description                                                 |                                                                                                             Resolution                                                                                                             |
|------------|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ALRE-0001  | X-Product-ID must be valid.                                                                                      | X-Product-ID value should be "IEXS".                                                                                                                                                                                               |
| ALRE-0002  | X-Participant-ID must be a valid and active participant.                                                         | X-Participant-ID participant must be active and valid as per onboarding DB.                                                                                                                                                        |
| ALRE-0003  | initiatingPartyId must be the same as X-Participant-ID.                                                          | initiatingPartyId and X-Participant-ID should be same.                                                                                                                                                                             |
| ALRE-0004  | creditorServiceProviderId must be a valid and active participant.                                                | Creditor service provider ID must be valid and active as per onboarding DB.                                                                                                                                                        |
| ALRE-0005  | aliasLifecycleId must be valid.                                                                                  | aliasLifecycleId provided should be valid (exists in IEXS DB) This is also for the scenario where CSP Id associated with the alias resolution request does not match with the CSP Id provided in the alias resolution update flow. |
| ALRE-0006  | Unable to process the update: Current alias resolution status is invalid for the provided aliasLifecycleId.      | status is INPR instead of CSPR for the provided aliasLifecycleId and Mastercard has received an update from the CSP for the same aliasLifecycleId.                                                                                 |
| ALRE-0007  | Alias resolution update rejected: request with provided aliasLifecycleId is either already resolved or rejected. | status is either RSVD/RJCT instead of CSPR for the provided aliasLifecycleId and Mastercard has received an update from the CSP for same aliasLifecycleId.                                                                         |
| ALRE-0008  | status must be valid.                                                                                            | CSP should provide valid status i.e. either RSVD or RJCT.                                                                                                                                                                          |
| ALRE-0009  | reasonCode must be provided when alias resolution status is RJCT.                                                | reasonCode is applicable only for rejected alias resolution updates (aliasResolutionStatus -\> status = RJCT).                                                                                                                     |
| ALRE-0010  | aliasDetails must be provided when alias resolution status is RSVD.                                              | aliasDetails should be provided only if the alias has been resolved successfully (aliasResolutionStatus -\> status = RSVD).                                                                                                        |
| ALRE-0011  | reasonCode must be valid.                                                                                        | CSP should provide valid status reasonCode from the list of supported values.                                                                                                                                                      |
| ALRE-0012  | Alias details type must be valid.                                                                                | Alias details type provided should be valid value.                                                                                                                                                                                 |
| ALRE-0013  | bankAccountDetails must be provided when aliasDetails type is BANK.                                              | bankAccountDetails should be provided when aliasDetails-\>type is BANK.                                                                                                                                                            |
| ALRE-0014  | walletAccountDetails must be provided when aliasDetails type is WALL.                                            | walletAccountDetails should be provided when aliasDetails-\>type is WALL.                                                                                                                                                          |
| ALRE-0015  | accountNumberType must be valid.                                                                                 | accountNumberType provided should be either IBAN or BBAN.                                                                                                                                                                          |
| ALRE-0016  | accountType must be valid.                                                                                       | accountType provided should be valid value.                                                                                                                                                                                        |
| ALRE-0017  | Creditor details type must be valid.                                                                             | PERS should be provided as creditor details type.                                                                                                                                                                                  |
| ALRE-0018  | personDetails must be provided when creditorDetails type is PERS.                                                | personDetails should be provided when aliasDetails -\> creditorDetails -\>type is PERS.                                                                                                                                            |
| ALRE-0019  | nationality must be a valid ISO 3166-1 alpha-3 country code.                                                     | nationality should be valid ISO country code.                                                                                                                                                                                      |
| ALRE-0020  | country must be a valid ISO 3166-1 alpha-3 country code.                                                         | address -\> country should be valid ISO country code.                                                                                                                                                                              |
| ALRE-0021  | Government id type must be valid.                                                                                | Government id type provided should be valid value.                                                                                                                                                                                 |
| ALRE-0022  | issuingCountry must be a valid ISO 3166-1 alpha-3 country code.                                                  | issuingCountry should be valid ISO country code.                                                                                                                                                                                   |
| ALRE-0023  | Alias resolution request expired: update provided post expiryTimeInterval.                                       | CSP should provide alias resolution update within expiryTimeInterval.                                                                                                                                                              |

#### Sample Business Rule Error Message (Inbound APIs) {#sample-business-rule-error-message-inbound-apis}

    { 
        "Errors": { 
            "Error": [ 
                { 
                    "Source": "ZAPP", 
                    "ReasonCode": "RFPX-0023", 
                    "Description": "Incorrect Payment Reference Number", 
                    "Recoverable": false, 
                    "Details": "NA" 
                } 
            ] 
        } 
    } 

<br />

