Visa Accounts Receivable Manager (Visa AR Manager)

Navigate to...
keyboard_arrow_down

Error Codes

Visa AR Manager APIs use a comprehensive error reporting system that combines HTTP status codes with detailed business logic error information. The APIs follow a consistent error reporting pattern across all endpoints, providing multiple levels of error information to help you understand and resolve issues quickly.

  • Error Response Structure – All API responses include consistent error information:
    • HTTP Status Code: Standard HTTP response codes indicating request outcome.
    • Response Body Status: Business logic status information in the response payload.
    • Reason Code: Specific error identifier for detailed error classification.
    • Reason Description: Human-readable explanation of the error condition.
  • Error Categories – The API uses two primary error reporting layers:
    • Protocol Level: HTTP status codes for transport and authentication issues.
    • Business Logic Level: Application-specific errors returned in response bodies.
    • Validation Level: Request format and data validation errors.
    • Processing Level: Payment and operational errors.
  • Error Handling Strategy – Implement comprehensive error handling that addresses:
    • HTTP Level Errors: Network, authentication, and protocol-level issues.
    • Business Logic Errors: Application-specific errors returned in response bodies.
    • Transient Errors: Temporary conditions that may resolve with retry.
    • Permanent Errors: Conditions requiring intervention or correction.
  • Error Response Processing – When processing API responses:
    • Always check the HTTP status code first.
    • Parse the response body for detailed error information.
    • Use reason codes for programmatic error handling.
    • Use reason descriptions for user-friendly error messages.

HTTP Status Codes

Visa AR Manager APIs use standard HTTP status codes to indicate the outcome of API requests at the protocol level. The API uses a limited set of HTTP status codes, focusing on the most relevant codes for payment operations. Each status code provides specific information about the request outcome and guides appropriate response handling.

Success Status Codes

Code Status Description
200 OK Request processed successfully. This status is returned for all successful API operations, including both successful business operations and business logic errors. Always check the response body for detailed status information.

Important: The Visa AR Manager APIs return HTTP 200 for all processed requests, including business logic errors.

For HTTP 200 responses:

  • Always parse the response body for detailed status information.
  • Check the status field for business operation outcome.
  • Use reason_code and reason_desc for error details.
  • Do not assume success based solely on HTTP 200 status.

Client Error Status Codes

Code Status Description
400 Bad Request Request could not be processed due to client error. This status is specifically used for payment provisioning failures where the request format or content is invalid. Check request parameters and format.
401 Unauthorized Authentication credentials are missing, invalid, or expired. Verify that required authentication headers are present and contain valid values. Check client credentials.
403 Forbidden Request is understood but access is denied. This may indicate insufficient permissions for the requested operation or that the client is not authorized for the specific endpoint.
404 Not Found Requested endpoint or resource does not exist. Verify the API endpoint URL and ensure you are using the correct base URL and path.

For client error responses:

  • Do not retry without correcting the underlying issue.
  • Validate request parameters and authentication credentials.
  • Check API documentation for correct request format.
  • Log errors for debugging and monitoring.

Server Error Status Codes

Code Status Description
500 Internal Server Error Unexpected server error occurred while processing the request. This indicates a problem with the API server. Implement retry logic with exponential backoff for transient server errors.
502 Bad Gateway Server received an invalid response from an upstream server. This may indicate temporary connectivity issues between API components. Consider retry with appropriate delays.
503 Service Unavailable API service is temporarily unavailable, possibly due to maintenance or high load. Implement retry logic with exponential backoff. Check service status and maintenance schedules.
504 Gateway Timeout Server did not receive a timely response from an upstream server. This may indicate temporary performance issues. Consider retry with longer timeout values.

For server error responses:

  • Implement retry logic with exponential backoff.
  • Set maximum retry limits to prevent infinite loops.
  • Monitor server error rates for operational insights.
  • Consider circuit breaker patterns for resilience.

Business Logic Errors

Business logic errors in the Visa AR Manager APIs are returned within the response body, even when the HTTP status code is 200. These errors provide detailed information about payment outcomes, configuration issues, and operational conditions that require attention.

All business logic errors follow a consistent structure across endpoints, providing status information, reason codes, and descriptive messages to help you understand and resolve issues.

Error Response Structure

Business logic errors are embedded in the response body with the following structure:

Field Type Description
status String Overall operation status indicating success, failure, or pending state.
reason_code String Specific error code for programmatic error handling and classification.
reason_desc String Human-readable description explaining the error condition and context.

Common Status Values

Code Status Description
1000 ENQUEUED Payment request accepted and queued for processing.
1001 SUCCESS Payment request processed successfully.
1003 PARTIAL_SUCCESS Some payments succeeded while others failed.
1004 FAILED Payment request failed to process.
4001 VALIDATION_FAILURE Request validation failed due to invalid data.
5001 SYSTEM_ERROR Internal system error occurred during processing.

Individual Payment Status Values

Each virtual card transaction within a request can have one of these status values:

Status Description
COMPLETED Virtual card transaction completed successfully.
PENDING Virtual card transaction is still being processed.
FAILED Virtual card transaction failed to complete.

Payment Errors

Category Typical Reason Description and Resolution
Authentication Invalid client credentials Client ID is invalid or expired. Verify credentials and ensure they are current.
Validation Invalid payment data Payment information is incomplete or invalid. Check customer information, payment instruments, and order details.
Processing Payment declined Payment was declined by the payment processor. Check payment instrument validity and available funds.
Configuration Service not configured Payment service is not properly configured for the client. Complete onboarding before processing payments.

Status Inquiry Errors

Common business logic errors for status inquiry operations:

Category Typical Reason Description and Resolution
Request ID Request not found Specified request ID does not exist or is not accessible. Verify the request ID is correct and belongs to your client.
Pagination Invalid page number Requested page number is out of range. Check total pages and adjust pagination parameters.
Access Unauthorized access Client does not have access to the requested payment information. Verify client credentials and permissions.
Data No data available No payment information is available for the specified criteria. Verify request parameters and timing.

Error Handling Best Practices

  • Programmatic Handling – Use reason codes for automated error handling:
    • Implement switch/case logic based on reason codes.
    • Map reason codes to appropriate business actions.
    • Avoid parsing reason descriptions for logic decisions.
    • Maintain error code mappings for different API versions.
  • User Communication – Use reason descriptions for user-facing messages:
    • Display reason descriptions to provide context to users.
    • Enhance descriptions with application-specific guidance.
    • Translate descriptions for international applications.
    • Log both codes and descriptions for debugging.
  • Retry Logic – Implement appropriate retry strategies:
    • Retry transient errors with exponential backoff.
    • Do not retry permanent validation errors.
    • Use different retry strategies for different error categories.
    • Set maximum retry limits to prevent infinite loops.

Common Error Scenarios

These are the frequently encountered error conditions, their typical causes, and recommended resolution approaches. These scenarios are based on common integration patterns and operational experience with the Visa AR Manager APIs.

When encountering errors, always examine both HTTP status codes and response body details to understand the complete error context. Implement comprehensive logging to capture error details for debugging and monitoring purposes.

Authentication Failures

API requests fail with authentication errors, preventing access to Visa AR Manager API endpoints. These failures typically occur during the initial request validation phase and result in HTTP 401 or 403 status codes.

Common Causes:

  • Missing or incorrect client credentials in headers.
  • Incorrect Visa Developer Center (VDC) external application ID for provisioning.
  • Case sensitivity issues with header names or values.

Resolution Approach:

  • Verify all required authentication headers are present.
  • Check credential values against your assigned identifiers.
  • Ensure proper case sensitivity for headers and values.
  • Test authentication in development environment first.

Payment Failures

Where payment requests fail or payments are declined, preventing successful completion of virtual card transactions. These failures can occur at various stages of the payment workflow and require careful diagnosis.

Common Causes:

  • Incomplete or invalid customer information.
  • Invalid payment instrument details.
  • Payment declined by payment processor.

