From c4f97931f3c21235d508e5f663223d1443ec0a44 Mon Sep 17 00:00:00 2001 From: qbirr agent Date: Tue, 6 Oct 2026 19:34:08 +0300 Subject: [PATCH] Document tolerance, max_age_hours and payer_error The API accepts per-call overrides for the underpayment limit ("25" = 25 ETB, "1%" = one percent) and the receipt age limit (hours, 0 disables), and returns payer_error alongside error. None of it was in this SDK. payer_error is the payer-facing wording: show it to the customer, because error is written for the merchant and can name their own saved accounts. --- qbirr.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qbirr.go b/qbirr.go index f3daaf3..015eed6 100644 --- a/qbirr.go +++ b/qbirr.go @@ -50,6 +50,13 @@ type VerifyRequest struct { Amount float64 `json:"amount"` ReceiverName string `json:"receiver_name"` ReceiverAccount string `json:"receiver_account,omitempty"` // required for CBE & Abyssinia + + // Overrides the merchant's saved underpayment limit for this call only. + // "25" = 25 Birr, "1%" = one percent of Amount. Omit to use the saved setting. + Tolerance string `json:"tolerance,omitempty"` + // Overrides the saved receipt age limit for this call, in hours. 0 disables + // the age check for this call. Omit to use the saved setting. + MaxAgeHours *int `json:"max_age_hours,omitempty"` } // VerifyResult is the API response. Verification failures arrive here (Verified=false + Error set), @@ -83,6 +90,10 @@ type VerifyResult struct { // reference exists and the amount matches, but says nothing about who // received the money). ReceiverSource string `json:"receiver_source"` + // PayerError is the same failure written for the CUSTOMER to read. Show + // this to the payer, not Error: Error is written for the merchant and can + // name their own saved accounts. Empty when the payment verified. + PayerError string `json:"payer_error,omitempty"` // Sandbox is true only on TEST-... responses. Sandbox bool `json:"sandbox"`