Reading the error codes
API Developer Guide
B2B Virtual Account Payment Method uses product-specific error codes in addition to standard Visa Developer Platform error responses.
Business errors are not always reflected in the HTTP status code. To determine whether a request succeeded, parse the response body and evaluate the returned status code and error description.
See Error Response Format for endpoint-specific response structures.
Standard VDP error codes
For common HTTP status codes and standard Visa error codes, see the Visa Developer Error Codes reference.
How error codes are scoped
Before implementing error handling, understand these characteristics of B2B Virtual Account Payment Method error codes.
Code Format Varies by Endpoint
B2B Virtual Account Payment Method does not use a single error code format across all APIs.
- Payment endpoints return prefixed error codes, such as PP004.
- Request Virtual Account returns numeric error codes, such as 12624.
- Account management endpoints return short numeric error codes, such as 016.
Do not assume that all error codes follow the same format or can be parsed using a single pattern. Build error-handling logic to accommodate the format used by each endpoint.
Codes Are Scoped to the Endpoint, Not Global
Error codes are interpreted in the context of the endpoint that returns them. The same code can represent different conditions on different endpoints.
For example, code 016 indicates:
- A transient processing failure on Get Security Code.
- A missing account number on Get Payment Controls.
Do not build a shared error catalog keyed only on the error code. Instead, evaluate the endpoint and the error code together when determining the error condition and the appropriate remediation.
The error tables in this guide cover the errors most commonly encountered during implementation and testing. They do not include every error that can be returned by the API.
For the complete set of endpoint-specific error codes, see the B2B Virtual Account Payment Method Error Codes Reference.
Request Virtual Account errors
These errors are returned by POST /vpa/v1/requisitionService and represent the most common requisition-related failures encountered during implementation.
| Code | Message | What to do |
|---|---|---|
| 120352 | End date exceeds the maximum allowed limit of 36 months from the initial card request date | Validate requisitionDetails.endDate against the original account request date, not the current date. Extensions count against the original issue date. This is the most frequently encountered error on this endpoint. |
| 12624 | No requisition card details found | Verify that proxyPoolID is valid and that the buyer has an available account in the pool. |
| 7014 | Request could not be processed successfully. Please try your request again after some time | This is a transient error. Retry the request using exponential backoff. |
| 8230 | Proxy number provided in the request is not active | Verify that the specified proxy pool exists and is in an active state. |
| 7001 | Invalid Client ID | Verify that the clientId matches the value registered for the target environment. |
| 12627 | Account number is mandatory | Include accountNumber when updating or deleting an existing account (action=U or action=D). |
| 12620 | Account number should be blank | Omit accountNumber when creating a new account (action=A). |
| 7000 | Message ID is not unique | Generate a new unique messageId for every request, including retries and resubmissions. |
| 12501 | Proxy number length should be between 1 and 19 | Validate the length of proxyPoolID before sending the request. |
| 12697 | Duplicate rules request is not allowed | Ensure that each rule code appears only once in the rule list unless explicitly allowed by the rule definition. |
| 12679 | Invalid SPV rule. Spending limit provided is invalid or not specified | Provide a valid spendLimitAmount when using the Spend Velocity (SPV) rule. |
| 12554 | End date should not be in the past | Validate that the account expiration date is later than the current date. |
| 12622 | At least one requisition rule is mandatory | Include at least one spending or usage rule in every requisition request. |
| 4009 | No single use card accounts available | The proxy pool has been exhausted. Verify available accounts and review replenishment settings with your Implementation Manager. |
Get Security Code errors
These errors are returned by POST /vpa/v1/accountManagement/GetSecurityCode.
| Code | Message | What to do |
|---|---|---|
| 005 | Invalid account number | The most common error on this endpoint. Pass the accountNumber exactly as returned in the requisition response. Do not mask, truncate, or modify the value. |
| 056 | Account expiration date is in the past | The account has expired. Security codes cannot be retrieved after the account expiration date. |
| 057 | Bank and buyer should be enabled for CVV2 | This is a configuration issue rather than a request validation error. Confirm CVV2 entitlement and configuration with your Implementation Manager. |
| 017 | Account does not exist in system | Verify that the account was successfully issued and has not been deleted. |
| 002 | Message ID is not unique | Generate a new, unique messageId for every request. |
| 016 | Request could not be processed successfully. Please try your request again after some time | Transient failure. Retry using exponential backoff. Code 016 has a different meaning on other endpoints. |
Get Payment Controls errors
These errors are returned by POST /vpa/v{1,2}/accountManagement/getPaymentControls.
| Code | Message | What to do |
|---|---|---|
| 016 | Account number does not exist in the system | The most common error on this endpoint. Verify that the account was issued and remains active. This code has a different meaning on Get Security Code. |
| 021 | Account is not registered for authorization controls | The account exists but has no payment controls configured. This is expected for accounts issued without spending or authorization rules. |
| 018 | Client ID is invalid | Verify that the clientId matches the value registered for the target environment. |
| 003 | Message ID should not be more than 36 characters | Validate messageId length before submitting the request. |
Get Requisition Details does not return product-specific error codes in the response body. Request outcomes are communicated through standard HTTP status codes only.
Common Process Payments (PP) Errors
These PP errors are returned by POST /vpa/v1/payment/ProcessPayments. This table highlights the payment-processing issues most commonly encountered during implementation and testing and does not constitute the complete PP error catalog.
| Code | Message | Notes |
|---|---|---|
| PP001 | Successfully processed | Success response. Returned in statusCode when the payment is processed successfully. Typically accompanied by HTTP 201 Created. |
| PP002 | Message ID is not unique | Generate a new unique messageId for every request. Do not reuse message IDs. |
| PP003 | Invalid Client ID | Verify that the clientId matches the value registered during Client Registration and is valid for the target environment. |
| PP004 | Invalid buyer | Verify that the buyer exists and that the correct buyerId is being used. |
| PP005 | Invalid card account number | Verify that the account number is valid and associated with the specified buyer. |
| PP006 | Invalid payment amount | Verify that the amount is greater than zero and complies with currency precision requirements. |
| PP007 | Invalid payment date | Verify that the date is in YYYY-MM-DD format. For TSYS VAN buyers, account for Eastern Time processing. |
| PP008 | Invalid supplier ID | Verify that the supplier exists and that the correct supplierId is being used. |
| PP009 | Invalid currency code | Use a supported ISO 4217 currency code configured for the buyer. |
| PP010 | Buyer does not match with the issuer | Verify that the buyer belongs to the issuer associated with the request. |
| PP011 | Account number does not match with the buyer | Verify that the account belongs to the specified buyer. |
| PP012 | Invalid primary email address | Verify the supplier's primary email address format. |
| PP013 | Invalid alternate email address | Verify the alternate email address format. |
| PP014 | Invalid invoice number | Verify the invoice number format and value. |
| PP015 | Invalid invoice date | Verify that the invoice date is in YYYY-MM-DD format. |
| PP016 | Internal error | Server-side failure. Retry with exponential backoff. Contact your Implementation Manager if the issue persists. |
| PP019 | Failed to set payment control | Verify the spending-control configuration included in the request. |
| PP020 | Payment control validation failed | Verify payment-control types, values, and required parameters. |
| PP021 | Payment control validation failed | Same remediation as PP020. |
| PP022 | Card account is currently being used for another transaction | Another transaction is in progress for the same account. Retry after it completes. |
| PP024 | Payment gross amount not equal to sum of invoice amounts | Ensure that the payment amount equals the total of all invoice amounts. |
| PP025 | Bank or buyer not subscribed for the service | Verify buyer and service subscription status. This error can also indicate that the companyId is not configured in the system. |
| PP027 | Request is already processed | The request was identified as a duplicate. Use a new unique messageId for new requests. |
| PP031 | Payment control cannot be added: account already has 10 exact match rules | The account has reached the maximum of 10 Exact Match rules. Remove existing rules before adding more. |
| PP032 | Transaction amount should be greater than zero | Verify that the transaction amount is greater than zero. |
| PP035 | Invalid message ID | Verify the messageId format, length, and allowed characters. |
| PP036 | Invalid invoice amount | Verify the invoice amount value and format. |
| PP037 | Invalid supplier name | Verify the supplier name. |
| PP038 | Invalid supplier city | Verify the supplier city value. |
| PP039 | Invalid supplier state | Verify the supplier state value. |
| PP040 | Invalid supplier country | Verify the supplier country value. |
| PP041 | Invalid supplier postal code | Verify the supplier postal code value. |
| PP042 | Invalid supplier address line | Verify the supplier address information. |
| PP046 | Payment currency code does not match buyer's configured currency code | Use the currency configured on the buyer record. |
| PP047 | Invalid action type | Verify that a supported action type is specified. |
| PP049 | Invalid payment expiration date | Verify that the date is in YYYY-MM-DD format and is in the future. |
| PP050 | Supplier ID is required | Include a valid supplierId in the request. |
| PP051 | SupplierID is not associated with any STP supplier | Verify that the supplier is registered for STP and has a valid stpId. |
| PP052 | Incorrect supplier and STP ID combination | Verify that the supplier is registered for STP and has a valid stpId. |
| PP053 | STP ID does not exist | Verify that the stpId was obtained from CyberSource and is valid. |
| PP055 | STP supplier ID not exist | Same remediation as PP053. |
| PP056 | Invalid STP supplier ID | Verify the STP supplier identifier. |
| PP057 | Invoice tag is mandatory | Include at least one invoice tag in the request. |
Cancel Payment errors (CP series)
CP errors are returned by POST /vpa/v1/payment/CancelPayment. This table is a curated subset of the available CP-series errors.
| Code | Message | Notes |
|---|---|---|
| CP002 | Message ID is not unique | Generate a unique messageId for every API request. |
| CP003 | Invalid Client ID | See PP003. |
| CP004 | Invalid buyer | See PP004. |
| CP025 | Bank or buyer not yet set up in VPA | The bank or buyer has not been onboarded in Visa Payables Automation. Confirm setup with your Implementation Manager. |
| CP029 | Account number and original message ID combination not found | Verify that both accountNumber and originalMessageId are correct and refer to the same payment. |
| CP030 | Original message ID not found | Verify that the originalMessageId refers to a payment that was successfully processed. |
| CP031 | Payment already collected | The supplier has already collected the payment. Cancellation applies only to uncollected payments. Treat this as a terminal state because the payment completed successfully. |
| CP032 | Cancel payment is not supported for DPS buyers | Cancellation is not available for buyers processed through Direct Payment Services (DPS). Contact your Implementation Manager to determine the supported cancellation process. |
| CP037 | System error during payment cancellation | Transient server error. Retry the request using exponential backoff. If the issue persists, contact your Implementation Manager. |
| CP038 | Cancel not supported for STP payments | STP payments cannot be canceled through this API. Manage STP payment cancellations through CyberSource. |
| CP161 | Payment already canceled (by original message ID) | No action is required. The payment is already canceled. |
| CP162 | Payment already canceled | No action is required. The payment is already canceled. |
| CP167 | Payment cannot be canceled: original payment was not processed successfully | Cancellation requires a successfully processed original payment. Verify the payment status before submitting the cancellation request. |
Resend Payment errors (RSP series)
RSP errors are returned by POST /vpa/v1/payment/ResendPayment. This table is a curated subset of the available RSP-series errors.
| Code | Message | Notes |
|---|---|---|
| RSP001 | Resend Payment initiated successfully | Informational success code returned in some response schemas. |
| RSP003 | Invalid Client ID | See PP003. |
| RSP004 | Invalid buyer ID | See PP004. |
| RSP005 | Invalid account number | Verify that the account number belongs to the specified buyer. |
| RSP012 | Invalid primary email address | Verify that the supplier's primary email address is valid and correctly formatted. |
| RSP013 | Invalid alternate email address | Verify that the alternate email address is valid and correctly formatted. |
| RSP025 | Bank is not subscribed | The issuer is not subscribed to the service, or the buyer's bank record is not configured. Confirm setup with your Implementation Manager. |
| RSP029 | Original message ID and account number do not match | Verify that the accountNumber and originalMessageId refer to the same payment. |
| RSP030 | Original message ID does not exist | Verify that the originalMessageId refers to a successfully processed payment. |
| RSP035 | Invalid message ID | The messageId format is invalid. Verify that the value complies with the field constraints defined in the API reference. |
| RSP043 | Invalid original message ID | The originalMessageId format is invalid. Verify that the value complies with the field constraints defined in the API reference. |
| RSP049 | Expiration date is invalid: supported format is YYYY-MM-DD | Provide the expiration date in YYYY-MM-DD format. |
| RSP161 | Payment has already expired | The virtual account number (VAN) has passed its expiration date. Expired payments cannot be resent. Issue a new payment instead. |
| RSP162 | SupplierProfileUpdateIndicator is invalid | Verify that supplierProfileUpdateIndicator contains a supported value. |
| RSP163 | PrimaryEmailAddress is required | The supplier does not have a primary email address configured. Update the supplier profile with a valid primary email address before resending the payment. |
| RSP167 | Payment was not processed successfully or is in progress | Resend requires a successfully processed payment. Wait for processing to complete or verify the original payment status. |
| RSP173 | Invalid email notes | Verify that the email notes comply with the field requirements defined in the API reference. |
| RSP182 | Invalid alternate address tag | Verify that the alternate address tag contains a supported value. |
| RSP186 | Expiration date cannot be a past date | Provide a future expiration date. |
Resend Payment does not return a dedicated error code for a duplicate messageId. This is a known limitation of the API. Do not design retry or idempotency logic that depends on detecting a duplicate-messageId response from the Resend Payment operation.
Buyer and company setup errors
Buyer and company setup issues typically surface during payment processing rather than buyer creation because Create Buyer establishes the company record. Three distinct conditions apply:
- PP004 Invalid Buyer: The buyer does not exist in the system.
- PP010 Buyer does not match with the issuer: The buyer exists but is not associated with the issuer submitting the request.
- PP025 Bank or buyer not subscribed for the service: The buyer is valid, but the required service has not been enabled.
Error response format
The error response format varies by endpoint.
Core endpoint format (/vpa/v1 and /vpa/v2):
Some endpoints return an errorObject containing errorCode and errorMessage in addition to the response object.
{
"responseStatus": {
"status": "FAILED",
"code": "PP004",
"description": "Invalid buyer"
}
}
| Endpoint | Response wrapper or shape | Status fields to read | Documented success value |
|---|---|---|---|
| Buyer, Buyer Template, Funding Account, Payment Controls, List Payment Control, Get Account Status, Supplier, Update Proxy Pool, Delete Proxy Pool, Get Payment Detail URL, Bulk Requisition | responseStatus | status, code, description | AMCF000 for Add Funding Account; not documented for the other endpoints |
| Request Virtual Account (/vpa/v1/requisitionService) | responses[] | responseCode, responseDescription | 00 |
| Process Payments | ProcessResponse | statusCode, statusDesc | PP001 with HTTP 201 Created |
| Cancel Payment | CancelResponse | statusCode, statusDesc | Not documented |
| Resend Payment | ResendResponse | statusCode, statusDesc | RSP001 (informational; returned in some response schemas) |
| Get Payment Details | GetPaymentResponse | statusCode, statusDesc | Not documented |
| Get Security Code | GetSecurityResponse | statusCode, statusDesc | Not documented |
| Create Proxy Pool | CreateProxyPoolResponse | statusCode, statusDesc; may also include errors[] | Not documented |
| Get Proxy Pool | GetProxyPoolResponse | No status fields documented; response contains proxyList | Not documented |
| Get Requisition Details | HTTP status only | No product-specific status fields | Not documented |
Error handling best practices
Use these practices when handling B2B Virtual Account Payment Method errors:
- Treat CP031 as an informational outcome when applicable. A payment that has already been collected cannot be canceled because the payment completed successfully. Handle CP031 as a terminal payment state rather than a failure.
- Evaluate business outcomes from the response body. Business errors are returned in the response payload and may be returned with an HTTP 200 status. Do not rely on the HTTP status alone. Inspect the endpoint-specific status fields and error codes to determine the outcome.
- Retry only transient conditions. Reserve automatic retries for documented transient or processing-state errors. Do not automatically retry business validation or configuration errors such as CP*, PP*, or RSP* codes because they require corrective action.
| Endpoint | Code | Condition | Documented guidance |
|---|---|---|---|
| Request Virtual Account | 7014 | Request could not be processed successfully | Transient error. Retry using exponential backoff. |
| Get Security Code | 016 | Request could not be processed successfully | Transient error. Retry using exponential backoff. On Get Payment Controls, code 016 has a different meaning and is not retryable. |
| Process Payments | PP016 | Internal error | Server-side error. Retry using exponential backoff. Contact your Implementation Manager if the issue persists. |
| Process Payments | PP022 | Card account is currently being used for another transaction | Retry after the in-flight transaction completes. |
| Cancel Payment | CP037 | System error during payment cancellation | Transient server error. Retry using exponential backoff. |
| Resend Payment | RSP167 | Payment was not processed successfully or is in progress | Wait for processing to complete, then verify the original payment status before retrying. |
Generate a new messageId for every retry. Reusing a messageId is not idempotent and results in duplicate-request errors such as 7000, PP002, CP002, or PP027. Resend Payment does not return a dedicated duplicate-messageId error code. Do not rely on duplicate-message detection when implementing retry logic.
- Support multiple response formats. Response formats vary by endpoint. Most endpoints return status information in responseStatus, some also include an errorObject, and payment APIs use endpoint-specific response wrappers. Parse responses according to the endpoint schema rather than a single universal handler.
- Log messageId for every request. Because messageId values must be unique, duplicate requests are rejected immediately. Logging the messageId helps diagnose duplicate-request errors such as PP002 and CP002.
Environment-specific errors
Error behavior varies by environment. Use this guidance when troubleshooting environment-specific issues:
- Sandbox: Responses are static and based on configured examples. Sandbox does not validate identifier values against real records.
- Certification Test Environment (CTE): IDs that were not provisioned by the Implementation Manager can result in PP003 (Invalid Client ID) or PP004 (Invalid Buyer). Verify all test IDs before troubleshooting other causes.
- Production: PP003, PP004, PP010, and PP025 typically indicate a mismatch between the request and the production credentials, buyer configuration, or service setup. Verify the production configuration with your Implementation Manager.
- Multibyte characters: Payloads that contain multibyte characters return a validation error. This restriction applies globally and is not region-specific. Although commonly associated with Asia Pacific languages, multibyte characters are not supported in any region.