Troubleshoot Backend REST APIs

API taking too long to respond

The usual API response time is around 1 second. If you are executing a high volume of API calls, it could be causing this delay. Check if a loop is in place sending multiple requests.
If you need further help in investigating the issue, reach out to Client Experience.

Downgrading subscription item

Objective: To downgrade the quantity of subscription from 10 to 4 by the next billing interval.

Scenario : UpdateSubscriptionItem API endpoint called

curl --request POST
--url https://rest.cleverbridge.com/subscription/updatesubscriptionitem
--header 'accept: application/json'
--header 'content-type: application/json'
--header 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
--data '{
"AlignmentSettings": {
"AlignToCurrentInterval": true,
"ExtendInterval": false,
"GetCustomerPricePreviewOnly": false
},
"GenerateMail": true,
"ProductId": 123456,
"Quantity": 4,
"RunningNumber": 1,
"SubscriptionId": "S12345678",
"TriggerImmediateRenewal": false,
"UpdateAction": "Downgrade"
}'

Result

"Alignment CUS price total must be >= 0"

Resolution

Set the parameter AlignToCurrentInterval to false, so the downgrade is applied only on the next billing interval.

Setting your AlignToCurrentInterval to true would mean that the downgrade will be applied immediately, and the customer would get a partial refund, which is not possible through our subscription API.


Subscription Payment could not be processed

Subscription updates using Subscription API and the subscription payment process are decoupled from one another. This decoupling enhances the subscription API call performance and results in the automatic handling of unprocessed online payments.

If a payment could not be processed:

  • The customer receives an email, including a link to update the credit card information or to change the payment method .
  • You receive a notification that a payment failed.

If the customer updates the credit card information or changes the payment method, Cleverbridge re-processes the purchase and calculates the next billing date automatically. Upon successful payment, you automatically receive a notification that the purchase has been paid.

Negative Alignment Price

If an API endpoint call sets AlignToCurrentInterval equal to true and the resulting pro-rated billing amount is negative, then an error message is returned and any requested subscription change is not completed. A negative alignment price occurs under these scenarios:

  1. Item price is to be decreased and item quantity remains the same.
  2. Item quantity is to be decreased and item price remains the same.
  3. Both item price and quantity are to be changed, and the resulting billing amount (price x quantity) is less than the current billing amount.
  4. A negative alignment price is also possible when using Align Subscriptions if there were overpayments for one of the subscriptions from a prior billing interval.