Multiple subscriptions in an order results in only one subscription active

(Alexander Anich) #1

Hello! Running into a bit of an issue with charging users for subscriptions. Whenever I’m adding a subscription through Invoice.addOrderItem, it correctly adds the product and when there is only one subscription it works fine.

However, if I add two separate subscription products via Invoice.addOrderItem, only the latest subscription becomes active - resulting in one inactive subscription and one active subscription for the user.

If anyone has had any experience in solving this issue, your knowledge would be greatly appreciated!


(Pav) #3

How is the Subscription being added to the Contact Record?

Running “addOrderItem” API tests does not seem to be adding any subscriptions for me, unless I am doing something wrong. The “addOrderItem” API function just adds order items to the invoice.

Are you using the “addRecurringOrder” API Function?

(Alexander Anich) #4

Thanks for answering Pav, I’m adding the product via “addOrderItem” which includes a subscription plan that gets added to the account.

Single subscription plans work fine, but if there are two in the same order, only one of them becomes active.

(Pav) #5

Any ideas @mike.christianson or @JonSmith?

(Mike Christianson) #6

@Alexander_Anich That doesn’t seem to be doing the right thing. Would you elaborate… the steps you’re going through, which API calls, and, if possible, the payloads?

(Alexander Anich) #7

EDIT: It seems as though the fault lies in a strange syncing function that is was un-subscribing users when adding other subscriptions, not allowing two to exist at the same time in our application logic. I appreciate the help anyways!

@mike.christianson I just recently came onto this project and my familiarity of the system is rough so bear with me - but the process goes like this:

  1. We create a blank order via InvoiceService.createBlankOrder

  2. After it successfully creates the order, we add order items via InvoiceService.addOrderItem for each product id they are purchasing. Only two of the products have subscription plans attached, and when they’re both purchased, only one of the plans becomes active.

edit: Let me see if I can find a payload example…

(Mike Christianson) #8

Thanks for the update!

By the way, you may also be interested in reading about OrderService.placeOrder.