Wonder

Batch MIT Transactions

Batch MIT (Merchant-Initiated Transaction) lets you bundle thousands of recurring or scheduled charges into a single CSV or XLSX file and process them all at once. Ideal for subscription renewals, installment deductions, and periodic bill settlements — no per-transaction API calls, no customer interaction needed.

Workflow

There are two ways to supply payment credentials in a batch — using saved payment tokens (recommended) or raw card details.

Route 1 - Payment token(recommended)

  1. Let the customer save a card once via the Wallet Link, then reference their token_id in every batch. Better security, no raw card data in your files, and PCI-friendly.

  2. Create a customer via Create a customerAPI .

  3. Generate a customer wallet linkAPI and share it with the customer.

  4. Customer saves a credit card on the wallet page. Wonder stores it as a payment_token.

  5. Call Get customer payment tokensAPI to retrieve the saved tokens.

  6. Build a CSV/XLSX file with each row containing a token_id.

  7. Call Create batch MIT transactionAPI with the file URL.

  8. Call Get batch MIT transactionAPI with the batch_ID to check process status.

Route 2 - Raw card details

  1. Skip the customer setup and include full card information in each row. No prior customer action required — CVC is optional.

  2. Build a CSV/XLSX file with card_number, expiry_month, expiry_year, and optionally CVCin each row.

  3. Call Create batch MIT transactionAPI with the file URL.

  4. Call Get batch MIT transactionAPI to check progress.

File format

Supports both CSV and XLSX. Download the sample files below as a starting point. sample file.csv sample file.xlsx

FieldRequiredDescription
ActionYesType of operation. Lowercase only. Supported values: authorize, payment, void, cancellation, refund.
Reference NumberYesYour system's unique reference number.
Original Transaction IDNoRequired when Action = void/refund. Omit when Action = authorize.
Customer UUIDNoUnique customer identifier. Links the transaction to an existing customer profile.
AmountYesTransaction amount.
Token IDNoSaved card token. Either token_ID or card_number is required — mutually exclusive.
Card NumberNoFull card number. Either Token ID or card_number is required — mutually exclusive.
Expiry MonthNoMM format. Required when card_number is provided.
Expiry YearNoYY format. Required when card_number is provided.
CVCNoCard verification code.
RemarkNoFree-text note for the transaction.
INFO

Token ID vs Card Number: These are mutually exclusive — each row must use one or the other, never both. When using card_number, you must also supply Expiry Month and Expiry Year.

Create batch MITAPI

Upload a CSV or XLSX file via file URL (must be a publicly accessible URL). Wonder returns a batch_id you use to track processing.

Get MIT transaction by IDAPI

Query a batch by its batch_id. Returns batch_info and paginated individual transaction results. Use offset / limit to page through large batches.

Get MIT transactionssAPI

Search for specific transactions or transaction ranges by date. Requires start_time and end_time in RFC3339 format. Paginated via offset / limit.