Payment Intent and Payment Method errors
Common API errors when creating, attaching, and retrieving payment intents and payment methods.
Create Payment Intent API errors
| Error Code | Definition / Error Message | Status Code | Next Action |
|---|---|---|---|
parameter_invalid | The value passed does not exist from the allowed (specific) values. e.g. the country code passed XY is not a valid country value or a value other than PHP for currency is passed. | 400 | Double check that the correct value is passed for the parameter. |
parameter_data_type_invalid | The value passed does not match the attribute's data type (e.g. passing a string for an integer attribute). | 400 | Double check that the correct value is passed for the parameter. |
parameter_format_invalid | The value passed does not meet the required format or input type/s of the attribute. | 400 | Double check that the correct value is passed for the parameter. |
parameter_required | No value is passed for the required attribute. "<attribute> is required." e.g. "amount is required." | 400 | Pass a correct value for the required attribute. |
parameter_below_minimum | The value passed is less than the minimum value required by the attribute. "The minimum value for the amount is 2000." (Php 20.00 in cents format) | 400 | Pass a value higher than the minimum amount. |
parameter_above_maximum | The value passed exceeds the maximum value accepted by the attribute. "The maximum value for the amount cannot be greater than 999999999." (Php 9,999,999.99 in cents format) | 400 | Pass a value lower than the maximum amount. |
organization_not_allowed | Account is not allowed to perform the specific request. | 400 | Reach out to [email protected] |
Create Payment Method API errors
| Error Code | Description / Error Message | Status Code | Next Action |
|---|---|---|---|
parameter_invalid | The value passed does not exist from the allowed (specific) values. e.g. payment method ABCD value passed is not among the list of supported payment methods. | 400 | Double check that the correct value is passed for the parameter. |
parameter_required | No value is passed for the required attribute. "<attribute> is required." e.g. "billing.email is required." | 400 | Pass a correct value for the required attribute. |
parameter_format_invalid | The value passed does not meet the attribute's required format or input type/s. | 400 | Double check that the correct value is passed for the parameter. |
payment_method_not_allowed | The payment method is not allowed. | 400 | PayMongo account is not allowed for this payment method. Try a different payment method. |
invalid_payload_format | The values passed for the required attributes are blank. | 400 | Double check payload, make sure required attributes are passed correctly. |
Attach Payment Method to Payment Intent API errors
| Error Code | Description / Error Message | Status Code | Next Action |
|---|---|---|---|
invalid_payload_format | The values passed for the required attributes are blank. | 400 | Double check payload, make sure required attributes are passed correctly. |
parameter_attached_state | Payment method with id #{@payment_method.id} cannot be re-attached. | 400 | Try again with a new payment method resource. |
parameter_invalid | Payment method is not allowed for the payment intent. "Payment method #{@payment_method.id} is not allowed for payment intent #{@payment_intent.id}" | 400 | Double check payment intent and payment method details. |
parameter_required | No value is passed for the required attribute. "<attribute> is required for payment method <payment_method type>." e.g. "return_url is required for payment method gcash." | 400 | Pass a correct value for the required attribute. |
resource_processing_error | It's possible that your PayMongo account is not activated for the payment method. "Something went wrong on our end. We have been notified and will be investigating." | 500 | Kindly email us at [email protected] |
resource_not_found | No such payment intent with id #{@payment_intent_id}. No such payment method with id #{@payment_method_id}. Organization with id #{@organization.id} has no balance. | 400 | Double check payment intent and payment method details. |
resource_succeeded_state | Payment intent status is already marked as succeeded. "Payment intent with id #{@payment_intent.id} has already succeeded." | 400 | Re-attach a new payment intent. |
livemode_mismatched | Payment intent with id #{@payment_intent.id} must be in #{mode} mode. Payment method with id #{@payment_method.id} must be in #{mode} mode. | 400 | Double check that both payment intent and payment method are using the same mode. |
account_not_activated | Please activate your account first in order to access this resource. | 400 | Make sure your PayMongo account is activated. |
payment_method_not_allowed | The payment method is not allowed. | 400 | Make sure your PayMongo account is configured to use the payment method. You may request configuration on the dashboard or by reaching out to [email protected]. |
Retrieve Payment Intent API errors
| Error Code | Description / Error Message | Status Code | Next Action |
|---|---|---|---|
resource_not_found | No such payment intent with id @{payment_intent_id}. | 404 | Double check the Payment Intent ID and try again. Double check that the API keys being used are correct. If using public API keys, ensure that the client ID passed in the payload is correct. |
API authentication / general errors
| Error Code | Description / Error Message | Status Code | Next Action |
|---|---|---|---|
api_key_required | The API key is not passed during authentication. | 401 | See Authentication for details on how to pass API keys. |
authentication_invalid | The API request did not implement Basic Authentication. | 401 | You need to use basic authentication to proceed. See Authentication for details. |
api_key_not_found | The API key does not exist. | 401 | Double check your API keys. See Authentication for details. |
secret_key_required | The resource being accessed requires a secret key for authentication. | 401 | Use your secret key to access this resource. See Authentication for details. |
account_not_activated | Please activate your account first in order to access this resource. | 401 | Complete the onboarding and activation process on the PayMongo dashboard. |
Updated 8 days ago