MIT Integration

Sending MIT subscriptions to Flex via APIs

MIT are transactions where the merchant initiates the payment on behalf of the customer, without the customer actively participating in the transaction (e.g.: recurring subscriptions).


On a decline of a recurring payment, transaction is sent over to Flex for a period of time.

During this period, Flex will send status update notifications via webhook:

  • APPROVED: transaction was rescued by Flex
  • EXPIRED: Flex wasn't able to rescue this transaction.

Integration steps

On the checkout page

1. Embed and invoke SenseJS

Flex needs to receive fingerprinting for the customer's session on the checkout page (e.g.: loading, device, timzone).

SenseJS is the dedicated JavaScript library for that. It needs to be invoked when the checkout page is loaded.

Implement SenseJS to a checkout page.

On the server side

2. Authentication

All API requests are made over HTTPS. Requests without authentication will fail.

How to authenticate.

3. Vault credit card info on checkout

Once the credit card information is collected for Authorization, it needs to be vaulted with Flex for later use.

Vaulting can be made in parallel to the Auth call.

Incorporate /tokenize to a checkout.

4. On authorized payments: Transmit the transaction information

Flex will build your custom risk model based on your successful transactions. POST /transmit doesn't require an answer, so this 'fire and forget' call doesn't add latency to your transaction.

Queue /transmit after an approval.

5. On declined payments: send that transaction for Evaluation

Retrieve the tokenized credit card information and pass it along with POST /evaluate

Flex will confirm having received the transaction with a SUBMITTED status.

Definitive status for transactions will be sent through a webhook notification.

Call /evaluate after a decline.


Send only MIT that have just failed

The Flex service is optimized to work with failed Merchant Initiated Transactions (MIT) that have just failed. These need to be passed to Flex on that day (and not after a few days or weeks) and should not be retried by the Merchant up to the set expiry date.

6. Update the order status

When integrating for MIT, you will get a async response. Subscribe to the relevant webhooks to receive updates on the order status.

Subscribe to the ORDER COMPLETE and ORDER EXPIRED webhooks.

7. Issue a refund on a Flex order

On an APPROVED transaction, issue a full or partial refund with POST /refund.

Retrieve the orderSessionKey from the /evaluate response to build your call.

Call /refund on an order.

8. Cancel a Flex pending order

Cancel a PENDING transaction, with POST /cancel.

Retrieve the orderSessionKey from the /evaluate response to build your call.

Call /cancel on an order.

Build your integration

Your integration build will depend on the characteristics of your technical ecosystem.

Unsure what steps you can/need to perform? Let's schedule a call!

What’s Next