Braintree Recurring Invalid subscription add-on amount

The add-on amount specified does not conform to the expected format or does not match the plan settings.

Understanding Braintree Recurring

Braintree Recurring is a powerful tool designed to manage billing and subscriptions for businesses. It allows developers to integrate subscription billing into their applications seamlessly, providing a robust platform for handling recurring payments and managing customer subscriptions.

Identifying the Symptom

When working with Braintree Recurring, you might encounter the error code 91522, which indicates an issue with the subscription add-on amount. This error typically manifests when trying to create or update a subscription with an invalid add-on amount.

What You Might Observe

Developers will notice that the API call fails, and the response includes the error code 91522. This can prevent the subscription from being created or updated successfully, leading to potential disruptions in billing operations.

Exploring the Issue

The error code 91522 signifies that the add-on amount specified in the subscription request is invalid. This could be due to the amount not being a valid number or not aligning with the predefined plan settings in Braintree.

Common Causes

  • The add-on amount is not a numeric value.
  • The amount does not match the expected format (e.g., too many decimal places).
  • The amount does not adhere to the constraints set in the plan configuration.

Steps to Resolve the Issue

To resolve the 91522 error, follow these actionable steps:

Step 1: Verify the Add-On Amount

Ensure that the add-on amount is a valid numeric value. It should be formatted correctly, typically with two decimal places. For example, use 10.00 instead of 10 or 10.000.

Step 2: Check Plan Settings

Review the plan settings in your Braintree dashboard to ensure that the add-on amount aligns with the configured constraints. You can access your plan settings by logging into your Braintree Dashboard and navigating to the subscriptions section.

Step 3: Update the API Request

Modify your API request to include the correct add-on amount. Ensure that the amount matches the plan's requirements. Here is an example of how your request might look:

{
"subscription": {
"planId": "your_plan_id",
"addOns": [{
"amount": "10.00",
"id": "your_add_on_id"
}]
}
}

Additional Resources

For more information on handling subscription errors, refer to the Braintree Error Codes Documentation. If you continue to experience issues, consider reaching out to Braintree Support for further assistance.

Try DrDroid: AI Agent for Debugging

80+ monitoring tool integrations
Long term memory about your stack
Locally run Mac App available

Thank you for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.
Read more
Time to stop copy pasting your errors onto Google!

Try DrDroid: AI for Debugging

80+ monitoring tool integrations
Long term memory about your stack
Locally run Mac App available

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Thank you for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.
Read more
Time to stop copy pasting your errors onto Google!

MORE ISSUES

Deep Sea Tech Inc. — Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid