Contains methods for recording transactions. This class should only be used if you are a Mobility
Services customer and are billed by Google on a per-transaction basis.
Returns a shared singleton GMSNavigationTransactionRecorder instance. This singleton is held
weakly and may be deallocated if an application does not keep a strong reference. You must call
this function only on the main thread.
This method will throw an exception if GMSServices+provideAPIKey: has not been called.
You should call this function each time a passenger or a delivery is picked up. You should
populate the transactionIDs parameter with a unique ID for each transaction that applies to this
event. You must call this function only on the main thread.
This method should be called if and only if your company is billed by Google on a
per-transaction basis.
The GMSNavigationWaypoint at which the pickup is occurring, or nil if there was
no guidance session leading to this pickup.
transactionIDs
One or more transaction IDs to which this pickup applies. The transaction
ID must be unique for each billable transaction. Transaction IDs must contain at least one
and at most 64 characters.
errorHandler
A block that will be invoked asynchronously on the main thread if an error
occurs while recording the pickup.
You should call this function each time a passenger is dropped-off or a delivery is delivered.
You should populate the transactionIDs parameter with a unique ID for each transaction that
applies to this event. You must call this function only on the main thread.
This method should be called if and only if your company is billed by Google on a
per-transaction basis.
The GMSNavigationWaypoint at which the dropoff is occurring, or nil if there
was no guidance session leading to this dropoff.
transactionIDs
One or more transaction IDs to which this dropoff applies. The transaction
ID must be unique for each billable transaction. Transaction IDs must contain at least one
and at most 64 characters.
errorHandler
A block that will be invoked asynchronously on the main thread if an error
occurs while recording the dropoff.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSNavigationTransactionRecorder\u003c/code\u003e enables recording of pickups and dropoffs for transactions, specifically for Mobility Services customers billed per transaction by Google.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to record pickups and dropoffs, associating them with unique transaction IDs for billing purposes.\u003c/p\u003e\n"],["\u003cp\u003eA shared singleton instance should be accessed using \u003ccode\u003esharedInstance\u003c/code\u003e, requiring prior initialization of \u003ccode\u003eGMSServices\u003c/code\u003e with an API key.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a utility for generating unique transaction IDs and requires all interactions to occur on the main thread.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationTransactionRecorder\n================================\n\n @interface GMSNavigationTransactionRecorder : NSObject\n\nContains methods for recording transactions. This class should only be used if you are a Mobility\nServices customer and are billed by Google on a per-transaction basis.\n- `\n ``\n ``\n `\n\n ### [+sharedInstance](#/c:objc(cs)GMSNavigationTransactionRecorder(cm)sharedInstance)\n\n `\n ` \n Returns a shared singleton `GMSNavigationTransactionRecorder` instance. This singleton is held\n weakly and may be deallocated if an application does not keep a strong reference. You must call\n this function only on the main thread.\n\n This method will throw an exception if [GMSServices](../Classes/GMSServices.html) `+provideAPIKey:` has not been called. \n\n #### Declaration\n\n Swift \n\n class func sharedInstance() -\u003e GMSNavigationTransactionRecorder\n\n Objective-C \n\n + (nonnull GMSNavigationTransactionRecorder *)sharedInstance;\n\n- `\n ``\n ``\n `\n\n ### [-recordPickupAtWaypoint:forTransactionIDs:withErrorHandler:](#/c:objc(cs)GMSNavigationTransactionRecorder(im)recordPickupAtWaypoint:forTransactionIDs:withErrorHandler:)\n\n `\n ` \n You should call this function each time a passenger or a delivery is picked up. You should\n populate the transactionIDs parameter with a unique ID for each transaction that applies to this\n event. You must call this function only on the main thread.\n\n \u003cbr /\u003e\n\n This method should be called if and only if your company is billed by Google on a\n per-transaction basis. \n\n #### Declaration\n\n Swift \n\n func recordPickup(at waypoint: ../Classes/GMSNavigationWaypoint.html?, forTransactionIDs transactionIDs: [String], withErrorHandler errorHandler: ../Type-Definitions/GMSNavigationTransactionRecorderErrorHandler.html? = nil)\n\n Objective-C \n\n - (void)recordPickupAtWaypoint:(nullable ../Classes/GMSNavigationWaypoint.html *)waypoint\n forTransactionIDs:(nonnull NSArray\u003cNSString *\u003e *)transactionIDs\n withErrorHandler:\n (nullable ../Type-Definitions/GMSNavigationTransactionRecorderErrorHandler.html)\n errorHandler;\n\n #### Parameters\n\n |------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*waypoint*` ` | The [GMSNavigationWaypoint](../Classes/GMSNavigationWaypoint.html) at which the pickup is occurring, or nil if there was no guidance session leading to this pickup. |\n | ` `*transactionIDs*` ` | One or more transaction IDs to which this pickup applies. The transaction ID must be unique for each billable transaction. Transaction IDs must contain at least one and at most 64 characters. |\n | ` `*errorHandler*` ` | A block that will be invoked asynchronously on the main thread if an error occurs while recording the pickup. |\n\n- `\n ``\n ``\n `\n\n ### [-recordDropoffAtWaypoint:forTransactionIDs:withErrorHandler:](#/c:objc(cs)GMSNavigationTransactionRecorder(im)recordDropoffAtWaypoint:forTransactionIDs:withErrorHandler:)\n\n `\n ` \n You should call this function each time a passenger is dropped-off or a delivery is delivered.\n You should populate the transactionIDs parameter with a unique ID for each transaction that\n applies to this event. You must call this function only on the main thread.\n\n \u003cbr /\u003e\n\n This method should be called if and only if your company is billed by Google on a\n per-transaction basis. \n\n #### Declaration\n\n Swift \n\n func recordDropoff(at waypoint: ../Classes/GMSNavigationWaypoint.html?, forTransactionIDs transactionIDs: [String], withErrorHandler errorHandler: ../Type-Definitions/GMSNavigationTransactionRecorderErrorHandler.html? = nil)\n\n Objective-C \n\n - (void)recordDropoffAtWaypoint:(nullable ../Classes/GMSNavigationWaypoint.html *)waypoint\n forTransactionIDs:(nonnull NSArray\u003cNSString *\u003e *)transactionIDs\n withErrorHandler:\n (nullable ../Type-Definitions/GMSNavigationTransactionRecorderErrorHandler.html)\n errorHandler;\n\n #### Parameters\n\n |------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*waypoint*` ` | The [GMSNavigationWaypoint](../Classes/GMSNavigationWaypoint.html) at which the dropoff is occurring, or nil if there was no guidance session leading to this dropoff. |\n | ` `*transactionIDs*` ` | One or more transaction IDs to which this dropoff applies. The transaction ID must be unique for each billable transaction. Transaction IDs must contain at least one and at most 64 characters. |\n | ` `*errorHandler*` ` | A block that will be invoked asynchronously on the main thread if an error occurs while recording the dropoff. |\n\n- `\n ``\n ``\n `\n\n ### [+generateTransactionID](#/c:objc(cs)GMSNavigationTransactionRecorder(cm)generateTransactionID)\n\n `\n ` \n Generate a new unique transaction ID. \n\n #### Declaration\n\n Swift \n\n class func generateTransactionID() -\u003e String\n\n Objective-C \n\n + (nonnull NSString *)generateTransactionID;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSNavigationTransactionRecorder(im)init)\n\n `\n ` \n Unavailable \n Init is unavailable. Use +sharedInstance to acquire an instance. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]