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)
-
Let the customer save a card once via the
Wallet Link, then reference theirtoken_idin every batch. Better security, no raw card data in your files, and PCI-friendly. -
Create a customer via Create a customerAPI .
-
Generate a customer wallet linkAPI and share it with the customer.
-
Customer saves a credit card on the wallet page. Wonder stores it as a
payment_token. -
Call Get customer payment tokensAPI to retrieve the saved tokens.
-
Build a CSV/XLSX file with each row containing a
token_id. -
Call Create batch MIT transactionAPI with the file URL.
-
Call Get batch MIT transactionAPI with the
batch_IDto check process status.
Route 2 - Raw card details
-
Skip the customer setup and include full card information in each row. No prior customer action required — CVC is optional.
-
Build a CSV/XLSX file with
card_number,expiry_month,expiry_year, and optionallyCVCin each row. -
Call Create batch MIT transactionAPI with the file URL.
-
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
| Field | Required | Description |
|---|---|---|
| Action | Yes | Type of operation. Lowercase only. Supported values: authorize, payment, void, cancellation, refund. |
| Reference Number | Yes | Your system's unique reference number. |
| Original Transaction ID | No | Required when Action = void/refund. Omit when Action = authorize. |
| Customer UUID | No | Unique customer identifier. Links the transaction to an existing customer profile. |
| Amount | Yes | Transaction amount. |
| Token ID | No | Saved card token. Either token_ID or card_number is required — mutually exclusive. |
| Card Number | No | Full card number. Either Token ID or card_number is required — mutually exclusive. |
| Expiry Month | No | MM format. Required when card_number is provided. |
| Expiry Year | No | YY format. Required when card_number is provided. |
| CVC | No | Card verification code. |
| Remark | No | Free-text note for the transaction. |
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.
Related APIs
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.
Query a batch by its batch_id. Returns batch_info and paginated individual transaction results. Use offset / limit to page through large batches.
Search for specific transactions or transaction ranges by date. Requires start_time and end_time in RFC3339 format. Paginated via offset / limit.