# Code and Formats
source: https://developer.mastercard.com/business-payment-controls/documentation/codes-and-formats/index.md

## Gateway error codes {#gateway-error-codes}

In addition to service error codes, error codes can also be returned by Mastercard's gateway, which is used to verify your request's signature, and route it to the correct location.

You can find a list of the errors returned by our gateway and resolutions to each in [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/security-and-authentication/gateway-error-codes/).

### Error Structure {#error-structure}

Mastercard returns errors in the following structure:

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "<source>",
        "ReasonCode": "<unique code>",
        "Description": "<short description of the error>",
        "Recoverable": true/false,
        "Details": "<Optional detailed description of the issue>"
      }
    ]
  }
}
```

For a failed request, the Business Payment Controls API returns these responses.

## HTTP response codes {#http-response-codes}

| **HTTP Status** |     **Description**     |
|-----------------|-------------------------|
| 400             | Invalid Request         |
| 401             | Authentication Required |
| 403             | Not authorized          |
| 404             | Resource not found      |
| 422             | Invalid field           |
| 429             | Limit exceeded          |
| 500             | Internal Server Error   |
| 503             | Service Unavailable     |

## Business Payment Control reason codes {#business-payment-control-reason-codes}

|                      **Reason code**                      |                                                                                                                                                                                          **Description**                                                                                                                                                                                          |                                                                    **Resolution steps**                                                                    |
|-----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `control.required`                                        | At least one [cardAmount](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/accountcontrol-spend-controls/index.md#amount-control) control must be provided.                                                                                                                                                                                      | Set at least one cardAmount control.                                                                                                                       |
| `endDate.before.startDate`                                | End Date must not be before the Start Date. at a date later than the start date.                                                                                                                                                                                                                                                                                                                  | Set an End Date that is later than the Start Date.                                                                                                         |
| `startDate.not.present.when.endDate.is.present`           | Start Date is required when the End Date is specified.                                                                                                                                                                                                                                                                                                                                            | Set a start date.                                                                                                                                          |
| `endDate.not.present.when.startDate.is.present`           | End Date is required when the Start Date is specified. Ensure the start and end date for the control [validity](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/accountcontrol-spend-controls/index.md#validity-period-control) are set.                                                                                                        | Set an End Date.                                                                                                                                           |
| `one.account.or.in.control.rule.required`                 | Set either an [AccountControl rule or an InControl](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/index.md) rule.                                                                                                                                                                                                                             | Set either an Account Rule or In Control Rule.                                                                                                             |
| `account.rule.and.in.control.rule.not.allowed.together`   | Account Rule and In Control Rules cannot be used together. Set either [AccountControl](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/accountcontrol-spend-controls/index.md) rules or [InControl](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/incontrol-spend-controls/index.md) rules. | Set either an Account Rule or an In Control Rule.                                                                                                          |
| `duplicated.incontrolrule.alias`                          | In Control Rule alias is already in use. Add a different InControl rule alias.                                                                                                                                                                                                                                                                                                                    | Set a different In Control Rule alias.                                                                                                                     |
| `status.invalid.must.be.ACTIVE.or.BLOCKED`                | Valid values are `ACTIVE` and `BLOCKED`.                                                                                                                                                                                                                                                                                                                                                          | Set either ACTIVE or BLOCKED.                                                                                                                              |
| `action.invalid.use.DELETE.request.to.remove.resources`   | Invalid action. Use `DELETE` request to remove resources.                                                                                                                                                                                                                                                                                                                                         | Set `DELETE`.                                                                                                                                              |
| `tolerancePercentMax.less.than.tolerancePercentMin`       | Tolerance Percent Maximum must not be less than Tolerance Percent Minimum.                                                                                                                                                                                                                                                                                                                        | Set `txTolerancePercentMax` to an amount greater than `txTolerancePercentMin`.                                                                             |
| `cumulativeToleranceMax.less.than.cumulativeToleranceMin` | Cumulative Tolerance Maximum must not be less than Cumulative Tolerance Minimum.                                                                                                                                                                                                                                                                                                                  | Set `cumulativeToleranceMax`to an amount greater than`cumulativeToleranceMin`.                                                                             |
| `null.values.incontrol.rules.not.allowed`                 | Rules must contain [controls](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/index.md).                                                                                                                                                                                                                                                        | Set a control value.                                                                                                                                       |
| `validityPeriod.to.before.validityPeriod.from`            | Valid To Date must not be before Valid From Date.                                                                                                                                                                                                                                                                                                                                                 | Set the `from` date for the `validityPeriod` to be before `to`.                                                                                            |
| `maxAmount.less.than.minAmount`                           | Maximum Amount must not be less than Minimum Amount.                                                                                                                                                                                                                                                                                                                                              | Set `maxAmount` on the `AmountRangeControl` to be greater than `minAmount`.                                                                                |
| `expiry.should.between.1.to.24.months.later`              | Expiry must be within 1 and 24 months from now.                                                                                                                                                                                                                                                                                                                                                   | Set an expiry date to be between 1 and 24 months.                                                                                                          |
| `replacedAccountGuid.required`                            | Replaced Account GUID required when Replaced Account Reason present.                                                                                                                                                                                                                                                                                                                              | Set a Replaced Account GUID.                                                                                                                               |
| `replacedAccountReason.required`                          | Replaced Account Reason is required when Replaced Account GUID is present.                                                                                                                                                                                                                                                                                                                        | Set a Replaced Account Reason.                                                                                                                             |
| `field.invalid`                                           | The format of the field is invalid.                                                                                                                                                                                                                                                                                                                                                               | Set the field in a valid format.                                                                                                                           |
| `items.toofew`                                            | Required field is missing.                                                                                                                                                                                                                                                                                                                                                                        | Set the missing field.                                                                                                                                     |
| `pattern.invalid`                                         | Message format is invalid.                                                                                                                                                                                                                                                                                                                                                                        | Set the message in the correct pattern.                                                                                                                    |
| `field.required`                                          | Required field is missing.                                                                                                                                                                                                                                                                                                                                                                        | Set the missing field.                                                                                                                                     |
| `field.unrecognized`                                      | Field name is incorrect.                                                                                                                                                                                                                                                                                                                                                                          | Set the correct field.                                                                                                                                     |
| `country.code.invalid`                                    | Country Code is not valid.                                                                                                                                                                                                                                                                                                                                                                        | Populate the correct country code.                                                                                                                         |
| `length.long`                                             | Length is too long.                                                                                                                                                                                                                                                                                                                                                                               | Set the correct field length.                                                                                                                              |
| `length.short`                                            | Length is too short.                                                                                                                                                                                                                                                                                                                                                                              | Set the correct field length.                                                                                                                              |
| `date.invalid`                                            | Date is invalid.                                                                                                                                                                                                                                                                                                                                                                                  | Set the correct date format.                                                                                                                               |
| `field.notUpdatable`                                      | Field is not updatable.                                                                                                                                                                                                                                                                                                                                                                           | Set a different field value.                                                                                                                               |
| `real.card.not.found`                                     | Real Card GUID is invalid.                                                                                                                                                                                                                                                                                                                                                                        | Set a valid Real Card GUID.                                                                                                                                |
| `one.card.amount.value.should.be.present`                 | One card amount value should be present. Set a [card amount value](https://developer.mastercard.com/business-payment-controls/documentation/use-cases/spend-controls/accountcontrol-spend-controls/index.md#amount-control) on the control.                                                                                                                                                       | Set a card amount value.                                                                                                                                   |
| `{Field Name}.contain.duplicate.elements`                 | {Field} contains duplicate elements.                                                                                                                                                                                                                                                                                                                                                              | Set unique field elements.                                                                                                                                 |
| `must.not.be.empty.or.null`                               | Must not be empty or null.                                                                                                                                                                                                                                                                                                                                                                        | Set non-null field elements.                                                                                                                               |
| `firstName.missing`                                       | First name is required                                                                                                                                                                                                                                                                                                                                                                            | First name required. To create or update an end user, please specify first name.                                                                           |
| `firstName.length.invalid`                                | First name is too short or first name is too long                                                                                                                                                                                                                                                                                                                                                 | First name does not follow the length requirements. Enter a valid first name between 1 and 100 characters.                                                 |
| `firstName.pattern.invalid`                               | First name pattern is invalid                                                                                                                                                                                                                                                                                                                                                                     | First name does not follow the pattern requirements. Enter a first name that contains at least one non-whitespace character.                               |
| `lastName.missing`                                        | Last name is required                                                                                                                                                                                                                                                                                                                                                                             | Last name is required. To create or update an end user, please specify last name.                                                                          |
| `lastName.length.invalid`                                 | Last name is too short or last name is too long                                                                                                                                                                                                                                                                                                                                                   | Last name does not follow the length requirements. Enter a valid last name between 1 and 100 characters.                                                   |
| `lastName.pattern.invalid`                                | Last name pattern is invalid                                                                                                                                                                                                                                                                                                                                                                      | Last name does not follow the pattern requirements. Enter a last name that contains at least one non-whitespace character.                                 |
| `phone.missing`                                           | Phone Number is required                                                                                                                                                                                                                                                                                                                                                                          | Phone is required. To create or update an end user, please specify the phone.                                                                              |
| `phone.length.invalid`                                    | Phone Number is too short, or the phone Number is too long                                                                                                                                                                                                                                                                                                                                        | Phone number does not follow the length requirements. Enter a valid phone number between 5 and 15 digits.                                                  |
| `phone.pattern.invalid`                                   | Enter a valid phone number, starting with "+", followed by a number other than 0, up to 15 digits in total                                                                                                                                                                                                                                                                                        | Phone number does not follow the pattern requirements. Enter a phone number starting with "+", followed by a number other than 0, up to 15 digits in total |
| `email.missing`                                           | Email is required                                                                                                                                                                                                                                                                                                                                                                                 | Email address is required. To create or update an end user, please specify the email address.                                                              |
| `email.length.invalid`                                    | Email is too short or email is too long                                                                                                                                                                                                                                                                                                                                                           | Email address does not follow the length requirements. Enter a valid email address between 1 and 300 characters.                                           |
| `email.pattern.invalid`                                   | Enter a valid email between 4 and 300 characters, containing "@"                                                                                                                                                                                                                                                                                                                                  | Email address does not follow the pattern requirements. Enter an email address between 4 and 300 characters, containing @.                                 |
| `email.not.updatable`                                     | Email is not updatable                                                                                                                                                                                                                                                                                                                                                                            | Email address is not an updatable property. Please perform the update with the original email address value.                                               |
| `deliverymethod.invalid`                                  | Delivery method not setup at an issuer level                                                                                                                                                                                                                                                                                                                                                      | Reach out to your issuers or Mastercard for making the necessary setup changes.                                                                            |
| `offset.invalid`                                          | Invalid offset                                                                                                                                                                                                                                                                                                                                                                                    | Provide a valid offset value, a number greater than or equal to 0 and a multiple of the value provided for limit.                                          |
| `limit.invalid`                                           | Invalid limit                                                                                                                                                                                                                                                                                                                                                                                     | Provide a valid limit value, greater than or equal to 1.                                                                                                   |
| `ica.invalid`                                             | Invalid ICA value                                                                                                                                                                                                                                                                                                                                                                                 | Invalid ICA value. The ICA can be obtained from the /entities/user-entity endpoint.                                                                        |
| `guid.invalid`                                            | Invalid GUID                                                                                                                                                                                                                                                                                                                                                                                      | Use the /entities/user-entity endpoint to obtain the correct entity GUID.                                                                                  |
| `entity_type.invalid`                                     | Invalid entity_type                                                                                                                                                                                                                                                                                                                                                                               | Use one of the accepted valid values: ISSUER_GROUP, ISSUER, COMPANY_GROUP or COMPANY.                                                                      |
| `entity_status.invalid`                                   | Invalid entity_status                                                                                                                                                                                                                                                                                                                                                                             | Use one of the accepted valid values: ACTIVE or INACTIVE.                                                                                                  |
| `entity_name.length`                                      | Invalid entity_name length                                                                                                                                                                                                                                                                                                                                                                        | Provide a valid entity_name, with a max length of 99 characters.                                                                                           |
| `entity_name.invalid`                                     | Invalid entity_name                                                                                                                                                                                                                                                                                                                                                                               | Provide a valid entity_name. Remove this parameter from your search to be provided with a list of valid entity names.                                      |
| `entity_guid.invalid`                                     | Invalid entity_guid                                                                                                                                                                                                                                                                                                                                                                               | Provide a valid entity_guid. Remove this parameter from your search to be provided with a list of valid entity guids.                                      |
| `required.parameters.not.present`                         | One of the parameters \[corpGuids, realCardGuids, issuerGuids, fundingSourceAliases, fundingSourceGuids\] needs to be provided                                                                                                                                                                                                                                                                    | Retry the search with one of the required parameters present in the request                                                                                |
| `below.range`                                             | {field} has a value below the allowed range                                                                                                                                                                                                                                                                                                                                                       | Set the field to a valid value                                                                                                                             |
| `above.range`                                             | {field} has a value above the allowed range                                                                                                                                                                                                                                                                                                                                                       | Set the field to a valid value                                                                                                                             |
| `real.card.invalid`                                       | The Real Card Number provided is invalid.                                                                                                                                                                                                                                                                                                                                                         | Provide a valid Real Card Number                                                                                                                           |
| invalid data: `accountNumber`                             | No issuer was found matching Pan Range                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                            |

|       **Reason code**        |        **Description**         | **Resolution steps**  |
|------------------------------|--------------------------------|-----------------------|
| `user.authentication.absent` | User authentication is absent. | Set user credentials. |

|       **Reason code**        |        **Description**         |        **Resolution steps**        |
|------------------------------|--------------------------------|------------------------------------|
| `user.authorization.missing` | User authorization is missing. | Set user authorization privileges. |

|         **Reason code**         |               **Description**               |                                       **Resolution steps**                                        |
|---------------------------------|---------------------------------------------|---------------------------------------------------------------------------------------------------|
| `resource.not.found`            | Virtual card not found.                     | Set the correct virtual card number.                                                              |
| `resource.not.found`            | Contact not found.                          | Set the correct contact details.                                                                  |
| `resource.not.found`            | Funding source not found.                   | Set the correct funding source.                                                                   |
| `resource.not.found`            | Real card not found.                        | Set the correct real card number.                                                                 |
| `virtualCard.endUser.not.found` | End user for virtual card is not registered | Virtual card end user does not exist. Please enter a virtual card GUID with an existing end user. |

|                  **Reason code**                  |                                                       **Description**                                                       |                                         **Resolution steps**                                         |
|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| `virtual.card.blocked`                            | Virtual Card is blocked.                                                                                                    | Either unblock the card or set a different Virtual Card.                                             |
| `funding.source.blocked`                          | Funding Source is blocked.                                                                                                  | Either unblock the Funding Source or set a different Funding Source.                                 |
| `guid.invalid`                                    | Real card GUID is invalid.                                                                                                  | Set a valid card GUID.                                                                               |
| `real.card.status.invalid`                        | Real card not active for funding source.                                                                                    | Activate the real card for the funding source.                                                       |
| `controls.disabled`                               | Authorization controls are disabled.                                                                                        | Enable authorization controls.                                                                       |
| `field.invalid`                                   | Account Number is already present. Duplicate Account Numbers are not allowed.                                               | Set a different account number.                                                                      |
| `ownerGuid.invalid`                               | Invalid Owner GUID. Owner GUID must be the GUID of an Issuer or Corporate.                                                  | Set the GUID of an Issuer or Corporate.                                                              |
| `ownerGuid.invalid`                               | Invalid Issuer GUID, Owner GUID combination.                                                                                | Set a valid issuer, owner GUID combination.                                                          |
| `funding.source.status.invalid`                   | There is no active Funding Source associated with provided Replaced Account GUID.                                           | Set an account GUID with an active funding source.                                                   |
| `funding.source.inactive`                         | Funding source is not active                                                                                                |                                                                                                      |
| `replacedAccountGuid.invalid`                     | Replaced Account GUID does not exist.                                                                                       | Set a different account GUID.                                                                        |
| `real.card.associated.with.active.funding.source` | The real card is associated with an active funding source and cannot be deleted.                                            | Set a real card with an inactive funding source.                                                     |
| `real.card.not.unique`                            | The real card is already associated with another funding source. Real cards can only be associated with one Funding Source. | Set a real card that is not associated with a funding source.                                        |
| `action.invalid`                                  | Funding source is associated with virtual card(s) and cannot be deleted.                                                    | Set a funding source that is not associated with a virtual card and resubmit the request.            |
| `action.invalid`                                  | The real card is associated with a blocked funding source and cannot be deleted or updated.                                 | Set a real card that is not associated with a blocked funding source.                                |
| `status.invalid`                                  | The virtual card already has %s status.                                                                                     | Set a virtual card that does not have %s status.                                                     |
| `status.invalid`                                  | The funding source already has %s status.                                                                                   | Set a funding source that does not have %s status.                                                   |
| `toTime.before.fromTime`                          | 'To Time' must not be before End Time.                                                                                      | Set a To Time after End Time.                                                                        |
| `virtualCard.endUser.exists`                      | End user for the virtual card was already registered                                                                        | Virtual card end user already exists. Please enter a virtual card GUID without an existing end user. |

|          **Reason code**           |         **Description**          |              **Resolution steps**              |
|------------------------------------|----------------------------------|------------------------------------------------|
| `provisioning.service.call.failed` | Provisioning service call failed | Wait some time and try the service call again. |

## Transaction Reports reason codes {#transaction-reports-reason-codes}

|            **Reason code**            |                              **Description**                               |   |
|---------------------------------------|----------------------------------------------------------------------------|---|
| `account.not.found`                   | Account not found.                                                         |   |
| `account.number.length.invalid`       | Account number is too short.                                               |   |
| `account_guid.length.invalid`         | Account GUID is too short.                                                 |   |
| `account.number.account_guid.missing` | Account Number or Account GUID is required.                                |   |
| `account.number.pattern.invalid`      | Account number pattern is invalid.                                         |   |
| `accountNumber.contains.VCN`          | Account Number in Clearing Summary Report request should not contain VCNs. |   |
| `dateTimeRangeFrom.invalid`           | `DateTimeRangeFrom` format is invalid.                                     |   |
| `toDateTime.before.fromDateTime`      | `DateTimeRangeTo` must not be before `DateTimeRangeFrom`.                  |   |
| `dateRange.invalid`                   | Report date range cannot exceed 30 days(s).                                |   |
| `transactionType.invalid`             | Transaction Type is invalid.                                               |   |
| `dateTimeRangeTo.missing`             | `DateTimeRangeTo` field is required.                                       |   |
| `dateTimeRangeFrom.missing`           | `DateTimeRangeFrom` field is required.                                     |   |
| `reportGuid.notfound`                 | Report GUID not found.                                                     |   |
| `reportGuid.invalid`                  | Report GUID is invalid.                                                    |   |
| `reportGuid.expired`                  | Report GUID has expired.                                                   |   |
| `pagination.limit.exceeded`           | Limit should not exceed 100.                                               |   |
| `pagination.limit.exceeded`           | Limit should not exceed 10.                                                |   |
| `limit.invalid`                       | Invalid Limit value.                                                       |   |
| `offset.invalid`                      | Pagination Offset value is invalid.                                        |   |

| **Reason code** |          **Description**           |   |
|-----------------|------------------------------------|---|
| DECLINED        | Unauthorized - Access Not Granted. |   |

|    **Reason code**    |                     **Description**                      |   |
|-----------------------|----------------------------------------------------------|---|
| `user.not.authorized` | User is not authorized to either create or view reports. |   |

## Custom Data Fields reason codes {#custom-data-fields-reason-codes}

|          **Reason code**           |                                    **Description**                                     |                                                                                       **Resolution steps**                                                                                       |
|------------------------------------|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `customDataGuid.length.invalid`    | Custom Data GUID is too short or too long                                              | Custom Data GUID does not follow the length requirements. Enter a valid Custom Data GUID between 1 and 100 characters.                                                                           |
| `customDataGuid.pattern.invalid`   | Custom Data GUID pattern is invalid                                                    | Custom Data GUID does not follow the pattern requirements. To access Custom Data Fields, enter an existing Custom Data GUID that was generated during creation.                                  |
| `customDataGuid.not.updatable`     | Custom Data GUID is not updatable                                                      | Custom Data GUID is not an updatable property. Do not specify the Custom Data GUID in the request.                                                                                               |
| `customDataAlias.length.invalid`   | Custom Data Alias is too short or too long                                             | Custom Data Alias does not follow the length requirements. To create or update Custom Data Fields, enter a Custom Data Alias between 1 and 100 characters.                                       |
| `customDataAlias.pattern.invalid`  | Custom Data Alias pattern is invalid                                                   | Custom Data Alias does not follow the pattern requirements. To create or update Custom Data Fields, add an alias that contains at least one non whitespace character.                            |
| `customDataFields.missing`         | Custom Data values are required                                                        | To create or update a Custom Data Fields, specify the custom data values, "name" and "value".                                                                                                    |
| `customDataFields.empty`           | Custom Data is not populated                                                           | The request has been made with an empty Custom Data values list: "customDataFields:\[\]". To create or update a Custom Data Fields, specify the custom data values, "name" and "value".          |
| `customDataFields.invalid`         | Custom Data is invalid                                                                 | Custom Data Fields does not follow the data format requirements. To create or update Custom Data Fields, enter data in the correct format.                                                       |
| `customDataFields.invalid`         | Custom Data format is invalid                                                          | Custom Data Fields does not follow the data format requirements. To create or update Custom Data Fields, enter data in the correct format.                                                       |
| `customDataFields.length.invalid`  | Custom Data is too short or too long                                                   | The Custom Data Fields attributes "name" and "value" do not follow the length requirements. To create or update Custom Data Fields, enter between 1 and 100 characters.                          |
| `customDataFields.limit.exceeded`  | Maximum key value pairs supported exceeded                                             | The number of key value pairs do not follow the length requirements. To create or update Custom Data Fields, enter between 1 and 100 key value pairs.                                            |
| `ownerGuid.missing`                | Owner GUID is required                                                                 | To create or update a Custom Data Fields, specify the owner GUID in the request.                                                                                                                 |
| `ownerGuid.length.invalid`         | Owner GUID is too short or too long                                                    | To create or update a Custom Data Fields, enter an Owner GUID between 1 and 100 characters.                                                                                                      |
| `ownerGuid.pattern.invalid`        | Owner GUID pattern is invalid Owner GUID is invalid.                                   | To create or update a Custom Data Fields, enter an existing Owner GUID, belonging to an Issuer or a Corporate.                                                                                   |
| `ownerGuid.invalid`                | Invalid Owner GUID. Owner GUID must be the GUID of an Issuer or Corporate.             | To create or update Custom Data Fields, enter an existing Owner GUID, belonging to an Issuer or a Corporate.                                                                                     |
| `ownerGuid.invalid`                | Invalid Owner GUID. Owner GUID does not exist or cannot be used.                       | To create or update Custom Data Fields, enter an existing Owner GUID, belonging to an Issuer or a Corporate.                                                                                     |
| `ownerGuid.invalid`                | Invalid ownerGuid is invalid. Owner Guid does not follow the data format requirements. | To create or update Custom Data Fields, provide data in the correct format.                                                                                                                      |
| `ownerGuid.not.updatable`          | Owner GUID is not updatable                                                            | Owner GUID is not an updatable property. To update other Custom Data Fields attributes, do not specify the Owner GUID in the request.                                                            |
| `issuerGuid.length.invalid`        | Issuer GUID is too short or too long                                                   | Issuer GUID does not follow the length requirements. To search for Custom Data Fields, enter an Issuer GUID between 1 and 100 characters.                                                        |
| `issuerGuids.limit.exceeded`       | Maximum number of issuer GUIDs supported exceeded                                      | The number of Issuer GUIDs do not follow the length requirements. To search for a Custom Data Fields, enter between 1 and 100 Issuer GUIDs.                                                      |
| `issuerGuid.pattern.invalid`       | Issuer GUID pattern is invalid                                                         | Issuer GUID does not follow the pattern requirements. To search for Custom Data Fields, enter an Issuer GUID that was previously generated.                                                      |
| `corpGuid.length.invalid`          | Corp GUID is too short or too long                                                     | Corp GUID does not follow the length requirements. To search for Custom Data Fields, enter a Corp GUID between 1 and 100 characters.                                                             |
| `corpGuids.limit.exceeded`         | Maximum number of corp GUIDs supported exceeded                                        | The number of Corp GUIDs do not follow the length requirements. To search for a Custom Data Fields, enter between 1 and 100 Corp GUIDs.                                                          |
| `corpGuid.pattern.invalid`         | Corp GUID pattern is invalid                                                           | Corp GUID does not follow the pattern requirements. To search for Custom Data Fields, enter a Corp GUID that was previously generated.                                                           |
| `customDataGuid.length.invalid`    | Custom Data GUID is too short or too long                                              | Custom Data GUID does not follow the length requirements. To search for Custom Data Fields, enter a Custom Data GUID between 1 and 100 characters.                                               |
| `customDataGuids.limit.exceeded`   | Maximum number of custom data GUIDs supported exceeded                                 | The number of Custom Data GUIDs do not follow the length requirements. To search for a Custom Data Fields, enter between 1 and 100 Custom Data GUIDs.                                            |
| `customDataGuid.pattern.invalid`   | Custom data GUID pattern is invalid                                                    | Custom Data GUID does not follow the pattern requirements. To search for Custom Data Fields, enter a Custom Data GUID that was previously generated by the system.                               |
| `customDataAlias.length.invalid`   | Custom Data Alias is too short or too long                                             | Custom Data Alias does not follow the length requirements. To search for Custom Data Fields, enter a Custom Data Alias between 1 and 100 characters.                                             |
| `customDataAliases.limit.exceeded` | Maximum number of custom data aliases supported exceeded                               | The number of aliases do not follow the length requirements. To search for a Custom Data Fields, enter between 1 and 100 aliases.                                                                |
| `customDataAlias.pattern.invalid`  | Custom Data Alias pattern is invalid                                                   | Custom Data Alias does not follow the pattern requirements. To search for Custom Data Fields, add an alias that contains at least one non whitespace character.                                  |
| `customDataGuid.length.invalid`    | Custom Data GUID is too short or too long                                              | Custom Data GUID does not follow the length requirements. To create or update a card with Custom Data Fields, enter a Custom Data GUID between 1 and 100 characters.                             |
| `customDataGuid.pattern.invalid`   | Custom Data GUID pattern is invalid                                                    | Custom Data GUID does not follow the pattern requirements. To create or update a card with Custom Data Fields, enter an existing Custom Data GUID that was previously generated during creation. |

|      **Reason code**       |      **Description**       |                            **Resolution steps**                            |
|----------------------------|----------------------------|----------------------------------------------------------------------------|
| `customDataGuid.not.found` | Custom Data GUID not found | The Custom Data Fields does not exist. Enter an existing Custom Data GUID. |

|     **Reason code**      |       **Description**       |                                                                          **Resolution steps**                                                                          |
|--------------------------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `customDataGuid.invalid` | Custom Data GUID is invalid | Custom Data GUID does not exist. To create or update a card with Custom Data Fields, enter an existing Custom Data GUID that was previously generated during creation. |

## Retail API migration reason codes {#retail-api-migration-reason-codes}

|                **Reason code**                 |                        **Description**                         |                  **Resolution steps**                   |
|------------------------------------------------|----------------------------------------------------------------|---------------------------------------------------------|
| `cpnId.and.accountNumber.not.allowed.together` | The request's CpnId and AccountNumber cannot be used together. | Provide either a CpnId or AccountNumber in the request. |
| `corp.or.issuer.guid.invalid`                  | The Corp or Issuer GUID is invalid.                            | Provide a valid Corp or Issuer GUID.                    |
| `downstream.service.call.failed`               | Downstream service call has failed.                            | Wait some time and retry the request.                   |
| `downstream.service.call.failed`               | Downstream service call to get RCN details has failed.         | Provide a different RCN.                                |
| `downstream.service.call.failed`               | Downstream service call to get VCN details has failed.         | Provide a different VCN.                                |
| `pattern.invalid`                              | The CPN ID format is invalid.                                  | Provide a valid CPN ID.                                 |
| `ownerGuid.invalid`                            | The ownerGuid format is invalid.                               | Provide a correct OwnerGuid.                            |
| `ownerGuid.cpn.combination.invalid`            | Invalid ownerGuid CPN combination.                             | Provide a valid combination of ownerGuid and CPN.       |
| `accountType.invalid`                          | The account type is invalid.                                   | Provide a valid account type.                           |
| `cpnId.or.accountNumber.required`              | The CpnId or AccountNumber must be populated in the request.   | Provide either a CPN ID or an account number.           |

|    **Reason code**    |                        **Description**                        |                                   **Resolution steps**                                    |
|-----------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| `resource.not.found`  | Corp GUID or Issuer GUID is not found.                        | Provide a valid Corp GUID or Issuer GUID.                                                 |
| `resource.not.found`  | RCN details not found for given CPN or Account Number.        | Provide a different CPN or account number.                                                |
| `resource.not.found`  | VCN Parent not found.                                         | Provide a different VCN.                                                                  |
| `resource.not.found`  | VCN details not found for given CPN or Account Number.        | Provide a different VCN.                                                                  |
| `cpn.not.found`       | CPN ID not found.                                             | Provide a valid CPN ID.                                                                   |
| `ownerGuid.not.found` | ownerGuid not found.                                          | Provide a valid OwnerGuid.                                                                |
| `accountType.empty`   | Account Type is not populated.                                | Provide an account type.                                                                  |
| `resource.not.found`  | Funding source associated with parent RCN could not be found. | Try migrating the real card associated with this VCN first, then retry migrating the VCN. |

| **Reason code** |                   **Description**                   |         **Resolution steps**          |
|-----------------|-----------------------------------------------------|---------------------------------------|
| `server.error`  | Funding source or real card data upsert has failed. | Wait some time and retry the request. |
| `server.error`  | Virtual card data upsert has failed.                | Wait some time and retry the request. |

## Payload Encryption reason codes {#payload-encryption-reason-codes}

|          **Reason code**           |               **Description**               |                                                                                                                     **Resolution steps**                                                                                                                     |
|------------------------------------|---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `request.encryption.required`      | Request is required encrypted               | The endpoint is configured to receive encrypted requests. Please send the request again, encrypted.                                                                                                                                                          |
| `request.encryption.not.supported` | Request is required unencrypted             | The endpoint is not configured to support encryption. Please send the request unencrypted.                                                                                                                                                                   |
| `encryption.key.error`             | Encryption keys are not properly configured | The endpoint is configured to receive encrypted requests, but the keys are not configured or a different key was used for encryption. Make sure that all encryption keys are configured and the correct key is used, or raise a ticket for the support team. |
| `encryption.keys.not.set`          | Encryption keys are not configured          | Payload encryption is not enabled. Please send the request unencrypted or enable encryption by setting up the encryption keys.                                                                                                                               |

## Idempotency reason codes {#idempotency-reason-codes}

|     **Reason code**      |             **Description**              |                **Resolution steps**                 |
|--------------------------|------------------------------------------|-----------------------------------------------------|
| `idempotencyKey.invalid` | The idempotency key is not a valid UUID. | Send the Idempotency key in a valid v4 UUID format. |

## ISO country and currency codes {#iso-country-and-currency-codes}

Tip: Business Payment Controls uses Numeric values for country and currency codes, as published in the [Quick Reference Booklet](https://trc-techresource.mastercard.com/r/bundle/m_qrb_en-us/page/d/en-US/mkd1738168632068.html), which is available in the [Technical Resource Center](https://trc-techresource.mastercard.com/home) on Mastercard Connect.

The currency codes are the ISO 4217 currency codes defined by the International Organization for Standardization (ISO). For information about the ISO standard, see [here](https://www.iso.org/iso-4217-currency-codes.html).

## Date and time formats {#date-and-time-formats}

For a list of supported timezones, see
[list_of_supported_time_zones.pdf](https://static.developer.mastercard.com/content/business-payment-controls/uploads/list_of_supported_time_zones.pdf) (323KB).
Tip: `ISODateTime` follows the [ISO 8601 format](https://www.w3.org/TR/NOTE-datetime) `YYYY-MM-DDThh:mm:ssTZD`, (for example `1997-07-16T19:20+01:00`).

### Time zone values {#time-zone-values}

| **timeZone** | **Standard offset** | **DST offset** |
|--------------|---------------------|----------------|
| GMT          | +0000               | +0100          |
| CET          | +0100               | +0200          |
| EET          | +0300               | No DST         |
| MSK          | +0400               | No DST         |
| AFT          | +0430               | No DST         |
| PKT          | +0500               | No DST         |
| IST          | +0530               | No DST         |
| NPT          | +0545               | No DST         |
| BST          | +0600               | No DST         |
| MMT          | +0630               | No DST         |
| ICT          | +0700               | No DST         |
| HKT          | +0800               | No DST         |
| TLT          | +0900               | No DST         |
| ACST         | +0930               | No DST         |
| AET          | +1000               | +1100          |
| LHST         | +1030               | +1100          |
| SAKT         | +1100               | No DST         |
| WFT          | +1200               | No DST         |
| CHAST        | +1245               | +1345          |
| PHOT         | +1300               | No DST         |
| LINT         | +1400               | No DST         |
| EGT          | -0100               | -0000          |
| FNT          | -0200               | No DST         |
| BRT          | -0300               | No DST         |
| CLT          | -0400               | -0300          |
| EST          | -0500               | -0400          |
| CST          | -0600               | -0500          |
| MST          | -0700               | -0600          |
| PST          | -0800               | -0700          |
| AKST         | -0900               | -0800          |
| HST          | -1000               | No DST         |
| SST          | -1100               | No DST         |

## Spend control period values {#spend-control-period-values}

|   **Period**   | **Value** |                                                                                                         **Description**                                                                                                         |
|----------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Daily**      | D         | 00:00:00 to 23:59:59                                                                                                                                                                                                            |
| **Monthly**    | M         | From the start date of the month to the end date, for any number of days.                                                                                                                                                       |
| **Weekly**     | W         | Monday 00:00:00 to Sunday 23:59:59. The request can be submitted on any day.                                                                                                                                                    |
| **Quarterly**  | Q         | From 00:00:00 on the first day of the quarter to 23:59:59 on the last day. * Quarter 1: January 01 to March 31. * Quarter 2: April 01 to June 30. * Quarter 3: July 01 to September 30. * Quarter 4: October 01 to December 31. |
| **Yearly**     | Y         | From 00:00:00 on the first day of the year to 23:59:59 on the last day.                                                                                                                                                         |
| **Continuous** | C         | 00:00:00 on the first day with no end date.                                                                                                                                                                                     |

