#jonathanbull

1 messages ยท Page 1 of 1 (latest)

gritty hullBOT
brave wedge
#

AFAIK, you can't really. Let me confirm

#

What's the use case for understanding the difference?

sage vine
#

We send our customers an email if their subscription payment failed. We don't want to send that email if they're paying an invoice manually.

#

(because they'll already have seen a message saying their payment failed โ€“ your invoice payment screen tells them this)

brave wedge
#

Ah, got it. So you have some customers that aren't on automatic billing โ€“ you explicitly send them an invoice to pay manually?

sage vine
#

Everyone is on automatic billing, but sometimes we need to send them a manual invoice (mainly for customers in India, due to RBI regs).

brave wedge
#

Ah, I was going to suggest you could use the collection_method field on the Invoice object to differentiate the 2

sage vine
#

Yeah unfortunately that's collection_method: automatic even if they pay manually

brave wedge
#

But if they're all charge_automatically, I'm not sure there's another way really without tracking it yourself on the Invoice

sage vine
#

thanks for the suggestion though

#

ah I just noticed the "event source" is different for a payment made manually (API) vs automatic (Automatic)

#

is there any way we see that in the payload?

brave wedge
#

There's not unfortunately

sage vine
#

Ah ๐Ÿ˜ฆ

#

Well thanks anyway. Is there any way we could suggest this as a enhancement? Knowing how the customer paid an invoice (manual vs automatic) seems like quite pertinent info โ€“ at least in our case!

brave wedge
#

Just so we're clear, you want to prevent actioning invoice.payment_failed events from payments initiated by the hosted page, and to do that you need a way to differentiate the events via the payload. Yes?

sage vine
#

Exactly right.

brave wedge
#

Do you have an example event for scenario B to hand?

sage vine
#

sure, one second

#

scenario a: evt_1MAyuSHZLNwo79Rqjxu1NmWk
scenario b: evt_1MAyKCHZLNwo79Rqbbd1VHy8

true zenith
sage vine
#

Ah fantastic! The docs you link even suggest this as being useful for this use case. Thank you.