Get Instant Solutions for Kubernetes, Databases, Docker and more
Braintree Recurring is a powerful tool that facilitates subscription billing and management for businesses. It allows developers to integrate seamless subscription services into their applications, handling everything from billing cycles to customer management. This tool is part of the broader Braintree Payments platform, which is known for its robust and flexible payment processing capabilities.
When working with Braintree Recurring, you might encounter an error message with the code 91510. This error typically manifests when attempting to create or update a subscription with an invalid trial period. The error message might read something like: "Invalid trial period." This indicates that there is a mismatch between the trial period specified in your API request and the plan settings configured in Braintree.
The error code 91510 is triggered when the trial period specified in your subscription request does not align with the trial period settings of the plan you are trying to use. This can happen if the trial period is set to a value that is not allowed by the plan or if the plan does not support trial periods at all. For more information on Braintree error codes, you can visit the Braintree Error Codes Documentation.
To resolve the 91510 error, follow these steps:
First, check the plan settings in your Braintree dashboard to ensure that the trial period you are trying to set is supported. Navigate to the Braintree Control Panel, and review the plan details under the 'Plans' section.
Ensure that your API request includes a trial period that matches the plan settings. Here is an example of how to set the trial period correctly in your API request:
{
"subscription": {
"paymentMethodToken": "your_payment_method_token",
"planId": "your_plan_id",
"trialPeriod": true,
"trialDuration": 14, // Ensure this matches the plan settings
"trialDurationUnit": "day"
}
}
After making the necessary adjustments, test the subscription creation process again to ensure the error is resolved. You can use Braintree's API documentation for guidance on testing and validating your requests.
By ensuring that your trial period settings align with your plan configurations, you can effectively resolve the 91510 error in Braintree Recurring. Proper configuration and testing will help maintain a smooth subscription management process for your application.
(Perfect for DevOps & SREs)
Try Doctor Droid — your AI SRE that auto-triages alerts, debugs issues, and finds the root cause for you.