coinbase / coinbase-commerce-node

Coinbase Commerce Node
MIT License
148 stars 54 forks source link

Event for Under Paid and over paid #6

Closed ukor closed 6 years ago

ukor commented 6 years ago

I recently use coinbase commerce for a project, one of the customers made a payment below what he should pay.

My question: What payload is returned through webhook for under paid payment. I only got an email that a customer under paid. I will like to handle under paid and over paid in my code.

ukor commented 6 years ago

I know i can handle this in my code by comparing the amount the user is supposed to pay with the amount returned by the webhook payload but i can't seem to find any field in documentation that return amount.

guacamoli commented 6 years ago

Hey @ukor, I believe you will receive a charge:failed webhook notification for both under/overpayments with a failure_reason of "OVERPAYMENT" or "UNDERPAYMENT".

ukor commented 5 years ago

I still think this should be included in the documentation. I just helped a colleague fix an issue related to this. We had to test with real funds to get the actual payload returned when underpayment and overpayment are made.

Romain-P commented 4 years ago

yep the api documentation sucks way too much. thanks coinbase