Take action only on first approved transaction (new user)

So, i'm already using the transaction and cancel hooks. However, this article does not give any guidance on how to discern that the transaction is from a brand new user. What param conditions would equate to a brand new approved customer?

I really wish you would add a simple http option in event hooks. Let us choose the conditions to trigger the http request and then use your templating language for placeholder vars in the http request body. SMS, other services, mmmmm.

  1. Hi Stephen -- Great to hear from you! It's quite a coincidence that you ask this question today. We're very close to releasing a major rewrite of the hook system. I'd be surprised if it doesn't meet all of your requirements. We're looking at less than a couple of weeks.

  2. Hey Marc,

    Sounds great! However, I would still like to know if there is a $_POST condition I can use to determine a transaction is a new sign up? Perhaps a combination would suffice? I guess I could just keep the state on my side by setting the user to "pending" and then when the first approved transaction comes in just cross check with my records?

    What do you think? Should I go with that?

    Thanks.

  3. There's unfortunately not a great way to do that right now. You could compare the invoice billingDatetime to the customer createdDatetime but the hook doesn't give you that date for the customer. You'd have to pull the customer/get for the customer and get the date that way. If you pull that, you could just see if that invoice is the first one.

    Alternatively, you can wait for the new hook to be released. In it there is a invoice[isInitial] bool. I recommend moving to the new hook when it's available anyway.

  4. Marc Guyer closed this discussion on 06 Jun, 2012 04:49 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

Recent Discussions