Error Codes

Visa AR Manager

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.

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:

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:

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:

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

Both onboarding and payment APIs use these response structure and status codes:

Code Status Description
1000 ENQUEUED Request received and queued for processing.
1001 SUCCESS Request processed successfully.
1003 PARTIAL_SUCCESS Some requests succeeded while others failed.
1004 FAILED Request processing failed.
4001 VALIDATION_FAILURE Request validation failed because it contains invalid data, missing required fields, or format violations.
5000 SYSTEM_ERROR Internal processing error occurred. Retry may be appropriate after a delay.
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

Common business logic errors for payment operations:

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.
Relaying to acquirer/processor or designated payment gateway Payment declined Payment was declined by the payment processor. Check payment instrument validity.
Configuration Service not configured Payment service is not properly configured for the client. Complete onboarding before initiating 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.

Supplier Onboarding Errors

Common business logic errors specific to onboarding operations:

Category Typical Reason Description and Resolution
Supplier Validation Invalid business information Supplier information incomplete or invalid. Check company details, address, business contact, and recipient information for required fields and proper formatting.
Agreement Processing Invalid signer details Participation agreement authorized signer information is invalid or incomplete. Verify authorized signer name, email, and title are provided and properly formatted.
Customer Relationship Invalid supplier relationship Customer cannot be linked to specified supplier. Verify supplier exists and is properly provisioned before onboarding a customer.
Data Format Field validation errors Data format violations including invalid country codes, currency codes, email formats, phone number formats, or enumeration values. Review field requirements and resubmit with corrected data.
Provisioning Status Operation dependency not met Required provisioning steps not completed. Check supplier_provisioning_status and complete prerequisite operations before proceeding.
Deposit Confirmation Invalid payment details Deposit confirmation contains invalid payment information. Verify request_id, supplier_id, and payment_details array structure and content.

Onboarding validation errors include a details array with field-level information:

Error Handling Best Practices

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.

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:

Resolution Approach:

Status Inquiry Problems

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

Common Causes:

Resolution Approach:

Onboarding Failures

Onboarding requests fail due to validation errors or process issues, preventing successful supplier registration or customer creation. These failures require specific attention to onboarding data requirements and workflow sequencing.

Common Causes:

Resolution Approach:

Data Format and Validation Errors

API requests fail due to data format or validation issues, preventing proper processing of request data. The new endpoints enforce specific API constraints for data validation.

Common Causes:

Resolution Approach:

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.