REST Hooks: invoice.payment.add

I added a REST Hook with event key invoice.payment.add, it works, here is the answer:


but 14 is a PaymentId, not a transaction id. If I follow the the apiUrl (with access token of course) it would return an empty string. The real transaction id is 422 (in this example), so the url should be
What is wrong: the url or the id?

I need to get the list of the products from that transaction after the payment. How can I do it? Preferably without querying 3 tables (InvoicePayment, InvoiceItem, and OrderItem)

1 Like

Hi @and_dev it looks like we are giving back the PaymentId which mismatches what the transaction endpoint requires. You would need to first get the correct transaction Id from the orders/{orderId}/transactions endpoint… This looks like an oversight, I have created a ticket for the team to address this.

it’s not orderId either, orderId for this transaction would be 24, not 14. I was experimenting with promotions, when the price is $0, it doesn’t count as a payment, I guess. REST Hook wasn’t triggered.

14 matches PaymentId from the table InvoicePayment, so it requires several steps to get transactionId

Can you update this topic when the issue would be resolved? Thanks