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"`