Skip to main content

Batch and import models

These models handle bulk transaction processing, imports, and batch operations in Chargeworx.

ImportBatch

Tracks bulk transaction imports from external sources or file uploads.

Key properties

PropertyTypeDescription
IdGuidUnique batch identifier
ProjectIdGuidAssociated project reference
FileNameStringSource file name
StatusStringBatch processing status
TotalRecordsIntTotal records in batch
ProcessedRecordsIntSuccessfully processed records
FailedRecordsIntFailed records
CreatedAtDateTimeBatch creation timestamp
CompletedAtDateTime?Batch completion timestamp

Relationships

  • Belongs to a Project
  • Has many TransferredTransactions

Batch statuses

StatusDescription
PendingBatch queued for processing
ProcessingBatch currently being processed
CompletedAll records processed successfully
PartialSome records failed
FailedBatch processing failed

TransferredTransaction

Represents individual transactions within an import batch.

Key properties

PropertyTypeDescription
IdGuidUnique identifier
ImportBatchIdGuidAssociated batch reference
TransactionIdGuid?Created transaction reference
SourceDataStringOriginal import data (JSON)
StatusStringProcessing status
ErrorMessageStringError details if failed
ProcessedAtDateTime?Processing timestamp

Relationships

  • Belongs to an ImportBatch
  • May reference a Transaction (if successfully created)

CreditCardBatch

Manages batch processing of credit card transactions for settlement.

Key properties

PropertyTypeDescription
IdGuidUnique batch identifier
ProjectIdGuidAssociated project reference
ProcessorBatchIdStringProcessor batch reference
BatchDateDateTimeBatch settlement date
TransactionCountIntNumber of transactions
TotalAmountDecimalTotal batch amount
StatusStringBatch status
SettledAtDateTime?Settlement timestamp

Relationships

  • Belongs to a Project
  • Contains multiple Transactions

Batch lifecycle

  1. Open - Batch accepting transactions
  2. Closed - Batch closed for new transactions
  3. Submitted - Batch submitted to processor
  4. Settled - Funds settled to merchant account
  5. Rejected - Batch rejected by processor

Usage patterns

Importing transactions

Bulk transaction imports support CSV, JSON, and XML formats. Each import creates an ImportBatch record for tracking.

Batch validation

Import records are validated before processing:
  • Required fields present
  • Data format correctness
  • Business rule compliance

Error handling

Failed records are tracked with detailed error messages. Partial batch completion allows successful records to process while flagging failures.

Settlement batches

Credit card batches group transactions for settlement processing. Batches are automatically closed and submitted based on configured schedules.

Best practices

  • Validate import files before submission
  • Monitor batch processing status
  • Review failed records and error messages
  • Schedule batch imports during low-traffic periods
  • Maintain audit logs of all batch operations