Skip to main content
If an API request fails, Archefusion returns a clear error response to help you identify the issue and debug faster. The error response follows a consistent structure: Example:

Error types

Meaning: The amount field is missing.Solution: Ensure that you provide a valid amount in the amount field before sending a request to the initiate payment endpoint.
Meaning: The provided paymentMethod field or currency field does not match your configured smart routing rule or is missing.Solution: Ensure that you provide a valid paymentMethod and currency that matches your smart routing rule before sending a request to the initiate payment endpoint.
Meaning: The merchantOrderId field is missing.Solution: Ensure that you provide a merchantOrderId field before sending a request to the initiate payment endpoint.
Meaning: The currency field is missing.Solution: Ensure that you provide a valid currency field before sending a request to the initiate payment endpoint.
Meaning: The currency provided in the payment request is not supported by the gateway that Archefusion routed the payment to. This typically happens when no smart routing rule matches the transaction currency and the default gateway does not support it.Solution: Configure a smart routing rule for the currency you want to accept and ensure at least one active gateway supports it. Visit the supported gateways and payment methods page to see which currencies each gateway supports.
Meaning: The provided paymentId in the verify payment request is invalid.Solution: Provide a valid paymentId.
Meaning: Your connected payment gateways are inactive.Solution: Navigate to Payment Gateways > Gateway Providers and select your connected gateway. Toggle the gateway status to active.
Meaning: The customer.email field is missing.Solution: Ensure you provide a valid customer email address in your initiate payment payload, especially when you have the Korapay gateway configured.

Failed payments

A payment can fail even when the API request itself succeeds. If your first configured gateway and all its fallback gateways fail to process the payment, the transaction is marked as failed.
This response returns statusCode: 200 and message: "Payment initiated". Always check data.status, not the HTTP status code or message, to confirm the outcome. A failed payment has data.status set to "FAILED" and data.executionStatus set to "failed".
When a payment fails after all gateways are exhausted, the failure details are returned inside the recommendedGateway.session object: Example response The following shows what the response typically looks like when all gateways, the recommended gateway, and every fallback fail to process a payment.

How to reduce failed payments

This failure happens only when every gateway in your routing plan is unavailable, which is rare. To reduce the chance of it:
  • Configure more than one gateway in your smart routing rules, so Archefusion has fallbacks to try if the first is down. See smart routing.
  • Keep your gateway credentials valid and your gateways active, so they are not skipped during routing.