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
-
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. -
Send a
session/start/payment
request with therecurrent
payment type. Instead of a bank card, pass the token. Optionally, you can passinitiator
:merchant
in therecurrent
object ofpayment_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"
}
}' -
Wait for a
ready_to_confirm
webhook. -
Send a
session/confirm
request or asession/cancel
request to confirm or cancel the operation. -
Wait for a
payment_finished
webhook containing the payment status information.