Handling receipt validation status code for consumable product

My app has consumable in-app purchase products. The app is using "Original API for In-App Purchase". When the user purchase in-app product, the app sends the receipt to our web server which then validates the receipt throw the App Store api. The App Store validates the receipt and gives us the response with a status code.

The problem is here. It's obvious how to handle a 'valid receipt' response status code which is 0. But the document is not straight about handling response code which isn't 0.

Should we call finishTransaction when the response code isn't 0? or should we not? If we don't call finishTransaction, we are worried that the transaction will stay alive and loop forever. If we call finishTransaction, we are worried that we might ignore a valid purchase and not give the consumable product that user purchased.

Is there a right way to handle this?

Original API for In-App Purchase: https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase?language=objc

Receipt Validation Response Status code : https://developer.apple.com/documentation/appstorereceipts/status

Handling receipt validation status code for consumable product
 
 
Q