Resolution Approach:

  • Validate all required customer, payment, and invoice data.
  • Missing required fields or parameters.
  • Incorrect data types or formats.
  • Invalid currency codes or amount formats.

Status Inquiry Problems

Status inquiry requests return no data or unexpected results, preventing proper monitoring of payment transaction status. These issues can impact reconciliation and operational visibility.

Common Causes:

  • Invalid or non-existent request IDs.
  • Timing issues with asynchronous processing.
  • Pagination parameters out of range.
  • Access restrictions on payment information.

Resolution Approach:

  • Verify request IDs from payment processing responses.
  • Allow sufficient time for asynchronous processing.
  • Check pagination parameters and total counts.
  • Ensure client has access to requested payment data.

Data Format and Validation Errors

API requests fail due to data format or validation issues, preventing proper processing of request data. These errors typically result in HTTP 400 status codes with detailed validation messages.

Common Causes:

  • Invalid JSON format in request bodies.
  • Missing required fields or parameters.
  • Incorrect data types or formats.
  • Invalid currency codes or amount formats.

Resolution Approach:

  • Validate JSON format before sending requests.
  • Check API documentation for required fields.
  • Verify data types match API specifications.
  • Use standard formats for currencies and amounts.

Troubleshooting

This troubleshooting section provides systematic approaches to diagnosing and resolving common issues with the Visa AR Manager APIs.

Before beginning troubleshooting, ensure you have access to API logs, error messages, and relevant configuration information.

  1. Identify the error type and scope to determine the nature of the issue. Document the specific error messages and codes for reference.
    • HTTP Level Errors – Check HTTP status codes (4xx, 5xx).
    • Business Logic Errors – Examine response body status, reason codes, and descriptions.
    • Authentication Problems – Verify credential-related failures.
  2. Validate authentication credentials and systematically check all authentication elements. Test authentication with minimal requests to isolate credential issues.
    • Verify client ID values for payment operations.
    • Ensure proper header names and case sensitivity.
  3. Examine request format and data validation. Use JSON validation tools to verify request format correctness.
    • Validate JSON format and syntax.
    • Check for required fields and parameters.
    • Verify data types match API specifications.
    • Confirm currency codes and amount formats.
  4. Analyze error responses in detail. Cross-reference error codes with API documentation for specific guidance.
    • Record HTTP status codes and their meanings.
    • Parse response body status, reason codes, and descriptions.
    • Identify specific error categories (authentication, validation, processing).
    • Note any additional error context or correlation IDs.
  5. Verify proper workflow implementation. Review workflow documentation to confirm proper sequence implementation.
    • Confirm request IDs are properly generated and tracked.
    • Check timing for asynchronous operations and status inquiries.
    • Validate pagination parameters for large result sets.
  6. Isolate the problem using simplified test cases. Document successful test cases to establish baseline functionality.
    • Create minimal test requests with required fields only.
    • Test individual endpoints separately.
    • Use development environment for safe testing.
    • Gradually add complexity to identify specific failure points.
  7. Review logs and implement enhanced monitoring. Implement additional logging if needed to capture more diagnostic information.
    • Review application logs for error patterns.
    • Check API response times and success rates.
    • Monitor authentication failure rates.
    • Analyze error frequency and timing patterns.
  8. Implement appropriate retry and error handling logic. Test error handling logic with various error scenarios.
    • Use exponential backoff for transient errors.
    • Avoid retrying permanent validation errors.
    • Set appropriate timeout values for different operations.
    • Implement circuit breaker patterns for resilience.
  9. Document troubleshooting results and next steps. Escalate to Visa support if issues persist after following troubleshooting procedures.
    • Record identified root causes and resolutions.
    • Document configuration changes or fixes applied.
    • Note any unresolved issues requiring escalation.
    • Update integration documentation with lessons learned.

After completing the troubleshooting process, you should have identified the root cause of the issue and implemented appropriate resolution steps. Document the resolution for future reference and to prevent similar issues.

Monitor the resolved issue to ensure the fix is effective and implement preventive measures to avoid similar problems in the future. Update your integration monitoring and alerting based on lessons learned from the troubleshooting process.