BRScanResults
Holds the scan results for a completed scanning session.
Declaration
@interface BRScanResults : NSObject <BRSerializable>
class BRScanResults : NSObject, BRSerializable
Quick Reference
Properties
| Property | Description |
|---|---|
retailerId | The detected retailer ID. |
merchantName | The store name detected on the receipt, if any. |
clientMerchantName | Client-specific merchant name passed back when available. |
merchantGuess | Best guess for the merchant based on receipt heuristics. |
merchantSources | Merchant detection methods that succeeded; nil if no merchant detected. |
storeNumber | The store number detected on the receipt, if any. |
storeAddress | The store street address detected on the receipt, if any. |
storeCity | The store city detected on the receipt, if any. |
storeState | The store state detected on the receipt, if any. |
storeZip | The store zip code detected on the receipt, if any. |
storePhone | The store phone number detected on the receipt, if any. |
mallName | The name of the mall in which the retailer is located, if any. |
channel | The retail channel for this receipt, if any. |
blinkReceiptId | Unique ID linking scan data to the receipt image stored by client. |
barcode | Barcode detected on the receipt (Code 39, Code 128, ITF formats). |
transactionId | Transaction ID detected on the receipt, if any. |
longTransactionId | Longer transaction number, if any. |
registerId | The register ID detected on the receipt, if any. |
cashierId | The cashier ID detected on the receipt, if any. |
currencyCode | The currency identifier for this receipt, if identified. |
purchaseType | Represents the type of purchase. |
taxId | The tax ID of the retailer, if any. |
receiptDate | The purchase date formatted as MM/dd/yyyy, if any. |
receiptTime | The purchase time formatted as HH:mm, if any. |
receiptTimeSeconds | The seconds component of the purchase time, if any. |
total | The total detected on the receipt, if any. |
subtotal | The subtotal detected on the receipt, if any. |
taxes | Tax amount detected on the receipt, if any. |
tip | Tip amount detected on the receipt, if any. |
cashback | Cashback amount detected on the receipt. |
products | Array of BRProduct objects detected on the receipt; some e-receipts return shipments instead. |
coupons | Array of BRCoupon objects detected on the receipt. |
shipments | Array of BRShipment objects representing all discovered shipments. |
paymentMethods | Array of BRPaymentMethod objects found on the receipt. |
last4CC | The last 4 digits of the credit card used, if any. |
authCode | The payment authorization code, if any. |
aid | The payment application identifier, if any. |
paymentTerminalId | Unique identifier for the payment processor's terminal. |
paymentTransactionId | Unique identifier for the payment processor's transaction. |
loyaltyProgram | Whether a loyalty program indication was found on the receipt. |
memberNumber | Loyalty member number detected on the receipt, if any. |
isInstacartShopper | Whether the purchase was made by an Instacart shopper. |
qualifiedPromotions | All promotions validated against this receipt. |
unqualifiedPromotions | All promotions evaluated but not validated against this receipt. |
qualifiedSurveys | All surveys validated against this receipt. |
ocrConfidence | Average OCR confidence across all scanned frames. |
tripConfidence | Trip-level confidence score (0–100) computed at end of session. |
itemConfidence | Item-level confidence score (0–100) computed at end of session. |
serverLookupsCompleted | Whether any server lookups were still pending when results were returned. |
foundTopEdge | Whether the top edge of the receipt was found on any scanned frame. |
foundBottomEdge | Whether the bottom edge of the receipt was found on any scanned frame. |
subtotalMatches | Whether the detected subtotal matches the sum of all detected products and coupons. |
productsPendingLookup | Number of products still awaiting intelligence results. |
isDuplicate | Whether this receipt was identified as a duplicate. |
isFraudulent | Whether this receipt is believed to be fraudulent. |
duplicateBlinkReceiptIds | BlinkReceipt ID(s) of the duplicate receipts, if isDuplicate is true. |
ereceiptOrderNumber | Order number for an Amazon or e-receipt order. |
ereceiptOrderStatus | Order status for an e-receipt order. |
ereceiptPurchaseType | Type of purchase for an Amazon or e-receipt order. |
ereceiptRawHTML | Raw HTML parsed from the e-receipt email. |
ereceiptEmailProvider | Name of the email provider from which the e-receipt was obtained. |
ereceiptMerchantEmail | The sender address of the e-receipt email. |
ereceiptEmailSubject | Subject line of the e-receipt email. |
ereceiptEmailId | Internal message ID of the e-receipt email from the email provider. |
ereceiptComponentEmails | BRScanResults from each component email when aggregation is on; only blinkReceiptId populated for different scrape sessions. |
ereceiptFulfilledBy | Third-party fulfillment service, if any. |
ereceiptSubMerchant | Sub-merchant name, if any. |
ereceiptPOSSystem | Point of sale system used for the order, if any. |
ereceiptShippingCosts | Shipping costs for this e-receipt, if any. |
ereceiptAuthenticated | Whether the e-receipt email was authenticated via DKIM or SPF headers. |
ereceiptIsValid | Whether the email was successfully identified as an e-receipt or related message. |
ereceiptAdditionalFees | Additional fees/charges as key-value pairs (e.g., tips, bag fees). |
extendedFields | Additional receipt fields not captured by standard properties. |
combinedRawText | Cumulative raw OCR text from all scanned frames. |
rawBasketText | Raw product data results. |
rawTripHeaderText | Raw text results found at the top of the receipt. |
rawTripFooterText | Raw text results found at the bottom of the receipt. |
Methods
| Method | Description |
|---|---|
addUserCorrectedProduct(withBrand:upc:productName:imageUrl:totalPrice:quantity:) | Adds a new user-corrected product to the results. |
userCorrectedDate: | Updates the receipt's purchase date with a user correction. |
userCorrectedTotal: | Updates the receipt's total with a user correction. |
userCorrectedMerchant: | Updates the receipt's merchant name with a user correction. |
Properties
Merchant & Store
retailerId (read-only)
@property (nonatomic, readonly) WFRetailerId retailerId;
var retailerId: WFRetailerId { get }
The detected retailer ID. For future auto-detect retailer functionality.
merchantName (read-only)
@property (nonatomic, strong, readonly) BRStringValue *merchantName;
var merchantName: BRStringValue! { get }
The store name detected on the receipt, if any.
clientMerchantName (read-only)
@property (nonatomic, strong, readonly) BRStringValue *clientMerchantName;
var clientMerchantName: BRStringValue! { get }
Client-specific merchant name passed back when available.
merchantGuess (read-only)
@property (nonatomic, strong, readonly) NSString *merchantGuess;
var merchantGuess: String! { get }
Best guess for the merchant based on receipt heuristics.
merchantSources (read-only)
@property (nonatomic, strong, readonly) NSArray<NSNumber *> *merchantSources;
var merchantSources: [NSNumber]! { get }
An array of NSNumber objects wrapping BRMerchantSource values indicating which merchant detection method(s) succeeded in identifying the current merchant. nil if no merchant was detected (i.e. merchantName == nil).
storeNumber (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storeNumber;
var storeNumber: BRStringValue! { get }
The store number detected on the receipt, if any.
storeAddress (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storeAddress;
var storeAddress: BRStringValue! { get }
The store street address detected on the receipt, if any.
storeCity (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storeCity;
var storeCity: BRStringValue! { get }
The store city detected on the receipt, if any.
storeState (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storeState;
var storeState: BRStringValue! { get }
The store state detected on the receipt, if any.
storeZip (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storeZip;
var storeZip: BRStringValue! { get }
The store zip code detected on the receipt, if any.
storePhone (read-only)
@property (nonatomic, strong, readonly) BRStringValue *storePhone;
var storePhone: BRStringValue! { get }
The store phone number detected on the receipt, if any.
mallName (read-only)
@property (nonatomic, strong, readonly) BRStringValue *mallName;
var mallName: BRStringValue! { get }
The name of the mall in which the retailer is located, if any.
channel (read-only)
@property (nonatomic, strong, readonly) BRStringValue *channel;
var channel: BRStringValue! { get }
The retail channel for this receipt, if any.
Transaction
blinkReceiptId (read-only)
@property (nonatomic, strong, readonly) NSString *blinkReceiptId;
var blinkReceiptId: String! { get }
Unique ID for this receipt which allows BlinkReceipt to correspond scan data to the correct receipt image stored by client.
barcode (read-only)
@property (nonatomic, strong, readonly) NSString *barcode;
var barcode: String! { get }
The barcode detected on the receipt, if any. Currently we recognize Code 39, Code 128, and ITF formats.
transactionId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *transactionId;
var transactionId: BRStringValue! { get }
Transaction ID detected on the receipt, if any.
longTransactionId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *longTransactionId;
var longTransactionId: BRStringValue! { get }
Some receipts contain a longer transaction number in addition to the standard one.
registerId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *registerId;
var registerId: BRStringValue! { get }
The register ID detected on the receipt, if any.
cashierId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *cashierId;
var cashierId: BRStringValue! { get }
The cashier ID detected on the receipt, if any.
currencyCode (read-only)
@property (nonatomic, strong, readonly) NSString *currencyCode;
var currencyCode: String! { get }
The currency identifier for this receipt, if identified.
purchaseType (read-only)
@property (nonatomic, strong, readonly) NSString *purchaseType;
var purchaseType: String! { get }
Represents the type of purchase (e.g., in-store, online).
taxId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *taxId;
var taxId: BRStringValue! { get }
The tax ID of the retailer, if any.
Purchase Date & Time
receiptDate (read-only)
@property (nonatomic, strong, readonly) BRStringValue *receiptDate;
var receiptDate: BRStringValue! { get }
The purchase date formatted as MM/dd/yyyy, if any.
receiptTime (read-only)
@property (nonatomic, strong, readonly) BRStringValue *receiptTime;
var receiptTime: BRStringValue! { get }
The purchase time formatted as HH:mm, if any.
receiptTimeSeconds (read-only)
@property (nonatomic, strong, readonly) BRStringValue *receiptTimeSeconds;
var receiptTimeSeconds: BRStringValue! { get }
The seconds component of the purchase time formatted as SS, if any.
Totals
total (read-only)
@property (nonatomic, strong, readonly) BRFloatValue *total;
var total: BRFloatValue! { get }
The total detected on the receipt, if any.
subtotal (read-only)
@property (nonatomic, readonly) BRFloatValue *subtotal;
var subtotal: BRFloatValue! { get }
The subtotal detected on the receipt, if any.
taxes (read-only)
@property (nonatomic, readonly) BRFloatValue *taxes;
var taxes: BRFloatValue! { get }
The tax detected on the receipt, if any.
tip (read-only)
@property (nonatomic, readonly) BRFloatValue *tip;
var tip: BRFloatValue! { get }
The tip detected on the receipt, if any.
cashback (read-only)
@property (nonatomic, readonly) float cashback;
var cashback: Float { get }
Cashback amount detected on the receipt.
Products & Items
products (read-only)
@property (nonatomic, strong, readonly) NSArray<BRProduct *> *products;
var products: [BRProduct]! { get }
An array of BRProduct objects representing the products that were detected on the receipt, if any. Some e-receipts may return shipments with products instead of a products list directly.
coupons (read-only)
@property (nonatomic, strong, readonly) NSArray<BRCoupon *> *coupons;
var coupons: [BRCoupon]! { get }
Array of BRCoupon objects detected on the receipt.
shipments (read-only)
@property (nonatomic, strong, readonly) NSArray<BRShipment *> *shipments;
var shipments: [BRShipment]! { get }
An array of BRShipment objects representing all shipments discovered in this order.
Payment
paymentMethods (read-only)
@property (nonatomic, strong, readonly) NSArray<BRPaymentMethod *> *paymentMethods;
var paymentMethods: [BRPaymentMethod]! { get }
Array of BRPaymentMethod objects found on the receipt.
last4CC (read-only)
@property (nonatomic, strong, readonly) BRStringValue *last4CC;
var last4CC: BRStringValue! { get }
The last 4 digits of the credit card used, if any.
authCode (read-only)
@property (nonatomic, strong, readonly) BRStringValue *authCode;
var authCode: BRStringValue! { get }
The payment authorization code, if any.
aid (read-only)
@property (nonatomic, strong, readonly) BRStringValue *aid;
var aid: BRStringValue! { get }
The payment application identifier, if any.
paymentTerminalId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *paymentTerminalId;
var paymentTerminalId: BRStringValue! { get }
Unique identifier for the payment processor's terminal.
paymentTransactionId (read-only)
@property (nonatomic, strong, readonly) BRStringValue *paymentTransactionId;
var paymentTransactionId: BRStringValue! { get }
Unique identifier for the payment processor's transaction.
Loyalty & Member
loyaltyProgram (read-only)
@property (nonatomic, readonly) BOOL loyaltyProgram;
var loyaltyProgram: Bool { get }
Whether a loyalty program indication was found on the receipt.
memberNumber (read-only)
@property (nonatomic, strong, readonly) NSString *memberNumber;
var memberNumber: String! { get }
Loyalty member number detected on the receipt, if any.
isInstacartShopper (read-only)
@property (nonatomic, readonly) BOOL isInstacartShopper;
var isInstacartShopper: Bool { get }
Whether the purchase was made by an Instacart shopper.
Promotions & Surveys
qualifiedPromotions (read-only)
@property (nonatomic, strong, readonly) NSArray<BRPromotion *> *qualifiedPromotions;
var qualifiedPromotions: [BRPromotion]! { get }
If promotion validation is enabled, this will contain all the promotions that were validated.
unqualifiedPromotions (read-only)
@property (nonatomic, strong, readonly) NSArray<BRPromotion *> *unqualifiedPromotions;
var unqualifiedPromotions: [BRPromotion]! { get }
If promotion validation is enabled, this will contain all the promotions that were NOT validated.
qualifiedSurveys (read-only)
@property (nonatomic, strong, readonly) NSArray<BRSurvey *> *qualifiedSurveys;
var qualifiedSurveys: [BRSurvey]! { get }
If promotion validation is enabled, this will contain all the surveys that were validated.
Quality & Validation
ocrConfidence (read-only)
@property (nonatomic, readonly) float ocrConfidence;
var ocrConfidence: Float { get }
Average OCR confidence across all scanned frames, on a scale of 0–100.
tripConfidence (read-only)
@property (nonatomic, readonly) float tripConfidence;
var tripConfidence: Float { get }
Trip confidence (0–100) computed by the parser at the end of the scan session. Reflects how confidently the scan represents a complete purchase trip — date present, merchant identified, total found. Returns 0 when not computed.
SDK Version: 1.71.0
itemConfidence (read-only)
@property (nonatomic, readonly) float itemConfidence;
var itemConfidence: Float { get }
Item confidence (0–100) computed by the parser at the end of the scan session. Reflects how accurately the individual line items were captured. Returns 0 when not computed.
SDK Version: 1.71.0
serverLookupsCompleted (read-only)
@property (nonatomic, readonly) BOOL serverLookupsCompleted;
var serverLookupsCompleted: Bool { get }
Indicates whether any server lookups were still pending at the time results were returned to the client.
foundTopEdge (read-only)
@property (nonatomic, readonly) BOOL foundTopEdge;
var foundTopEdge: Bool { get }
Indicates whether a top edge was found on any frame that was scanned in this session.
foundBottomEdge (read-only)
@property (nonatomic, readonly) BOOL foundBottomEdge;
var foundBottomEdge: Bool { get }
Indicates whether a bottom edge was found on any frame that was scanned in this session.
subtotalMatches (read-only)
@property (nonatomic, readonly) BOOL subtotalMatches;
var subtotalMatches: Bool { get }
Indicates whether the subtotal matches the sum of the products and coupons.
productsPendingLookup (read-only)
@property (nonatomic, readonly) NSInteger productsPendingLookup;
var productsPendingLookup: Int { get }
Number of products still awaiting intelligence results when the scan session ended. A non-zero value indicates not all products were fully enriched.
isDuplicate (read-only)
@property (nonatomic, readonly) BOOL isDuplicate;
var isDuplicate: Bool { get }
Whether the receipt is a duplicate (depends on BRScanOptions.detectDuplicates being enabled).
isFraudulent (read-only)
@property (nonatomic, readonly) BOOL isFraudulent;
var isFraudulent: Bool { get }
Whether the receipt is believed to be fraudulent (depends on BRScanOptions.detectDuplicates being enabled).
duplicateBlinkReceiptIds (read-only)
@property (nonatomic, strong, readonly) NSArray<NSString *> *duplicateBlinkReceiptIds;
var duplicateBlinkReceiptIds: [String]! { get }
If isDuplicate is true, this property contains the BlinkReceipt ID(s) of the duplicate receipts.
E-Receipt
ereceiptOrderNumber (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptOrderNumber;
var ereceiptOrderNumber: String! { get }
For an Amazon or e-receipt order, this is the order number.
ereceiptOrderStatus (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptOrderStatus;
var ereceiptOrderStatus: String! { get }
For an e-receipt order, this is the order status.
ereceiptPurchaseType (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptPurchaseType;
var ereceiptPurchaseType: String! { get }
For an Amazon or e-receipt order, this is the type of purchase.
ereceiptRawHTML (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptRawHTML;
var ereceiptRawHTML: String! { get }
For an Amazon or e-receipt order, this is the raw HTML that was parsed.
ereceiptEmailProvider (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptEmailProvider;
var ereceiptEmailProvider: String! { get }
Name of the email provider from which the e-receipt was obtained.
ereceiptMerchantEmail (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptMerchantEmail;
var ereceiptMerchantEmail: String! { get }
The sender address of the e-receipt email.
ereceiptEmailSubject (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptEmailSubject;
var ereceiptEmailSubject: String! { get }
Subject line of the e-receipt email.
ereceiptEmailId (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptEmailId;
var ereceiptEmailId: String! { get }
Internal message ID of the e-receipt email from the email provider.
ereceiptComponentEmails (read-only)
@property (nonatomic, strong, readonly) NSArray<BRScanResults *> *ereceiptComponentEmails;
var ereceiptComponentEmails: [BRScanResults]! { get }
For e-receipt orders, if aggregation is turned on, this contains the BRScanResults objects from each component email for a given order. Note: for emails from a different scrape session, only blinkReceiptId will be populated.
ereceiptFulfilledBy (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptFulfilledBy;
var ereceiptFulfilledBy: String! { get }
Third-party fulfillment service (e.g., "Instacart"), if any.
ereceiptSubMerchant (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptSubMerchant;
var ereceiptSubMerchant: String! { get }
Sub-merchant name (e.g., "McDonald's" for an Uber Eats order), if any.
ereceiptPOSSystem (read-only)
@property (nonatomic, strong, readonly) NSString *ereceiptPOSSystem;
var ereceiptPOSSystem: String! { get }
Point of sale system used for the order, if any.
ereceiptShippingCosts (read-only)
@property (nonatomic, readonly) float ereceiptShippingCosts;
var ereceiptShippingCosts: Float { get }
Shipping costs for this e-receipt, if any.
ereceiptAuthenticated (read-only)
@property (nonatomic, readonly) BOOL ereceiptAuthenticated;
var ereceiptAuthenticated: Bool { get }
Whether the e-receipt email was authenticated via DKIM or SPF headers.
ereceiptIsValid (read-only)
@property (nonatomic, readonly) BOOL ereceiptIsValid;
var ereceiptIsValid: Bool { get }
Whether the email was successfully identified as an e-receipt or related message (as opposed to a marketing message, etc.).
ereceiptAdditionalFees (read-only)
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSString *> *ereceiptAdditionalFees;
var ereceiptAdditionalFees: [String : String]! { get }
Additional fees/charges for this e-receipt, if any (like tips, bag/bottle fees, etc.). Each key-value pair represents the fee name and its amount — e.g. { "Tips": "2.19", "Bag Fee": "0.05" }.
Raw Data
extendedFields (read-only)
@property (nonatomic, strong, readonly) NSDictionary *extendedFields;
var extendedFields: [AnyHashable : Any]! { get }
Additional receipt fields not captured by standard properties.
combinedRawText (read-only)
@property (nonatomic, strong, readonly) NSString *combinedRawText;
var combinedRawText: String! { get }
Cumulative raw OCR text from all scanned frames.
rawBasketText (read-only)
@property (nonatomic, strong, readonly) NSString *rawBasketText;
var rawBasketText: String! { get }
Raw product data results.
rawTripHeaderText (read-only)
@property (nonatomic, strong, readonly) NSString *rawTripHeaderText;
var rawTripHeaderText: String! { get }
A set of raw trip results found on top of receipt.
rawTripFooterText (read-only)
@property (nonatomic, strong, readonly) NSString *rawTripFooterText;
var rawTripFooterText: String! { get }
A set of raw trip results found on bottom of receipt.
Methods
addUserCorrectedProduct(withBrand:upc:productName:imageUrl:totalPrice:quantity:)
- (void)addUserCorrectedProductWithBrand:(NSString *)brand
upc:(NSString *)upc
productName:(NSString *)productName
imageUrl:(NSString *)imgUrl
totalPrice:(float)totalPrice
quantity:(float)quantity;
func addUserCorrectedProduct(
withBrand brand: String!,
upc: String!,
productName: String!,
imageUrl imgUrl: String!,
totalPrice: Float,
quantity: Float
)
For a custom user corrections flow: if the user adds a new product, call this method to add it to the scan results object.
Parameters:
| Parameter | Description |
|---|---|
brand | The product brand |
upc | The product UPC |
productName | The product name |
imgUrl | The product image URL |
totalPrice | The total price for this line item |
quantity | The quantity |
userCorrectedDate:
- (void)userCorrectedDate:(NSString *)dateString;
func userCorrectedDate(_ dateString: String!)
For a custom user corrections flow: when a user modifies the date, call this method to update the receipt's purchase date.
Parameters:
| Parameter | Description |
|---|---|
dateString | The corrected date string |
userCorrectedTotal:
- (void)userCorrectedTotal:(float)total;
func userCorrectedTotal(_ total: Float)
For a custom user corrections flow: when a user modifies the total, call this method to update the receipt's purchase total.
Parameters:
| Parameter | Description |
|---|---|
total | The corrected total amount |
userCorrectedMerchant:
- (void)userCorrectedMerchant:(NSString *)name;
func userCorrectedMerchant(_ name: String!)
For a custom user corrections flow: when a user modifies the merchant, call this method to update the receipt's merchant name.
Parameters:
| Parameter | Description |
|---|---|
name | The corrected merchant name |