Skip to main content
Before integrating, please review the API Description and Common Rules and CIT vs. MIT Transaction Modes.
MIT (Merchant-Initiated Transaction) allows your server to initiate subsequent off-session charges using a stored payment credential (tokenID) after the cardholder completes an initial on-session (CIT) payment and authorization. It is ideal for usage-based billing, auto top-ups, installments, and merchant-scheduled recurring billing.
  • If you offer fixed-amount, fixed-cycle plans with a defined term, we recommend using HaiPay’s managed Subscription Payment (/subscription/apply), where HaiPay schedules recurring charges automatically.
  • When using Component Mode for MIT, always set mode: 'payment' (MIT is categorized as standard collection on HaiPay; 'subscription' is only for fixed-term subscriptions).

Two-Phase Integration Flow

1

Phase 1: Initial Transaction (On-Session Authorization & First Charge to Obtain tokenID)

  1. Your backend calls MIT Collection Apply POST /usd/mit/apply without passing tokenID.
  2. Use the returned payUrl (Checkout Mode) or clientToken (Component Mode with mode: 'payment') so the shopper completes the first payment and authentication on-session.
  3. Upon payment success, HaiPay sends an asynchronous webhook to notifyUrl containing the tokenID bound to the user and card. Securely store the mapping between tokenID and partnerUserId.
2

Phase 2: Subsequent Transactions (Off-Session Merchant-Initiated Charges)

  1. Whenever a charge condition is met, your backend calls POST /usd/mit/apply again, passing the stored tokenID (along with the same partnerUserId).
  2. HaiPay validates the tokenID, executes the off-session charge directly, and notifies your notifyUrl asynchronously (you can also query status via /usd/collect/query).

MIT-Specific Parameters

In addition to standard collection parameters, /usd/mit/apply includes the following fields:

Request Examples (POST /usd/mit/apply)

Payment Types, Codes & Limits

Single-transaction limits for MIT are 0.99 – 1000 USD:
Mutual Exclusivity between inBankCode and paymentMethods:
  • Pass inBankCode when specifying a single payment method (leave paymentMethods empty).
  • Pass paymentMethods (comma-separated, e.g., "GOOGLE_PAY,CREDIT_CARD") to dynamically control which payment methods are displayed and their top-to-bottom display order (leave inBankCode empty). For example, passing "GOOGLE_PAY,CREDIT_CARD" displays only Google Pay followed by Credit Card from top to bottom.
  • This dynamic display and ordering capability also maps to the Global Cashier.

Core API Reference

For full field specifications, response schemas, and live debugging, visit the API Reference:

MIT Collection Apply

POST /usd/mit/apply — Initiate initial authorization or subsequent off-session charges.

Collection Order Query

POST /usd/collect/query — Query the final status of an MIT order.

Refund Apply & Query

POST /usd/refund/apply — Issue full or partial refunds for completed MIT charges.
Last modified on November 12, 2026