get for the current task state and wait to poll until it finishes or the client timeout expires. The wait deadline leaves the task running on the server. A successful get command can return a task with a failed status, so check data.status.
Use billing with the original credential to read the actual charge. See Credentials and billing for billing fields and permissions.