How can one trigger Subscription Billable Event?

Jack Zabolotnyi's Avatar

Jack Zabolotnyi

05 Dec, 2016 01:05 PM

I've registered a custom url for "A customer's scheduled subscription invoice becomes billable" and want to test it to see what data i receive and to test our flows.
I've tried to change billing date for current subscription, but looks like your engine bills recurring invoice immediately and doesn't send subscription billable event (nor does it mark it as outstanding)

What would be the way to test this (other than setting subscription date for tomorrow and waiting a day)?

P.S. Either i'm blind or there is no clear way on how to remove any custom url from the webhooks page (can only remove one that is being added right now)

  1. Support Staff 1 Posted by Meghan Turner on 05 Dec, 2016 05:56 PM

    Meghan Turner's Avatar

    Hi Jack,

    I tested this scenario in one of my dev accounts and was able to replicate the behavior you're describing. I think that we're not seeing the subscription billable hook fire in this situation because the bill date is being changed to now. When our recurring engine picks up an invoice that's scheduled to be transacted and a hook is registered for the subscription billable event, the hook fires before the transaction is run. When you change the bill date to today, CG doesn't wait for the recurring engine to pick up the transaction, the transaction is run immediately. I think it's configured this way intentionally, but I can see how this could be inconvenient during the testing process. I'll go ahead and submit a ticket to our engineering team to confirm that this is the case and see if it would be feasible to change this behavior. I'll attach the ticket to this discussion, so you'll be notified when updates are made.

    For now, I think the best way to test this is to do what you've described, set an invoice to bill tomorrow and check back in with your hook listener after the invoice has been run by the recurring engine.

    While you can't remove a service hook completely from the custom service hooks page, you can de-activate the hook by un-checking the box by the word 'Active' at the bottom of the section for that particular hook. You can also edit existing hooks to change the name, link, or events associated with that hook.

    Let me know if you have any other questions! Also, thanks for getting back to us on our PayPal questions. I'm putting the finishing touches on our migration plan for you and I should be able to send that over to you shortly on our migration thread.

    Meghan

  2. 2 Posted by Jack Zabolotnyi on 05 Dec, 2016 06:02 PM

    Jack Zabolotnyi's Avatar

    Hi Meghan.

    Thank you for an update.

    Via api i can set renewal date with more than a day precision, so i wonder if this will work better than setting renewal date for tomorrow via web interface. And, if so what would be the best timeframe to set to allow your engine to pick up my subscription and send billable event?

  3. Support Staff 3 Posted by Meghan Turner on 05 Dec, 2016 07:59 PM

    Meghan Turner's Avatar

    Hi Jack,

    Yes, I think this could work, too. You can set the invoice to run a few minutes in the future, so it doesn't transact immediately and the recurring engine will pick it up within the next few hours.

    Meghan

  4. Meghan Turner closed this discussion on 17 Jan, 2017 06:09 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac