Check a ROKI payment response against the request that produced it
roki_check_resultCompare the payment the API returned against the body you sent, and report anything that does not match. Every other check here looks at what you SEND. This one exists for the errors that survive that: the field name was right and the VALUE was wrong. The API answers 201, warnings comes back empty because there was nothing to warn about, and the merchant charged something else. Catches the amount off by a factor of 100, fee pass-through asked for and returned as zero, tax that was not applied, expires_at already in the past because it was sent as UTC instead of Honduras time, a total that does not add up, and a transaction_id parsed as a number. Run it after every createPayment while you are building, and in your own tests afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sent | Yes | The JSON request body you sent to POST /payments. | |
| received | Yes | The payment object the API returned. Paste the response as-is. |