Skip to main content

MIT recurring payments

MIT recurring payments (Merchant Initiated Transaction) enable you to accept a payment without involving the user, using a token.


These payments can be used for paying:
  • utilities and mobile phone bills
  • any memberships
  • any subscriptions

Once you have a token, you can start accepting MIT recurring payments.

Accepting payments using a token

  1. Create a payment session sending a session/create request.

    Alternatively, you can use the session-init-payment method. In this case, specify all the payment parameters right away as it is specified in the next step and skip the next step.

  2. Send a session/start/payment request with the recurrent payment type. Instead of a bank card, pass the token. Optionally, you can pass initiator: merchant in the recurrent object of payment_details.

    Example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/start/payment \
    -H 'Content-Type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "session_id":"ps_3230",
    "payment_details": {
    "type": "recurrent",
    "recurrent": {
    "token": "e9876f32bcd947f79c324cf2da5726304a894f6ae2037de7705fdb3e0a134d39",
    "initiator": "merchant"
    }
    },
    "amount_details": {
    "amount": 10000,
    "currency": "usd"
    },
    "customer": {
    "reference": "lucky"
    }
    }'
  3. Wait for a ready_to_confirm webhook.

  4. Send a session/confirm request or a session/cancel request to confirm or cancel the operation.

  5. Wait for a payment_finished webhook containing the result of the payment. To learn about the payment statuses, see here.

Sequence diagram of MIT recurring payments